Hydrax projected grid module.
More...
#include <ProjectedGrid.h>
|
| ProjectedGrid (Hydrax *h, Noise::Noise *n, const Ogre::Plane &BasePlane, const MaterialManager::NormalMode &NormalMode) |
| Constructor. More...
|
|
| ProjectedGrid (Hydrax *h, Noise::Noise *n, const Ogre::Plane &BasePlane, const MaterialManager::NormalMode &NormalMode, const Options &Options) |
| Constructor. More...
|
|
| ~ProjectedGrid () |
| 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...
|
|
| 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...
|
|
Hydrax projected grid module.
Definition at line 50 of file ProjectedGrid.h.
◆ ProjectedGrid() [1/2]
◆ ProjectedGrid() [2/2]
◆ ~ProjectedGrid()
Hydrax::Module::ProjectedGrid::~ProjectedGrid |
( |
| ) |
|
◆ _calculeNormals()
void Hydrax::Module::ProjectedGrid::_calculeNormals |
( |
| ) |
|
|
private |
◆ _calculeWorldPosition()
Ogre::Vector4 Hydrax::Module::ProjectedGrid::_calculeWorldPosition |
( |
const Ogre::Vector2 & |
uv, |
|
|
const Ogre::Matrix4 & |
m, |
|
|
const Ogre::Matrix4 & |
_viewMat |
|
) |
| |
|
private |
Calcule world position.
- Parameters
-
uv | uv |
m | Range |
_viewMat | View matrix |
- Returns
- The position in homogenous coordinates
Definition at line 620 of file ProjectedGrid.cpp.
◆ _getMinMax()
bool Hydrax::Module::ProjectedGrid::_getMinMax |
( |
Ogre::Matrix4 * |
range | ) |
|
|
private |
Get min/max.
- Parameters
-
- Returns
- true if it's in min/max
Definition at line 645 of file ProjectedGrid.cpp.
◆ _performChoppyWaves()
void Hydrax::Module::ProjectedGrid::_performChoppyWaves |
( |
| ) |
|
|
private |
◆ _renderGeometry()
bool Hydrax::Module::ProjectedGrid::_renderGeometry |
( |
const Ogre::Matrix4 & |
m, |
|
|
const Ogre::Matrix4 & |
_viewMat, |
|
|
const Ogre::Vector3 & |
WorldPos |
|
) |
| |
|
private |
Render geometry.
- Parameters
-
m | Range |
_viewMat | View matrix |
WorldPos | Origin world position |
- Returns
- true if it's sucesfful
Definition at line 372 of file ProjectedGrid.cpp.
◆ _setDisplacementAmplitude()
void Hydrax::Module::ProjectedGrid::_setDisplacementAmplitude |
( |
const float & |
Amplitude | ) |
|
|
private |
Set displacement amplitude.
- Parameters
-
Amplitude | Amplitude to set |
Definition at line 832 of file ProjectedGrid.cpp.
◆ create()
void Hydrax::Module::ProjectedGrid::create |
( |
| ) |
|
|
virtual |
◆ getHeigth()
float Hydrax::Module::ProjectedGrid::getHeigth |
( |
const Ogre::Vector2 & |
Position | ) |
|
|
virtual |
Get the current heigth at a especified world-space point.
- Parameters
-
Position | X/Z World position |
- Returns
- Heigth at the given position in y-World coordinates, if it's outside of the water return -1
Reimplemented from Hydrax::Module::Module.
Definition at line 838 of file ProjectedGrid.cpp.
◆ getOptions()
const Options& Hydrax::Module::ProjectedGrid::getOptions |
( |
| ) |
const |
|
inline |
Get current options.
- Returns
- Current options
Definition at line 204 of file ProjectedGrid.h.
◆ loadCfg()
bool Hydrax::Module::ProjectedGrid::loadCfg |
( |
Ogre::ConfigFile & |
CfgFile | ) |
|
|
virtual |
◆ remove()
void Hydrax::Module::ProjectedGrid::remove |
( |
| ) |
|
|
virtual |
◆ saveCfg()
void Hydrax::Module::ProjectedGrid::saveCfg |
( |
Ogre::String & |
Data | ) |
|
|
virtual |
◆ setOptions()
void Hydrax::Module::ProjectedGrid::setOptions |
( |
const Options & |
Options | ) |
|
◆ update()
void Hydrax::Module::ProjectedGrid::update |
( |
const Ogre::Real & |
timeSinceLastFrame | ) |
|
|
virtual |
◆ mBasePlane
Ogre::Plane Hydrax::Module::ProjectedGrid::mBasePlane |
|
private |
◆ mHydrax
Hydrax* Hydrax::Module::ProjectedGrid::mHydrax |
|
private |
◆ mLastMinMax
bool Hydrax::Module::ProjectedGrid::mLastMinMax |
|
private |
◆ mLastOrientation
Ogre::Quaternion Hydrax::Module::ProjectedGrid::mLastOrientation |
|
private |
◆ mLastPosition
Ogre::Vector3 Hydrax::Module::ProjectedGrid::mLastPosition |
|
private |
◆ mLowerBoundPlane
Ogre::Plane Hydrax::Module::ProjectedGrid::mLowerBoundPlane |
|
private |
◆ mNormal
Ogre::Vector3 Hydrax::Module::ProjectedGrid::mNormal |
|
private |
◆ mOptions
Options Hydrax::Module::ProjectedGrid::mOptions |
|
private |
◆ mPos
Ogre::Vector3 Hydrax::Module::ProjectedGrid::mPos |
|
private |
◆ mProjectingCamera
Ogre::Camera* Hydrax::Module::ProjectedGrid::mProjectingCamera |
|
private |
◆ mRange
Ogre::Matrix4 Hydrax::Module::ProjectedGrid::mRange |
|
private |
◆ mRenderingCamera
Ogre::Camera * Hydrax::Module::ProjectedGrid::mRenderingCamera |
|
private |
◆ mTmpRndrngCamera
Ogre::Camera * Hydrax::Module::ProjectedGrid::mTmpRndrngCamera |
|
private |
◆ mUpperBoundPlane
Ogre::Plane Hydrax::Module::ProjectedGrid::mUpperBoundPlane |
|
private |
◆ mVertices
void* Hydrax::Module::ProjectedGrid::mVertices |
|
private |
◆ mVerticesChoppyBuffer
Use it to store vertex positions when choppy displacement is enabled.
Definition at line 249 of file ProjectedGrid.h.
◆ t_corners0
Ogre::Vector4 Hydrax::Module::ProjectedGrid::t_corners0 |
|
private |
◆ t_corners1
Ogre::Vector4 Hydrax::Module::ProjectedGrid::t_corners1 |
|
private |
◆ t_corners2
Ogre::Vector4 Hydrax::Module::ProjectedGrid::t_corners2 |
|
private |
◆ t_corners3
Ogre::Vector4 Hydrax::Module::ProjectedGrid::t_corners3 |
|
private |
The documentation for this class was generated from the following files: