RigsofRods
Soft-body Physics Simulation
|
#include <MeshManager.h>
Data Structures | |
struct | VERTEX |
Vertex struct. More... | |
Public Member Functions | |
MeshManager (SkyX *s) | |
Constructor. More... | |
~MeshManager () | |
Destructor. More... | |
void | create () |
Create our water mesh, geometry, entity, etc... More... | |
void | remove () |
Remove all resources. More... | |
void | updateGeometry (Ogre::Camera *cam) |
Update geometry. More... | |
Ogre::MeshPtr | getMesh () |
Get mesh. More... | |
Ogre::SubMesh * | getSubMesh () |
Get sub mesh. More... | |
Ogre::Entity * | getEntity () |
Get entity. More... | |
const Ogre::String & | getMaterialName () const |
Get material name. More... | |
void | setMaterialName (const Ogre::String &MaterialName) |
Set mesh material. More... | |
Ogre::HardwareVertexBufferSharedPtr & | getHardwareVertexBuffer () |
Get hardware vertex buffer reference. More... | |
Ogre::HardwareIndexBufferSharedPtr & | getHardwareIndexBuffer () |
Get hardware index buffer reference. More... | |
Ogre::SceneNode * | getSceneNode () |
Get the Ogre::SceneNode pointer where Hydrax mesh is attached. More... | |
const bool & | isCreated () const |
Is _createGeometry() called? More... | |
void | setGeometryParameters (const int &Steps, const int &Circles) |
Set geometry parameters. More... | |
const int & | getSteps () const |
Get number of steps. More... | |
const int & | getCircles () const |
Get number of circles. More... | |
void | setUnderHorizonParams (const int &UnderHorizonCircles=15, const bool &UnderHorizonFading=true, const Ogre::Real &UnderHorizonFadingExponent=1, const Ogre::Real &UnderHorizonFadingMultiplier=2) |
Set under-horizon rendering params. More... | |
const int & | getUnderHorizonCircles () const |
Get under-horizon circles. More... | |
const bool & | getUnderHorizonFading () const |
Get under-horizon fading. More... | |
const Ogre::Real & | getUnderHorizonFadingExponent () const |
Get under-horizon exponent fading. More... | |
const Ogre::Real & | getUnderHorizonFadingMultiplier () const |
Get under-horizon fading multiplier. More... | |
void | setRadiusMultiplier (const Ogre::Real &RadiusMultiplier) |
Set radius multiplier. More... | |
const float | getSkydomeRadius (Ogre::Camera *c) const |
Get skydome radius. More... | |
Private Member Functions | |
void | _createGeometry () |
Create geometry. More... | |
Private Attributes | |
bool | mCreated |
Has been create() already called? More... | |
Ogre::MeshPtr | mMesh |
Ogre::MeshPtr. More... | |
Ogre::SubMesh * | mSubMesh |
Ogre::Submesh pointer. More... | |
Ogre::Entity * | mEntity |
Ogre::Entity pointer. More... | |
Ogre::HardwareVertexBufferSharedPtr | mVertexBuffer |
Vertex buffer. More... | |
Ogre::HardwareIndexBufferSharedPtr | mIndexBuffer |
Index buffer. More... | |
VERTEX * | mVertices |
Vertices. More... | |
int | mCircles |
Circles. More... | |
int | mSteps |
Steps. More... | |
int | mUnderHorizonCircles |
Under-horizon rendering. More... | |
bool | mUnderHorizonFading |
Under-horizon fading. More... | |
Ogre::Real | mUnderHorizonFadingExponent |
Under-horizon exponent fading (1=linear fading) More... | |
Ogre::Real | mUnderHorizonFadingMultiplier |
Under-horizon fading multiplier: opacity = saturate(pow(opacity,fading_exp)*fading_multiplier) More... | |
Ogre::Real | mRadiusMultiplier |
Radius multiplier. More... | |
Ogre::SceneNode * | mSceneNode |
Ogre::SceneNode pointer. More... | |
Ogre::String | mMaterialName |
Material name. More... | |
SkyX * | mSkyX |
Main SkyX pointer. More... | |
Definition at line 33 of file MeshManager.h.
SkyX::MeshManager::MeshManager | ( | SkyX * | s | ) |
SkyX::MeshManager::~MeshManager | ( | ) |
Destructor.
Definition at line 51 of file MeshManager.cpp.
|
private |
Create geometry.
Definition at line 221 of file MeshManager.cpp.
void SkyX::MeshManager::create | ( | ) |
Create our water mesh, geometry, entity, etc...
Definition at line 82 of file MeshManager.cpp.
|
inline |
|
inline |
|
inline |
Get hardware index buffer reference.
Definition at line 121 of file MeshManager.h.
|
inline |
Get hardware vertex buffer reference.
Definition at line 113 of file MeshManager.h.
|
inline |
|
inline |
|
inline |
Get the Ogre::SceneNode pointer where Hydrax mesh is attached.
Definition at line 129 of file MeshManager.h.
const float SkyX::MeshManager::getSkydomeRadius | ( | Ogre::Camera * | c | ) | const |
Get skydome radius.
c | Camera |
Definition at line 360 of file MeshManager.cpp.
|
inline |
|
inline |
|
inline |
Get under-horizon circles.
Definition at line 180 of file MeshManager.h.
|
inline |
|
inline |
Get under-horizon exponent fading.
Definition at line 196 of file MeshManager.h.
|
inline |
Get under-horizon fading multiplier.
Definition at line 204 of file MeshManager.h.
|
inline |
Is _createGeometry() called?
Definition at line 137 of file MeshManager.h.
void SkyX::MeshManager::remove | ( | ) |
Remove all resources.
Definition at line 56 of file MeshManager.cpp.
void SkyX::MeshManager::setGeometryParameters | ( | const int & | Steps, |
const int & | Circles | ||
) |
Set geometry parameters.
Steps | Sphere number of steps |
Circles | Spehere number of circes |
Definition at line 322 of file MeshManager.cpp.
void SkyX::MeshManager::setMaterialName | ( | const Ogre::String & | MaterialName | ) |
Set mesh material.
MaterialName | The material name |
Definition at line 350 of file MeshManager.cpp.
|
inline |
Set radius multiplier.
RadiusMultiplier | Radius multiplier |
Definition at line 214 of file MeshManager.h.
void SkyX::MeshManager::setUnderHorizonParams | ( | const int & | UnderHorizonCircles = 15 , |
const bool & | UnderHorizonFading = true , |
||
const Ogre::Real & | UnderHorizonFadingExponent = 1 , |
||
const Ogre::Real & | UnderHorizonFadingMultiplier = 2 |
||
) |
Set under-horizon rendering params.
UnderHorizonCircles | Number of circles of SkyX::MeshManager::mCircles reserved for the under-horizont geometry part, 0 means not under-horizon rendering |
UnderHorizonFading | true/false to fade or not the under-horizon sky |
UnderHorizonFadingExponent | Exponent of the fading, pow(vertex_angle, exp), 1=linear |
UnderHorizonFadingMultiplier | Fading multiplier, opacity = saturate(pow(opacity,fading_exp)*fading_multiplier) |
Definition at line 334 of file MeshManager.cpp.
void SkyX::MeshManager::updateGeometry | ( | Ogre::Camera * | cam | ) |
Update geometry.
cam | Camera |
Definition at line 117 of file MeshManager.cpp.
|
private |
Circles.
Definition at line 249 of file MeshManager.h.
|
private |
Has been create() already called?
Definition at line 231 of file MeshManager.h.
|
private |
Ogre::Entity pointer.
Definition at line 238 of file MeshManager.h.
|
private |
Index buffer.
Definition at line 243 of file MeshManager.h.
|
private |
Material name.
Definition at line 269 of file MeshManager.h.
|
private |
Ogre::MeshPtr.
Definition at line 234 of file MeshManager.h.
|
private |
Radius multiplier.
Definition at line 263 of file MeshManager.h.
|
private |
Ogre::SceneNode pointer.
Definition at line 266 of file MeshManager.h.
|
private |
Main SkyX pointer.
Definition at line 272 of file MeshManager.h.
|
private |
Steps.
Definition at line 251 of file MeshManager.h.
|
private |
Ogre::Submesh pointer.
Definition at line 236 of file MeshManager.h.
|
private |
Under-horizon rendering.
Definition at line 254 of file MeshManager.h.
|
private |
Under-horizon fading.
Definition at line 256 of file MeshManager.h.
|
private |
Under-horizon exponent fading (1=linear fading)
Definition at line 258 of file MeshManager.h.
|
private |
Under-horizon fading multiplier: opacity = saturate(pow(opacity,fading_exp)*fading_multiplier)
Definition at line 260 of file MeshManager.h.
|
private |
Vertex buffer.
Definition at line 241 of file MeshManager.h.
|
private |
Vertices.
Definition at line 246 of file MeshManager.h.