RigsofRods
Soft-body Physics Simulation
IWater.h
Go to the documentation of this file.
1 /*
2  This source file is part of Rigs of Rods
3  Copyright 2005-2012 Pierre-Michel Ricordel
4  Copyright 2007-2012 Thomas Fischer
5  Copyright 2017-2020 Petr Ohlidal
6 
7  For more information, see http://www.rigsofrods.org/
8 
9  Rigs of Rods is free software: you can redistribute it and/or modify
10  it under the terms of the GNU General Public License version 3, as
11  published by the Free Software Foundation.
12 
13  Rigs of Rods is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with Rigs of Rods. If not, see <http://www.gnu.org/licenses/>.
20 */
21 
22 #pragma once
23 
24 #include "ForwardDeclarations.h"
25 #include <Ogre.h>
26 
27 namespace RoR {
28 
31 
32 class IWater
33 {
34 public:
36  {
37  }
38 
39  virtual ~IWater()
40  {
41  }
42 
43  virtual float GetStaticWaterHeight() = 0;
44  virtual void SetStaticWaterHeight(float value) = 0;
45  virtual void SetWaterBottomHeight(float value) {};
46  virtual void SetWavesHeight(float value) {};
47  virtual float CalcWavesHeight(Ogre::Vector3 pos) = 0;
48  virtual Ogre::Vector3 CalcWavesVelocity(Ogre::Vector3 pos) = 0;
49  virtual void SetWaterVisible(bool value) = 0;
50  virtual void WaterSetSunPosition(Ogre::Vector3) {}
51  virtual bool IsUnderWater(Ogre::Vector3 pos) = 0;
52  virtual void FrameStepWater(float dt) = 0;
53  virtual void SetReflectionPlaneHeight(float centerheight) {}
54  virtual void UpdateReflectionPlane(float h) {}
55  virtual void WaterPrepareShutdown() {}
56  virtual void UpdateWater() = 0;
57 
58  // Only used by class Water for SurveyMap texture creation
59  virtual void SetForcedCameraTransform(Ogre::Radian fovy, Ogre::Vector3 pos, Ogre::Quaternion rot) {};
60  virtual void ClearForcedCameraTransform() {};
61 };
62 
64 
65 } // namespace RoR
RoR::IWater::GetStaticWaterHeight
virtual float GetStaticWaterHeight()=0
Returns static water level configured in 'terrn2'.
RoR::IWater::IWater
IWater()
Definition: IWater.h:35
RoR::IWater::CalcWavesHeight
virtual float CalcWavesHeight(Ogre::Vector3 pos)=0
ForwardDeclarations.h
Global forward declarations.
RoR::IWater::FrameStepWater
virtual void FrameStepWater(float dt)=0
RoR::IWater
< TODO: Mixed gfx+physics (waves) - must be separated ~ only_a_ptr, 02/2018
Definition: IWater.h:32
RoR::IWater::UpdateWater
virtual void UpdateWater()=0
RoR::IWater::CalcWavesVelocity
virtual Ogre::Vector3 CalcWavesVelocity(Ogre::Vector3 pos)=0
RoR::IWater::IsUnderWater
virtual bool IsUnderWater(Ogre::Vector3 pos)=0
RoR::IWater::UpdateReflectionPlane
virtual void UpdateReflectionPlane(float h)
Definition: IWater.h:54
RoR::IWater::SetForcedCameraTransform
virtual void SetForcedCameraTransform(Ogre::Radian fovy, Ogre::Vector3 pos, Ogre::Quaternion rot)
Definition: IWater.h:59
RoR::IWater::SetReflectionPlaneHeight
virtual void SetReflectionPlaneHeight(float centerheight)
Definition: IWater.h:53
RoR::IWater::~IWater
virtual ~IWater()
Definition: IWater.h:39
RoR::IWater::WaterPrepareShutdown
virtual void WaterPrepareShutdown()
Definition: IWater.h:55
RoR::IWater::SetWaterVisible
virtual void SetWaterVisible(bool value)=0
RoR::IWater::SetWaterBottomHeight
virtual void SetWaterBottomHeight(float value)
Definition: IWater.h:45
RoR::IWater::WaterSetSunPosition
virtual void WaterSetSunPosition(Ogre::Vector3)
Definition: IWater.h:50
RoR::IWater::SetWavesHeight
virtual void SetWavesHeight(float value)
Definition: IWater.h:46
RoR::IWater::SetStaticWaterHeight
virtual void SetStaticWaterHeight(float value)=0
RoR
Definition: AppContext.h:36
RoR::IWater::ClearForcedCameraTransform
virtual void ClearForcedCameraTransform()
Definition: IWater.h:60