RigsofRods
Soft-body Physics Simulation
|
Hydrax simple grid module. More...
#include <SimpleGrid.h>
Data Structures | |
struct | Options |
Struct wich contains Hydrax simple grid module options. More... | |
Public Member Functions | |
SimpleGrid (Hydrax *h, Noise::Noise *n, const MaterialManager::NormalMode &NormalMode) | |
Constructor. More... | |
SimpleGrid (Hydrax *h, Noise::Noise *n, const MaterialManager::NormalMode &NormalMode, const Options &Options) | |
Constructor. More... | |
~SimpleGrid () | |
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... | |
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... | |
virtual const bool | _createGeometry (Mesh *mMesh) const |
Create geometry in module(If special geometry is needed) 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 simple grid module.
Definition at line 44 of file SimpleGrid.h.
Hydrax::Module::SimpleGrid::SimpleGrid | ( | 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 SimpleGrid.cpp.
Hydrax::Module::SimpleGrid::SimpleGrid | ( | 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 SimpleGrid.cpp.
Hydrax::Module::SimpleGrid::~SimpleGrid | ( | ) |
|
private |
Calcule current normals.
Definition at line 371 of file SimpleGrid.cpp.
|
private |
Perform choppy waves.
Definition at line 406 of file SimpleGrid.cpp.
|
virtual |
Create.
Reimplemented from Hydrax::Module::Module.
Definition at line 155 of file SimpleGrid.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 433 of file SimpleGrid.cpp.
|
inline |
|
virtual |
Load config.
Reimplemented from Hydrax::Module::Module.
Definition at line 249 of file SimpleGrid.cpp.
|
virtual |
Remove.
Reimplemented from Hydrax::Module::Module.
Definition at line 208 of file SimpleGrid.cpp.
|
virtual |
Save config.
Data | String reference |
Reimplemented from Hydrax::Module::Module.
Definition at line 237 of file SimpleGrid.cpp.
void Hydrax::Module::SimpleGrid::setOptions | ( | const Options & | Options | ) |
Set options.
Definition at line 76 of file SimpleGrid.cpp.
|
virtual |
Call it each frame.
timeSinceLastFrame | Time since last frame(delta) |
Reimplemented from Hydrax::Module::Module.
Definition at line 267 of file SimpleGrid.cpp.
|
private |
Our Hydrax pointer.
Definition at line 195 of file SimpleGrid.h.
|
private |
Our projected grid options.
Definition at line 192 of file SimpleGrid.h.
|
private |
Vertex pointer (Mesh::POS_NORM_VERTEX or Mesh::POS_VERTEX)
Definition at line 186 of file SimpleGrid.h.
|
private |
Use it to store vertex positions when choppy displacement is enabled.
Definition at line 189 of file SimpleGrid.h.