Rigs of Rods 2026.01
Soft-body Physics Simulation
Loading...
Searching...
No Matches
Data Structures | Public Types | Public Member Functions | Private Member Functions | Private Attributes
Hydrax::RttManager Class Reference

Description

Rtt's manager class.

Definition at line 45 of file RttManager.h.

Data Structures

class  CDepthListener
 
class  CDepthReflectionListener
 
class  CGPUNormalMapListener
 
class  CReflectionListener
 
class  CRefractionListener
 
class  RttListener
 
struct  RttOptions
 

Public Types

enum  RttType
 
enum  BitsPerChannel
 
enum  NumberOfChannels
 

Public Member Functions

 RttManager (Hydrax *h)
 
 ~RttManager ()
 
void initialize (const RttType &Rtt)
 
void remove (const RttType &Rtt)
 
void removeAll ()
 
const Ogre::String & getRttName (RttType Rtt) const
 
Ogre::TexturePtr getTexture (RttType Rtt)
 
Ogre::SceneNode * getPlanesSceneNode ()
 
Ogre::MovablePlane * getPlane (RttType Rtt)
 
const Size & getTextureSize (const RttType &Rtt) const
 
void setTextureSize (const RttType &Rtt, const Size &S)
 
void setTexturesSize (const Size &S)
 
const Ogre::PixelFormat getPixelFormat (const RttType &Rtt) const
 
void setNumberOfChannels (const RttType &Rtt, const NumberOfChannels &NOC)
 
const NumberOfChannels & getNumberOfChannels (const RttType &Rtt) const
 
void setBitsPerChannel (const RttType &Rtt, const BitsPerChannel &BPC)
 
const BitsPerChannel & getBitsPerChannel (const RttType &Rtt) const
 
const RttOptions & getRttOptions (const RttType &Rtt) const
 
void setReflectionDisplacementError (const Ogre::Real &ReflectionDisplacementError)
 
const Ogre::Real & getReflectionDisplacementError () const
 
void setDisableReflectionCustomNearCliplPlaneRenderQueues (const std::vector< Ogre::RenderQueueGroupID > &DisableReflectionCustomNearClipPlaneRenderQueues)
 
const std::vector< Ogre::RenderQueueGroupID > & getDisableReflectionCustomNearClipPlaneRenderQueues ()
 
void addRttListener (RttListener *l)
 

Private Member Functions

void _initializeRtt (const RttType &Rtt, const Ogre::Vector3 &RttPlaneNormal, const Ogre::ColourValue &BackgroundColour, const bool &RenderSky, Ogre::RenderTargetListener *RTListener, const Ogre::String &MaterialScheme="", const bool &ShadowsEnabled=true)
 
const bool _isRenderQueueInList (const std::vector< Ogre::RenderQueueGroupID > &l, const Ogre::RenderQueueGroupID &rq)
 

Private Attributes

Hydrax * mHydrax
 
Ogre::SceneNode * mPlanesSceneNode
 
Ogre::MovablePlane * mPlanes [6]
 
Ogre::TexturePtr mTextures [6]
 
RttOptions mRttOptions [6]
 
CReflectionListener mReflectionListener
 
CRefractionListener mRefractionListener
 
CDepthListener mDepthListener
 
CDepthReflectionListener mDepthReflectionListener
 
CGPUNormalMapListener mGPUNormalMapListener
 
std::vector< Ogre::RenderQueueGroupID > mDisableReflectionCustomNearClipPlaneRenderQueues
 
std::vector< RttListener * > mRttListeners
 
Ogre::Real mReflectionDisplacementError
 

Member Enumeration Documentation

◆ BitsPerChannel

Bits per channel.

Enumerator
BPC_8 
BPC_16 
BPC_32 

Definition at line 62 of file RttManager.h.

◆ NumberOfChannels

Number of channels.

Enumerator
NOC_1 
NOC_2 
NOC_3 
NOC_4 

Definition at line 71 of file RttManager.h.

◆ RttType

Rtt enumeration.

Enumerator
RTT_REFLECTION 
RTT_REFRACTION 
RTT_DEPTH 
RTT_DEPTH_REFLECTION 
RTT_DEPTH_AIP 
RTT_GPU_NORMAL_MAP 

