|
RigsofRods
Soft-body Physics Simulation
|
Go to the documentation of this file.
25 #ifndef _Hydrax_Modules_RadialGrid_H_
26 #define _Hydrax_Modules_RadialGrid_H_
40 namespace Hydrax{
namespace Module
123 const float &_Radius,
125 const bool &_ChoppyWaves,
126 const float &_ChoppyStrength,
127 const float &_StepSizeCube,
128 const float &_StepSizeFive,
129 const float &_StepSizeLin,
130 const float &_Strength)
175 void update(
const Ogre::Real &timeSinceLastFrame);
185 void saveCfg(Ogre::String &Data);
190 bool loadCfg(Ogre::ConfigFile &CfgFile);
196 float getHeigth(
const Ogre::Vector2 &Position);
void update(const Ogre::Real &timeSinceLastFrame)
Call it each frame.
void saveCfg(Ogre::String &Data)
Save config.
Options(const int &_Steps, const int &_Circles, const float &_Radius, const bool &_Smooth, const bool &_ChoppyWaves, const float &_ChoppyStrength, const float &_StepSizeCube, const float &_StepSizeFive, const float &_StepSizeLin, const float &_Strength)
Constructor.
Hydrax radial grid module.
const bool _createGeometry(Mesh *mMesh) const
Create geometry in module(If special geometry is needed)
int Circles
Number of circles.
float StepSizeFive
Step size five.
void _calculeNormals()
Calcule current normals.
const Options & getOptions() const
Get current options.
float StepSizeLin
Step lin size.
Options mOptions
Our projected grid options.
float getHeigth(const Ogre::Vector2 &Position)
Get the current heigth at a especified world-space point.
Mesh::POS_NORM_VERTEX * mVerticesChoppyBuffer
Use it to store vertex positions when choppy displacement is enabled.
Options(const int &_Steps, const int &_Circles, const float &_Radius)
Constructor.
Base noise class, Override it for create different ways of create water noise.
NormalMode
Normal generation mode.
Hydrax * mHydrax
Our Hydrax pointer.
Base module class, Override it for create different ways of create water noise.
float StepSizeCube
Step cube size.
Class wich contains all funtions/variables related to Hydrax water mesh.
Options()
Default constructor.
float Strength
Water strength.
void setOptions(const Options &Options)
Set options.
bool loadCfg(Ogre::ConfigFile &CfgFile)
Load config.
void * mVertices
Vertex pointer (Mesh::POS_NORM_VERTEX or Mesh::POS_VERTEX)
Vertex struct for position and normals data.
Struct wich contains Hydrax simple grid module options.
float ChoppyStrength
Choppy waves strength.
float Radius
Radius (In world units)
int Steps
Number of steps (Per circle)
void _performChoppyWaves()
Perform choppy waves.
bool ChoppyWaves
Choppy waves.
RadialGrid(Hydrax *h, Noise::Noise *n, const MaterialManager::NormalMode &NormalMode)
Constructor.