42 , waterHeight(water_height)
43 , waveHeight(water_height)
44 , CurrentConfigFile(conf_file)
67 Ogre::Plane(Ogre::Vector3::UNIT_Y, 0),
78 if (Root::getSingleton().getRenderSystem()->getName() ==
"Direct3D9 Rendering Subsystem" || Root::getSingleton().getRenderSystem()->getName() ==
"Direct3D11 Rendering Subsystem")
98 sunPosition -= sky->GetCaelumSys()->getSun()->getLightDirection() * 80000;
100 mHydrax->
setSunColor(Ogre::Vector3(sky->GetCaelumSys()->getSun()->getBodyColour().r, sky->GetCaelumSys()->getSun()->getBodyColour().g, sky->GetCaelumSys()->getSun()->getBodyColour().b));
System integration layer; inspired by OgreBites::ApplicationContext.
Game state manager and message-queue provider.
void remove()
Remove hydrax, you can call this method to remove Hydrax from the scene or release (secondary) Hydrax...
const bool loadCfg(const Ogre::String &File) const
Load config from file.
void setShaderMode(const MaterialManager::ShaderMode &ShaderMode)
Set shader mode.
void setPosition(const Ogre::Vector3 &Position)
Set water position.
void setVisible(const bool &Visible)
Show/Hide hydrax water.
void setModule(Module::Module *Module, const bool &DeleteOldModule=true)
Set Hydrax module.
void setSunPosition(const Ogre::Vector3 &SunPosition)
Set sun position.
void create()
Create all resources according with current Hydrax components and add Hydrax to the scene.
void update(const Ogre::Real &timeSinceLastFrame)
Call every frame.
void setSunColor(const Ogre::Vector3 &SunColor)
Set sun color.
Base module class, Override it for create different ways of create water noise.
Hydrax projected grid module.
Perlin noise module class.
Ogre::SceneNode * GetCameraNode()
Ogre::Camera * GetCamera()
const TerrainPtr & GetTerrain()
Ogre::String CurrentConfigFile
HydraxWater(float waterHeight, Ogre::String configFile="HydraxDefault.hdx")
void WaterSetSunPosition(Ogre::Vector3) override
void FrameStepWater(float dt) override
void UpdateWater() override
Hydrax::Module::ProjectedGrid * mModule
Hydrax::Noise::Perlin * waternoise
void SetWaterVisible(bool value) override
SkyManager * getSkyManager()
float GetStaticWaterHeight()
Returns static water level configured in 'terrn2'.
AppContext * GetAppContext()
CameraManager * GetCameraManager()
GameContext * GetGameContext()
Struct wich contains Hydrax projected grid module options.