Definition at line 50 of file RttManager.h.

Constructor & Destructor Documentation

◆ RttManager()

Hydrax::RttManager::RttManager ( Hydrax *  h)

Constructor.

Parameters
hHydrax parent pointer

Definition at line 40 of file RttManager.cpp.

◆ ~RttManager()

Hydrax::RttManager::~RttManager ( )

Destructor.

Definition at line 73 of file RttManager.cpp.

Member Function Documentation

◆ _initializeRtt()

void Hydrax::RttManager::_initializeRtt ( const RttType &  Rtt,
const Ogre::Vector3 &  RttPlaneNormal,
const Ogre::ColourValue &  BackgroundColour,
const bool &  RenderSky,
Ogre::RenderTargetListener *  RTListener,
const Ogre::String &  MaterialScheme = "",
const bool &  ShadowsEnabled = true 
)
private

Definition at line 168 of file RttManager.cpp.

◆ _isRenderQueueInList()

const bool Hydrax::RttManager::_isRenderQueueInList ( const std::vector< Ogre::RenderQueueGroupID > &  l,
const Ogre::RenderQueueGroupID &  rq 
)
inlineprivate

Definition at line 339 of file RttManager.h.

◆ addRttListener()

void Hydrax::RttManager::addRttListener ( RttListener *  l)
inline

Definition at line 236 of file RttManager.h.

◆ getBitsPerChannel()

const BitsPerChannel & Hydrax::RttManager::getBitsPerChannel ( const RttType &  Rtt) const
inline

Definition at line 204 of file RttManager.h.

◆ getDisableReflectionCustomNearClipPlaneRenderQueues()

const std::vector< Ogre::RenderQueueGroupID > & Hydrax::RttManager::getDisableReflectionCustomNearClipPlaneRenderQueues ( )
inline

Definition at line 231 of file RttManager.h.

◆ getNumberOfChannels()

const NumberOfChannels & Hydrax::RttManager::getNumberOfChannels ( const RttType &  Rtt) const
inline

Definition at line 189 of file RttManager.h.

◆ getPixelFormat()

const Ogre::PixelFormat Hydrax::RttManager::getPixelFormat ( const RttType &  Rtt) const

Definition at line 278 of file RttManager.cpp.

◆ getPlane()

Ogre::MovablePlane * Hydrax::RttManager::getPlane ( RttType  Rtt)
inline

Get Rtt plane.

Definition at line 157 of file RttManager.h.

◆ getPlanesSceneNode()

Ogre::SceneNode * Hydrax::RttManager::getPlanesSceneNode ( )
inline

Definition at line 150 of file RttManager.h.

◆ getReflectionDisplacementError()

const Ogre::Real & Hydrax::RttManager::getReflectionDisplacementError ( ) const
inline

Definition at line 221 of file RttManager.h.

◆ getRttName()

const Ogre::String & Hydrax::RttManager::getRttName ( RttType  Rtt) const
inline

Get RTT texture name.

Definition at line 138 of file RttManager.h.

◆ getRttOptions()

const RttOptions & Hydrax::RttManager::getRttOptions ( const RttType &  Rtt) const
inline

Definition at line 209 of file RttManager.h.

◆ getTexture()

Ogre::TexturePtr Hydrax::RttManager::getTexture ( RttType  Rtt)
inline

Get Rtt texture.

Definition at line 145 of file RttManager.h.

◆ getTextureSize()

const Size & Hydrax::RttManager::getTextureSize ( const RttType &  Rtt) const
inline

Definition at line 162 of file RttManager.h.

◆ initialize()

void Hydrax::RttManager::initialize ( const RttType &  Rtt)

Initialize a RTT.

Parameters
RttRtt to initialize
Remarks
If the RTT is already created, it will be recreated.

Definition at line 78 of file RttManager.cpp.

◆ remove()

void Hydrax::RttManager::remove ( const RttType &  Rtt)

Removes a RTT.

Parameters
RttRtt to remove

Definition at line 128 of file RttManager.cpp.

◆ removeAll()

void Hydrax::RttManager::removeAll ( )

