25#ifndef _Hydrax_Modules_SimpleGrid_H_
26#define _Hydrax_Modules_SimpleGrid_H_
40namespace Hydrax{
namespace Module
81 const Size &_MeshSize)
100 const Size &_MeshSize,
101 const float &_Strength,
103 const bool &_ChoppyWaves,
104 const float &_ChoppyStrength)
145 void update(
const Ogre::Real &timeSinceLastFrame);
155 void saveCfg(Ogre::String &Data);
160 bool loadCfg(Ogre::ConfigFile &CfgFile);
166 float getHeigth(
const Ogre::Vector2 &Position);
NormalMode
Normal generation mode.
Base module class, Override it for create different ways of create water noise.
Hydrax simple grid module.
Hydrax * mHydrax
Our Hydrax pointer.
bool loadCfg(Ogre::ConfigFile &CfgFile)
Load config.
Mesh::POS_NORM_VERTEX * mVerticesChoppyBuffer
Use it to store vertex positions when choppy displacement is enabled.
void _performChoppyWaves()
Perform choppy waves.
void setOptions(const Options &Options)
Set options.
const Options & getOptions() const
Get current options.
Options mOptions
Our projected grid options.
float getHeigth(const Ogre::Vector2 &Position)
Get the current heigth at a especified world-space point.
void update(const Ogre::Real &timeSinceLastFrame)
Call it each frame.
void * mVertices
Vertex pointer (Mesh::POS_NORM_VERTEX or Mesh::POS_VERTEX)
void _calculeNormals()
Calcule current normals.
void saveCfg(Ogre::String &Data)
Save config.
Base noise class, Override it for create different ways of create water noise.
Vertex struct for position and normals data.
Struct wich contains Hydrax simple grid module options.
Options(const int &_Complexity, const Size &_MeshSize)
Constructor.
float ChoppyStrength
Choppy waves strength.
Options()
Default constructor.
Options(const int &_Complexity, const Size &_MeshSize, const float &_Strength, const bool &_Smooth, const bool &_ChoppyWaves, const float &_ChoppyStrength)
Constructor.
bool ChoppyWaves
Choppy waves.
int Complexity
Projected grid complexity (N*N)
Struct wich contains an especific width and height value.