RigsofRods
Soft-body Physics Simulation
|
Base module class, Override it for create different ways of create water noise. More...
#include <Module.h>
Public Member Functions | |
Module (const Ogre::String &Name, Noise::Noise *n, const Mesh::Options &MeshOptions, const MaterialManager::NormalMode &NormalMode) | |
Constructor. More... | |
virtual | ~Module () |
Destructor. More... | |
virtual void | create () |
Create. More... | |
virtual void | remove () |
Remove. More... | |
void | setNoise (Noise::Noise *Noise, GPUNormalMapManager *g=0, const bool &DeleteOldNoise=true) |
Set noise. More... | |
virtual void | update (const Ogre::Real &timeSinceLastFrame) |
Call it each frame. More... | |
virtual void | saveCfg (Ogre::String &Data) |
Save config. More... | |
virtual bool | loadCfg (Ogre::ConfigFile &CfgFile) |
Load config. 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... | |
virtual float | getHeigth (const Ogre::Vector2 &Position) |
Get the current heigth at a especified world-space point. More... | |
Protected Attributes | |
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... | |
Base module class, Override it for create different ways of create water noise.
Hydrax::Module::Module::Module | ( | const Ogre::String & | Name, |
Noise::Noise * | n, | ||
const Mesh::Options & | MeshOptions, | ||
const MaterialManager::NormalMode & | NormalMode | ||
) |
Constructor.
Name | Module name |
n | Hydrax::Noise::Noise generator pointer |
MeshOptions | Mesh options |
NormalMode | Normal generation mode |
Definition at line 29 of file Module.cpp.
|
virtual |
Destructor.
Definition at line 41 of file Module.cpp.
|
inlinevirtual |
Create geometry in module(If special geometry is needed)
mMesh | Mesh |
Reimplemented in Hydrax::Module::RadialGrid.
Definition at line 117 of file Module.h.
|
virtual |
Create.
Reimplemented in Hydrax::Module::ProjectedGrid, Hydrax::Module::RadialGrid, and Hydrax::Module::SimpleGrid.
Definition at line 46 of file Module.cpp.
|
virtual |
Get the current heigth at a especified world-space point.
Position | X/Z World position |
Reimplemented in Hydrax::Module::ProjectedGrid, Hydrax::Module::RadialGrid, and Hydrax::Module::SimpleGrid.
Definition at line 117 of file Module.cpp.
|
inline |
|
inline |
|
inline |
Get the Hydrax::Noise module pointer.
Definition at line 141 of file Module.h.
|
inline |
|
inline |
|
virtual |
Load config.
Reimplemented in Hydrax::Module::ProjectedGrid, Hydrax::Module::RadialGrid, and Hydrax::Module::SimpleGrid.
Definition at line 105 of file Module.cpp.
|
virtual |
Remove.
Reimplemented in Hydrax::Module::ProjectedGrid, Hydrax::Module::RadialGrid, and Hydrax::Module::SimpleGrid.
Definition at line 53 of file Module.cpp.
|
virtual |
Save config.
Data | String reference |
Reimplemented in Hydrax::Module::ProjectedGrid, Hydrax::Module::RadialGrid, and Hydrax::Module::SimpleGrid.
Definition at line 99 of file Module.cpp.
void Hydrax::Module::Module::setNoise | ( | Noise::Noise * | Noise, |
GPUNormalMapManager * | g = 0 , |
||
const bool & | DeleteOldNoise = true |
||
) |
Set noise.
Noise | New noise module |
g | GPUNormalMapManager pointer, default: NULL, use it if GPU Normal map generation is needed |
DeleteOldNoise | Delete the old noise module (Default = true) |
Definition at line 60 of file Module.cpp.
|
virtual |
Call it each frame.
timeSinceLastFrame | Time since last frame(delta) |
Reimplemented in Hydrax::Module::ProjectedGrid, Hydrax::Module::RadialGrid, and Hydrax::Module::SimpleGrid.
Definition at line 94 of file Module.cpp.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |