|
RigsofRods
Soft-body Physics Simulation
|
Go to the documentation of this file.
25 #ifndef _Hydrax_RttManager_H_
26 #define _Hydrax_RttManager_H_
159 return mPlanes[
static_cast<int>(Rtt)];
271 void renderQueueStarted(Ogre::uint8 queueGroupId,
const Ogre::String &invocation,
bool &skipThisInvocation)
override;
272 void renderQueueEnded(Ogre::uint8 queueGroupId,
const Ogre::String &invocation,
bool &skipThisInvocation)
override;
339 const Ogre::ColourValue& BackgroundColour,
const bool& RenderSky,
340 Ogre::RenderTargetListener* RTListener,
const Ogre::String& MaterialScheme =
"",
341 const bool& ShadowsEnabled =
true);
343 inline const bool _isRenderQueueInList(
const std::vector<Ogre::RenderQueueGroupID>& l,
const Ogre::RenderQueueGroupID& rq)
345 for (std::vector<Ogre::RenderQueueGroupID>::const_iterator i = l.begin(); i != l.end(); i++)
void postRenderTargetUpdate(const Ogre::RenderTargetEvent &evt) override
bool mActive
Is the reflection Rtt active?
Ogre::Real mCameraPlaneDiff
Camera.y - Plane.y difference.
const Ogre::String & getRttName(RttType Rtt) const
Get RTT texture name.
void setBitsPerChannel(const RttType &Rtt, const BitsPerChannel &BPC)
const BitsPerChannel & getBitsPerChannel(const RttType &Rtt) const
BitsPerChannel BitsPerChannel_
Bits per channel.
virtual void postRenderTargetUpdate(const RttType &Rtt)
Funtion that is called after the Rtt will render.
CRefractionListener mRefractionListener
void preRenderTargetUpdate(const Ogre::RenderTargetEvent &evt) override
Ogre::SceneNode * getPlanesSceneNode()
Struct wich contains an especific width and height value.
Ogre::String Name
Texture names.
NumberOfChannels
Number of channels.
Hydrax * mHydrax
Hydrax parent pointer.
void removeAll()
Remove all RttManager resources.
void removeRttListener(RttListener *l, const bool &releaseMemory=true)
void postRenderTargetUpdate(const Ogre::RenderTargetEvent &evt) override
const RttOptions & getRttOptions(const RttType &Rtt) const
void removeAllRttListeners(const bool &releaseMemory=true)
const NumberOfChannels & getNumberOfChannels(const RttType &Rtt) const
RttManager(Hydrax *h)
Constructor.
Ogre::String mOldMaterialName
Old Hydrax mesh material name.
RttManager * mRttManager
Rtt manager pointer.
virtual void preRenderTargetUpdate(const RttType &Rtt)
Funtion that is called before the Rtt will render.
void setTexturesSize(const Size &S)
Set Rtt textures size.
void addRttListener(RttListener *l)
Ogre::TexturePtr mTextures[6]
Rtt textures vector.
std::vector< RttListener * > mRttListeners
Rtt listeners.
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)
void preRenderTargetUpdate(const Ogre::RenderTargetEvent &evt) override
Used for avoid near clip plane clipping during the reflection Rtt.
const bool _isRenderQueueInList(const std::vector< Ogre::RenderQueueGroupID > &l, const Ogre::RenderQueueGroupID &rq)
CReflectionListener mReflectionListener
Rtt listener objects.
Ogre::MovablePlane * mPlanes[6]
Rtt planes vector.
RttManager::CReflectionListener class.
Ogre::Real mCameraPlaneDiff
Camera.y - Plane.y difference.
Ogre::Real mReflectionDisplacementError
Reflection displacement error, range [0.01, ~2].
RttOptions mRttOptions[6]
Rtt options.
Size Size_
Size; Size(0,0) to get main viewport size.
std::queue< std::string > mMaterials
std::string to store entity's original materials name
void postRenderTargetUpdate(const Ogre::RenderTargetEvent &evt) override
RttManager::CRefractionListener class.
void preRenderTargetUpdate(const Ogre::RenderTargetEvent &evt) override
const Ogre::PixelFormat getPixelFormat(const RttType &Rtt) const
RttManager * mRttManager
Rtt manager pointer.
const Ogre::Real & getReflectionDisplacementError() const
CGPUNormalMapListener mGPUNormalMapListener
Ogre::Real mCameraPlaneDiff
Camera.y - Plane.y difference.
void setDisableReflectionCustomNearCliplPlaneRenderQueues(const std::vector< Ogre::RenderQueueGroupID > &DisableReflectionCustomNearClipPlaneRenderQueues)
RttManager * mRttManager
Rtt manager pointer.
CDepthReflectionListener mDepthReflectionListener
void setNumberOfChannels(const RttType &Rtt, const NumberOfChannels &NOC)
void initialize(const RttType &Rtt)
Initialize a RTT.
void setTextureSize(const RttType &Rtt, const Size &S)
Set Rtt texture size.
CReflectionQueueListener mCReflectionQueueListener
CReflectionQueueListener.
void setReflectionDisplacementError(const Ogre::Real &ReflectionDisplacementError)
Range [0.05, ~2], increase if you experience reflection issues when the camera is near to the water.
NumberOfChannels NumberOfChannels_
Number of channels.
void postRenderTargetUpdate(const Ogre::RenderTargetEvent &evt) override
void remove(const RttType &Rtt)
Removes a RTT.
void preRenderTargetUpdate(const Ogre::RenderTargetEvent &evt) override
void postRenderTargetUpdate(const Ogre::RenderTargetEvent &evt) override
void _invokeRttListeners(const RttType &Rtt, const bool &pre)
Invoke Rtt Listeners.
Ogre::Real mCameraPlaneDiff
Camera.y - Plane.y difference.
RttManager * mRttManager
Rtt manager pointer.
Ogre::SceneNode * mPlanesSceneNode
SceneNode to attach our planes.
BitsPerChannel
Bits per channel.
void renderQueueEnded(Ogre::uint8 queueGroupId, const Ogre::String &invocation, bool &skipThisInvocation) override
Ogre::TexturePtr getTexture(RttType Rtt)
Get Rtt texture.
const std::vector< Ogre::RenderQueueGroupID > & getDisableReflectionCustomNearClipPlaneRenderQueues()
std::queue< std::string > mMaterials
std::string to store entity's original materials name
void renderQueueStarted(Ogre::uint8 queueGroupId, const Ogre::String &invocation, bool &skipThisInvocation) override
const Size & getTextureSize(const RttType &Rtt) const
CDepthListener mDepthListener
RttManager * mRttManager
Rtt manager pointer.
std::vector< Ogre::RenderQueueGroupID > mDisableReflectionCustomNearClipPlaneRenderQueues
Render queues to exclude of the reflection custom near clip plane.
void preRenderTargetUpdate(const Ogre::RenderTargetEvent &evt) override
Ogre::MovablePlane * getPlane(RttType Rtt)
Get Rtt plane.