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

Class to manager GPU normal maps. More...

#include <GPUNormalMapManager.h>

+ Collaboration diagram for Hydrax::GPUNormalMapManager:

Public Member Functions

 GPUNormalMapManager (Hydrax *h)
 Constructor. More...
 
 ~GPUNormalMapManager ()
 Destructor. More...
 
void create ()
 Create. More...
 
void remove ()
 Remove. More...
 
void setActive (const bool &Active)
 Set active. More...
 
const bool & isCreated () const
 Has been created() already called? More...
 
HydraxgetHydrax ()
 Get the Hydrax parent pointer. More...
 
Ogre::MaterialPtr & getNormalMapMaterial ()
 Get the normal map material. More...
 
Ogre::TexturePtr & getTexture (const int &Index)
 Get a texture. More...
 
void addTexture (Ogre::TexturePtr &Texture)
 Create a texture. More...
 
void removeTexture (const int &Index)
 Remove a texture. More...
 

Private Attributes

HydraxmHydrax
 Hydrax main pointer. More...
 
RttManagermRttManager
 Rtt manager pointer. More...
 
bool mCreated
 Has been create() already called? More...
 
Ogre::MaterialPtr mNormalMapMaterial
 This material must be created in the noise module, in order to be according with the Hydrax modulable interface in all cases the Fragment program must have a 'uStrength' parameter will represents the intensity of the normals. More...
 
std::vector< Ogre::TexturePtr > mTextures
 The normal map material needs some textures wich will be filled by code. More...
 

Detailed Description

Class to manager GPU normal maps.

Definition at line 45 of file GPUNormalMapManager.h.

Constructor & Destructor Documentation

◆ GPUNormalMapManager()

Hydrax::GPUNormalMapManager::GPUNormalMapManager ( Hydrax h)

Constructor.

Parameters
hHydrax main pointer

Definition at line 31 of file GPUNormalMapManager.cpp.

+ Here is the call graph for this function:

◆ ~GPUNormalMapManager()

Hydrax::GPUNormalMapManager::~GPUNormalMapManager ( )

Destructor.

Definition at line 42 of file GPUNormalMapManager.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ addTexture()

void Hydrax::GPUNormalMapManager::addTexture ( Ogre::TexturePtr &  Texture)
inline

Create a texture.

Parameters
TextureOgre::TexturePtr

Definition at line 119 of file GPUNormalMapManager.h.

+ Here is the caller graph for this function:

◆ create()

void Hydrax::GPUNormalMapManager::create ( )

Create.

Remarks
mNormalMapMaterial must have been created by the noise module before calling create()

Definition at line 47 of file GPUNormalMapManager.cpp.

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

◆ getHydrax()

Hydrax* Hydrax::GPUNormalMapManager::getHydrax ( )
inline

Get the Hydrax parent pointer.

Remarks
Needed by noise module in order to acced to the MaterialManager to create vertex/fragment programs and more if needed.

Definition at line 94 of file GPUNormalMapManager.h.

+ Here is the caller graph for this function:

◆ getNormalMapMaterial()

Ogre::MaterialPtr& Hydrax::GPUNormalMapManager::getNormalMapMaterial ( )
inline

Get the normal map material.

Returns
Normal map generator material

Definition at line 102 of file GPUNormalMapManager.h.

+ Here is the caller graph for this function:

◆ getTexture()

Ogre::TexturePtr& Hydrax::GPUNormalMapManager::getTexture ( const int &  Index)
inline

Get a texture.

Parameters
IndexTexture index
Returns
Ogre::TexturePtr

Definition at line 111 of file GPUNormalMapManager.h.

+ Here is the caller graph for this function:

◆ isCreated()

const bool& Hydrax::GPUNormalMapManager::isCreated ( ) const
inline

Has been created() already called?

Returns
true if yes, false if not

Definition at line 84 of file GPUNormalMapManager.h.

◆ remove()

void Hydrax::GPUNormalMapManager::remove ( )

Remove.

Definition at line 61 of file GPUNormalMapManager.cpp.

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

◆ removeTexture()

void Hydrax::GPUNormalMapManager::removeTexture ( const int &  Index)
inline

Remove a texture.

Parameters
IndexTexture index

Definition at line 127 of file GPUNormalMapManager.h.

◆ setActive()

void Hydrax::GPUNormalMapManager::setActive ( const bool &  Active)
inline

Set active.

Parameters
Activetrue for yes, false for not

Definition at line 69 of file GPUNormalMapManager.h.

+ Here is the call graph for this function:

Field Documentation

◆ mCreated

bool Hydrax::GPUNormalMapManager::mCreated
private

Has been create() already called?

Definition at line 144 of file GPUNormalMapManager.h.

◆ mHydrax

Hydrax* Hydrax::GPUNormalMapManager::mHydrax
private

Hydrax main pointer.

Definition at line 139 of file GPUNormalMapManager.h.

◆ mNormalMapMaterial

Ogre::MaterialPtr Hydrax::GPUNormalMapManager::mNormalMapMaterial
private

This material must be created in the noise module, in order to be according with the Hydrax modulable interface in all cases the Fragment program must have a 'uStrength' parameter will represents the intensity of the normals.

Definition at line 151 of file GPUNormalMapManager.h.

◆ mRttManager

RttManager* Hydrax::GPUNormalMapManager::mRttManager
private

Rtt manager pointer.

Definition at line 141 of file GPUNormalMapManager.h.

◆ mTextures

std::vector<Ogre::TexturePtr> Hydrax::GPUNormalMapManager::mTextures
private

The normal map material needs some textures wich will be filled by code.

The following std::vector will store all textures, and after they need to be modified in the noise module.

Definition at line 157 of file GPUNormalMapManager.h.


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