25#ifndef _Hydrax_Mesh_H_
26#define _Hydrax_Mesh_H_
124 Options(
const int &meshComplexity,
const Size &meshSize,
const float &meshStrength,
const VertexType &meshVertexType)
124 Options(
const int &meshComplexity,
const Size &meshSize,
const float &meshStrength,
const VertexType &meshVertexType) {
…}
Class wich contains all funtions/variables related to Hydrax water mesh.
void _createGeometry()
Create mesh geometry.
const Ogre::String & getMaterialName() const
Get material name.
const Size & getSize() const
Get mesh size.
Ogre::SubMesh * mSubMesh
Ogre::Submesh pointer.
Ogre::Vector2 getGridPosition(const Ogre::Vector2 &Position)
Get the [0,1] range x/y grid position from a 2D world space x/z point.
Ogre::HardwareIndexBufferSharedPtr & getHardwareIndexBuffer()
Get hardware index buffer reference.
void create()
Create our water mesh, geometry, entity, etc...
const Ogre::Vector3 getObjectSpacePosition(const Ogre::Vector3 &WorldSpacePosition) const
Get the object-space position from world-space position.
Hydrax * mHydrax
Hydrax pointer.
const VertexType & getVertexType() const
Get vertex type return Mesh vertex type.
void setMaterialName(const Ogre::String &MaterialName)
Set mesh material.
void remove()
Remove all resources.
const int & getNumFaces() const
Get number of faces.
VertexType
Mesh vertex type enum.
Ogre::String mMaterialName
Material name.
Ogre::Entity * mEntity
Ogre::Entity pointer.
Ogre::SceneNode * mSceneNode
Ogre::SceneNode pointer.
Ogre::SubMesh * getSubMesh()
Get sub mesh.
void setOptions(const Options &Options)
Update options.
Ogre::HardwareVertexBufferSharedPtr mVertexBuffer
Vertex buffer.
Options mOptions
Mesh options.
Ogre::Entity * getEntity()
Get entity.
bool updateGeometry(const int &numVer, void *verArray)
Update geomtry.
const bool & isCreated() const
Is _createGeometry() called?
const int & getNumVertices() const
Get number of vertices.
Ogre::HardwareVertexBufferSharedPtr & getHardwareVertexBuffer()
Get hardware vertex buffer reference.
Ogre::HardwareIndexBufferSharedPtr mIndexBuffer
Index buffer.
Ogre::MeshPtr getMesh()
Get mesh.
const Options & getOptions() const
Get options.
int mNumFaces
Number of faces.
bool mCreated
Is _createGeometry() called?
Ogre::SceneNode * getSceneNode()
Get the Ogre::SceneNode pointer where Hydrax mesh is attached.
int mNumVertices
Number of vertices.
Ogre::MeshPtr mMesh
Ogre::MeshPtr.
const Ogre::Vector3 getWorldSpacePosition(const Ogre::Vector3 &ObjectSpacePosition) const
Get the world-space position from object-space position.
bool isPointInGrid(const Ogre::Vector2 &Position)
Get if a Position point is inside of the grid.
Base Hydrax mesh options.
VertexType MeshVertexType
Vertex type.
Size MeshSize
Grid size (X/Z) world space.
Options(const int &meshComplexity, const Size &meshSize, const VertexType &meshVertexType)
Constructor.
Options(const int &meshComplexity, const Size &meshSize, const float &meshStrength, const VertexType &meshVertexType)
Constructor.
float MeshStrength
Water strength.
int MeshComplexity
Mesh complexity.
Vertex struct for position, normals and uv data.
Vertex struct for position and normals data.
Vertex struct for position and uv data.
Vertex struct for position data.
Struct wich contains an especific width and height value.