RigsofRods
Soft-body Physics Simulation
Public Member Functions | Private Attributes
Hydrax::DecalsManager Class Reference

Decals manager class. More...

#include <DecalsManager.h>

+ Collaboration diagram for Hydrax::DecalsManager:

Public Member Functions

 DecalsManager (Hydrax *h)
 Constructor. More...
 
 ~DecalsManager ()
 Destructor. More...
 
void update ()
 Update decal manager. More...
 
Decaladd (const Ogre::String &TextureName)
 Add decal. More...
 
Decalget (const int &Id)
 Get decal. More...
 
void remove (const int &Id)
 Remove decal. More...
 
void removeAll ()
 Remove all decals. More...
 
void registerAll ()
 Register all decals. More...
 
std::vector< Decal * > getDecals ()
 Get decals std::vector. More...
 
const Ogre::Real _getWaterStrength () const
 Get water strength (used for decals culling) More...
 
void _setWaterStrength (const Ogre::Real &WaterStrength)
 Set water strength (used for decals culling) More...
 
void _forceToUpdate ()
 Call to force to update decals. More...
 

Private Attributes

std::vector< Decal * > mDecals
 Decals std::vector. More...
 
std::vector< Decal * >::iterator DecalIt
 Decal iterator. More...
 
int mNextId
 Next Id. More...
 
Ogre::Real mWaterStrength
 Water strength (For decals culling) More...
 
Ogre::Vector3 mLastPosition
 Last camera position, orientation, underwater. More...
 
Ogre::Quaternion mLastOrientation
 
bool mLastUnderwater
 
bool mForceToUpdate
 
HydraxmHydrax
 Hydrax parent pointer. More...
 

Detailed Description

Decals manager class.

Use it for place any kind of texture over the water! Like ship trails, overwater vegetables, ...

Definition at line 202 of file DecalsManager.h.

Constructor & Destructor Documentation

◆ DecalsManager()

Hydrax::DecalsManager::DecalsManager ( Hydrax h)

Constructor.

Parameters
hHydrax parent pointer

Definition at line 138 of file DecalsManager.cpp.

◆ ~DecalsManager()

Hydrax::DecalsManager::~DecalsManager ( )

Destructor.

Definition at line 147 of file DecalsManager.cpp.

Member Function Documentation

◆ _forceToUpdate()

void Hydrax::DecalsManager::_forceToUpdate ( )
inline

Call to force to update decals.

Definition at line 271 of file DecalsManager.h.

+ Here is the caller graph for this function:

◆ _getWaterStrength()

const Ogre::Real Hydrax::DecalsManager::_getWaterStrength ( ) const
inline

Get water strength (used for decals culling)

Returns
Water strength

Definition at line 256 of file DecalsManager.h.

◆ _setWaterStrength()

void Hydrax::DecalsManager::_setWaterStrength ( const Ogre::Real &  WaterStrength)
inline

Set water strength (used for decals culling)

Parameters
WaterStrengthWater strength

Definition at line 264 of file DecalsManager.h.

◆ add()

Decal * Hydrax::DecalsManager::add ( const Ogre::String &  TextureName)

Add decal.

Parameters
TextureNameTexture name
Returns
Hydrax::Decal* Use it as a usual Ogre::SceneNode(Decal::getSceneNode()) for position, rotate...etc!

Definition at line 248 of file DecalsManager.cpp.

+ Here is the call graph for this function:

◆ get()

Decal * Hydrax::DecalsManager::get ( const int &  Id)

Get decal.

Parameters
IdDecal Id
Returns
Hydrax::Decal*

Definition at line 266 of file DecalsManager.cpp.

◆ getDecals()

std::vector<Decal*> Hydrax::DecalsManager::getDecals ( )
inline

Get decals std::vector.

Returns
std::vector<Decal*> list

Definition at line 248 of file DecalsManager.h.

◆ registerAll()

void Hydrax::DecalsManager::registerAll ( )

Register all decals.

Remarks
Use it when water material is (re)created

Definition at line 305 of file DecalsManager.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ remove()

void Hydrax::DecalsManager::remove ( const int &  Id)

Remove decal.

Parameters
IdDecal Id

Definition at line 279 of file DecalsManager.cpp.

◆ removeAll()

void Hydrax::DecalsManager::removeAll ( )

Remove all decals.

Definition at line 293 of file DecalsManager.cpp.

◆ update()

void Hydrax::DecalsManager::update ( )

Update decal manager.

Remarks
Call each frame

Definition at line 157 of file DecalsManager.cpp.

+ Here is the call graph for this function:

Field Documentation

◆ DecalIt

std::vector<Decal*>::iterator Hydrax::DecalsManager::DecalIt
private

Decal iterator.

Definition at line 280 of file DecalsManager.h.

◆ mDecals

std::vector<Decal*> Hydrax::DecalsManager::mDecals
private

Decals std::vector.

Definition at line 278 of file DecalsManager.h.

◆ mForceToUpdate

bool Hydrax::DecalsManager::mForceToUpdate
private

Definition at line 291 of file DecalsManager.h.

◆ mHydrax

Hydrax* Hydrax::DecalsManager::mHydrax
private

Hydrax parent pointer.

Definition at line 294 of file DecalsManager.h.

◆ mLastOrientation

Ogre::Quaternion Hydrax::DecalsManager::mLastOrientation
private

Definition at line 289 of file DecalsManager.h.

◆ mLastPosition

Ogre::Vector3 Hydrax::DecalsManager::mLastPosition
private

Last camera position, orientation, underwater.

Definition at line 288 of file DecalsManager.h.

◆ mLastUnderwater

bool Hydrax::DecalsManager::mLastUnderwater
private

Definition at line 290 of file DecalsManager.h.

◆ mNextId

int Hydrax::DecalsManager::mNextId
private

Next Id.

Definition at line 282 of file DecalsManager.h.

◆ mWaterStrength

Ogre::Real Hydrax::DecalsManager::mWaterStrength
private

Water strength (For decals culling)

Definition at line 285 of file DecalsManager.h.


The documentation for this class was generated from the following files: