RigsofRods
Soft-body Physics Simulation
|
Hydrax radial grid module. More...
#include <RadialGrid.h>
Data Structures | |
struct | Options |
Struct wich contains Hydrax simple grid module options. More... | |
Public Member Functions | |
RadialGrid (Hydrax *h, Noise::Noise *n, const MaterialManager::NormalMode &NormalMode) | |
Constructor. More... | |
RadialGrid (Hydrax *h, Noise::Noise *n, const MaterialManager::NormalMode &NormalMode, const Options &Options) | |
Constructor. More... | |
~RadialGrid () | |
Destructor. More... | |
void | create () |
Create. More... | |
void | remove () |
Remove. More... | |
void | update (const Ogre::Real &timeSinceLastFrame) |
Call it each frame. More... | |
void | setOptions (const Options &Options) |
Set options. More... | |
void | saveCfg (Ogre::String &Data) |
Save config. More... | |
bool | loadCfg (Ogre::ConfigFile &CfgFile) |
Load config. More... | |
float | getHeigth (const Ogre::Vector2 &Position) |
Get the current heigth at a especified world-space point. More... | |
const Options & | getOptions () const |
Get current options. More... | |
const bool | _createGeometry (Mesh *mMesh) const |
Create geometry in module(If special geometry is needed) More... | |
Public Member Functions inherited from Hydrax::Module::Module | |
Module (const Ogre::String &Name, Noise::Noise *n, const Mesh::Options &MeshOptions, const MaterialManager::NormalMode &NormalMode) | |
Constructor. More... | |
virtual | ~Module () |
Destructor. More... | |
void | setNoise (Noise::Noise *Noise, GPUNormalMapManager *g=0, const bool &DeleteOldNoise=true) |
Set noise. More... | |
const Ogre::String & | getName () const |
Get module name. More... | |
const bool & | isCreated () const |
Is created() called? More... | |
const MaterialManager::NormalMode & | getNormalMode () const |
Get the normal generation mode. More... | |
const Mesh::Options & | getMeshOptions () const |
Get the mesh options for this module. More... | |
Noise::Noise * | getNoise () |
Get the Hydrax::Noise module pointer. More... | |
Private Member Functions | |
void | _calculeNormals () |
Calcule current normals. More... | |
void | _performChoppyWaves () |
Perform choppy waves. More... | |
Private Attributes | |
void * | mVertices |
Vertex pointer (Mesh::POS_NORM_VERTEX or Mesh::POS_VERTEX) More... | |
Mesh::POS_NORM_VERTEX * | mVerticesChoppyBuffer |
Use it to store vertex positions when choppy displacement is enabled. More... | |
Options | mOptions |
Our projected grid options. More... | |
Hydrax * | mHydrax |
Our Hydrax pointer. More... | |
Additional Inherited Members | |
Protected Attributes inherited from Hydrax::Module::Module | |
Ogre::String | mName |
Module name. More... | |
Noise::Noise * | mNoise |
Noise generator pointer. More... | |
Mesh::Options | mMeshOptions |
Module mesh options. More... | |
MaterialManager::NormalMode | mNormalMode |
Normal map generation mode. More... | |
bool | mCreated |
Is create() called? More... | |
Hydrax radial grid module.
Definition at line 44 of file RadialGrid.h.
Hydrax::Module::RadialGrid::RadialGrid | ( | Hydrax * | h, |
Noise::Noise * | n, | ||
const MaterialManager::NormalMode & | NormalMode | ||
) |
Constructor.
h | Hydrax manager pointer |
n | Hydrax noise module |
NormalMode | Switch between MaterialManager::NM_VERTEX and Materialmanager::NM_RTT |
Definition at line 50 of file RadialGrid.cpp.
Hydrax::Module::RadialGrid::RadialGrid | ( | Hydrax * | h, |
Noise::Noise * | n, | ||
const MaterialManager::NormalMode & | NormalMode, | ||
const Options & | Options | ||
) |
Constructor.
h | Hydrax manager pointer |
n | Hydrax noise module |
NormalMode | Switch between MaterialManager::NM_VERTEX and Materialmanager::NM_RTT |
Options | Perlin options |
Definition at line 59 of file RadialGrid.cpp.
Hydrax::Module::RadialGrid::~RadialGrid | ( | ) |
|
private |
Calcule current normals.
Definition at line 528 of file RadialGrid.cpp.
|
virtual |
Create geometry in module(If special geometry is needed)
mMesh | Mesh |
Reimplemented from Hydrax::Module::Module.
Definition at line 254 of file RadialGrid.cpp.
|
private |
Perform choppy waves.
Definition at line 603 of file RadialGrid.cpp.
|
virtual |
Create.
Reimplemented from Hydrax::Module::Module.
Definition at line 173 of file RadialGrid.cpp.
|
virtual |
Get the current heigth at a especified world-space point.
Position | X/Z World position |
Reimplemented from Hydrax::Module::Module.
Definition at line 665 of file RadialGrid.cpp.
|
inline |
|
virtual |
Load config.
Reimplemented from Hydrax::Module::Module.
Definition at line 412 of file RadialGrid.cpp.
|
virtual |
Remove.
Reimplemented from Hydrax::Module::Module.
Definition at line 367 of file RadialGrid.cpp.
|
virtual |
Save config.
Data | String reference |
Reimplemented from Hydrax::Module::Module.
Definition at line 396 of file RadialGrid.cpp.
void Hydrax::Module::RadialGrid::setOptions | ( | const Options & | Options | ) |
Set options.
Definition at line 76 of file RadialGrid.cpp.
|
virtual |
Call it each frame.
timeSinceLastFrame | Time since last frame(delta) |
Reimplemented from Hydrax::Module::Module.
Definition at line 434 of file RadialGrid.cpp.
|
private |
Our Hydrax pointer.
Definition at line 231 of file RadialGrid.h.
|
private |
Our projected grid options.
Definition at line 228 of file RadialGrid.h.
|
private |
Vertex pointer (Mesh::POS_NORM_VERTEX or Mesh::POS_VERTEX)
Definition at line 222 of file RadialGrid.h.
|
private |
Use it to store vertex positions when choppy displacement is enabled.
Definition at line 225 of file RadialGrid.h.