Remove all RttManager resources.

Remarks
After calling removeAll(), calling initialize(...) is allowed.

Definition at line 153 of file RttManager.cpp.

◆ setBitsPerChannel()

void Hydrax::RttManager::setBitsPerChannel ( const RttType &  Rtt,
const BitsPerChannel &  BPC 
)
inline

Definition at line 194 of file RttManager.h.

◆ setDisableReflectionCustomNearCliplPlaneRenderQueues()

void Hydrax::RttManager::setDisableReflectionCustomNearCliplPlaneRenderQueues ( const std::vector< Ogre::RenderQueueGroupID > &  DisableReflectionCustomNearClipPlaneRenderQueues)
inline

Definition at line 226 of file RttManager.h.

◆ setNumberOfChannels()

void Hydrax::RttManager::setNumberOfChannels ( const RttType &  Rtt,
const NumberOfChannels &  NOC 
)
inline

Definition at line 179 of file RttManager.h.

◆ setReflectionDisplacementError()

void Hydrax::RttManager::setReflectionDisplacementError ( const Ogre::Real &  ReflectionDisplacementError)
inline

Range [0.05, ~2], increase if you experience reflection issues when the camera is near to the water.

Definition at line 216 of file RttManager.h.

◆ setTextureSize()

void Hydrax::RttManager::setTextureSize ( const RttType &  Rtt,
const Size &  S 
)

Set Rtt texture size.

Parameters
SNew texture size (0,0 -> get main viewport size)

Definition at line 223 of file RttManager.cpp.

◆ setTexturesSize()

void Hydrax::RttManager::setTexturesSize ( const Size &  S)

Set Rtt textures size.

Parameters
SNew texture size (0,0 -> get main viewport size)

Definition at line 245 of file RttManager.cpp.

Field Documentation

◆ mDepthListener

CDepthListener Hydrax::RttManager::mDepthListener
private

Definition at line 368 of file RttManager.h.

◆ mDepthReflectionListener

CDepthReflectionListener Hydrax::RttManager::mDepthReflectionListener
private

Definition at line 369 of file RttManager.h.

◆ mDisableReflectionCustomNearClipPlaneRenderQueues

std::vector<Ogre::RenderQueueGroupID> Hydrax::RttManager::mDisableReflectionCustomNearClipPlaneRenderQueues
private

Render queues to exclude of the reflection custom near clip plane.

Definition at line 373 of file RttManager.h.

◆ mGPUNormalMapListener

CGPUNormalMapListener Hydrax::RttManager::mGPUNormalMapListener
private

Definition at line 370 of file RttManager.h.

◆ mHydrax

Hydrax* Hydrax::RttManager::mHydrax
private

Hydrax parent pointer.

Definition at line 353 of file RttManager.h.

◆ mPlanes

Ogre::MovablePlane* Hydrax::RttManager::mPlanes[6]
private

Rtt planes vector.

Definition at line 358 of file RttManager.h.

◆ mPlanesSceneNode

Ogre::SceneNode* Hydrax::RttManager::mPlanesSceneNode
private

SceneNode to attach our planes.

Definition at line 356 of file RttManager.h.

◆ mReflectionDisplacementError

Ogre::Real Hydrax::RttManager::mReflectionDisplacementError
private

Reflection displacement error, range [0.01, ~2].

Definition at line 378 of file RttManager.h.

◆ mReflectionListener

CReflectionListener Hydrax::RttManager::mReflectionListener
private

Rtt listener objects.

Definition at line 366 of file RttManager.h.

◆ mRefractionListener

CRefractionListener Hydrax::RttManager::mRefractionListener
private

Definition at line 367 of file RttManager.h.

◆ mRttListeners

std::vector<RttListener*> Hydrax::RttManager::mRttListeners
private

Rtt listeners.

Definition at line 375 of file RttManager.h.

◆ mRttOptions

RttOptions Hydrax::RttManager::mRttOptions[6]
private

Rtt options.

Definition at line 363 of file RttManager.h.

◆ mTextures

Ogre::TexturePtr Hydrax::RttManager::mTextures[6]
private

Rtt textures vector.

Definition at line 361 of file RttManager.h.


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