VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
makVrv::DtPlanarReflection Class Reference

A camera for rendering Triton's planar reflection texture. More...

Inheritance diagram for makVrv::DtPlanarReflection:
Inheritance graph
[legend]

Public Member Functions

 DtPlanarReflection (osg::Camera *mainCamera, DtDe &de)
 CTOR. More...
 
virtual osg::Texture * getTexture ()
 Retrieve the reflection map texture this camera renders to. More...
 
virtual osg::RefMatrix * getTextureProjectionMatrix ()
 Retrieve the matrix used to map this texture to the water surface. More...
 
virtual void accept (osg::NodeVisitor &nv)
 Override Node::accept to intercept cull visitor traversal. More...
 
virtual void enable (bool enabled)
 Enable / disable this reflection camera at runtime. More...
 
virtual void releaseGLObjects (osg::State *state=0) const
 Called when a graphic context is destroyed or when this object needs to cleanup its opengl objects. More...
 
virtual bool isRenderToTextureValid ()
 check to see if the render to texture settings are valid More...
 
virtual void setMirrorMatrix (const osg::Matrix &mirror)
 set the mirror matrix for this planar reflection, used to mirror the scene for the reflection pass rendering. More...
 
virtual void updateFogColor (bool skyEnabled, const osg::Vec4f &envFogColor)
 sets the clear color to match the fog color for this camera. More...
 

Protected Member Functions

virtual ~DtPlanarReflection ()
 DTOR. More...
 
virtual void lodScaleChanged (float lodScale)
 pass in a new lod scale to use for calculating the lod connected to the signal_oceanPlanarReflectionsLODScaleChanged More...
 
virtual osg::Matrixd modifyProjectionMatrix (const osg::Matrix &sceneProjection, const osg::Vec4d &clipPlane) const
 only used if USE_OBLIQUE_CLIP_PLANE is enabled More...
 
virtual void setupColorBufferTexture (int format, int sourceFormat, int sourceType)
 setup the color buffer format More...
 
virtual osg::Texture * allocateRenderTexture (int width, int height)
 allocate a render texture and set it's size, the function will handle creating Texture2DArray if needed for multiview More...
 
virtual void updateReflectionTexture ()
 update the reflection texture settings based on the current main camera settings. More...
 

Protected Attributes

DtDemyDe
 
DtSignalConnectionManager myConnections
 
osg::ref_ptr< osg::Texture > myTexture
 
osg::ref_ptr< osg::Texture > myDepthTexture
 
osg::ref_ptr< osg::RefMatrix > myTextureProjectionMatrix
 
osg::observer_ptr< osg::Camera > mySceneCameraObserver
 
osg::Matrix myMirrorMatrix
 
int myTexFormat
 
int mySourceFormat
 
int mySourceType
 

Detailed Description

A camera for rendering Triton's planar reflection texture.

Constructor & Destructor Documentation

makVrv::DtPlanarReflection::DtPlanarReflection ( osg::Camera *  mainCamera,
DtDe de 
)

CTOR.

virtual makVrv::DtPlanarReflection::~DtPlanarReflection ( )
protectedvirtual

DTOR.

Member Function Documentation

virtual osg::Texture* makVrv::DtPlanarReflection::getTexture ( )
virtual

Retrieve the reflection map texture this camera renders to.

virtual osg::RefMatrix* makVrv::DtPlanarReflection::getTextureProjectionMatrix ( )
virtual

Retrieve the matrix used to map this texture to the water surface.

virtual void makVrv::DtPlanarReflection::accept ( osg::NodeVisitor &  nv)
virtual

Override Node::accept to intercept cull visitor traversal.

virtual void makVrv::DtPlanarReflection::enable ( bool  enabled)
virtual

Enable / disable this reflection camera at runtime.

virtual void makVrv::DtPlanarReflection::releaseGLObjects ( osg::State *  state = 0) const
virtual

Called when a graphic context is destroyed or when this object needs to cleanup its opengl objects.

virtual bool makVrv::DtPlanarReflection::isRenderToTextureValid ( )
virtual

check to see if the render to texture settings are valid

virtual void makVrv::DtPlanarReflection::setMirrorMatrix ( const osg::Matrix &  mirror)
virtual

set the mirror matrix for this planar reflection, used to mirror the scene for the reflection pass rendering.

virtual void makVrv::DtPlanarReflection::updateFogColor ( bool  skyEnabled,
const osg::Vec4f &  envFogColor 
)
virtual

sets the clear color to match the fog color for this camera.

virtual void makVrv::DtPlanarReflection::lodScaleChanged ( float  lodScale)
protectedvirtual

pass in a new lod scale to use for calculating the lod connected to the signal_oceanPlanarReflectionsLODScaleChanged

virtual osg::Matrixd makVrv::DtPlanarReflection::modifyProjectionMatrix ( const osg::Matrix &  sceneProjection,
const osg::Vec4d &  clipPlane 
) const
protectedvirtual

only used if USE_OBLIQUE_CLIP_PLANE is enabled

virtual void makVrv::DtPlanarReflection::setupColorBufferTexture ( int  format,
int  sourceFormat,
int  sourceType 
)
protectedvirtual

setup the color buffer format

virtual osg::Texture* makVrv::DtPlanarReflection::allocateRenderTexture ( int  width,
int  height 
)
protectedvirtual

allocate a render texture and set it's size, the function will handle creating Texture2DArray if needed for multiview

virtual void makVrv::DtPlanarReflection::updateReflectionTexture ( )
protectedvirtual

update the reflection texture settings based on the current main camera settings.

Member Data Documentation

DtDe& makVrv::DtPlanarReflection::myDe
protected
DtSignalConnectionManager makVrv::DtPlanarReflection::myConnections
protected
osg::ref_ptr< osg::Texture > makVrv::DtPlanarReflection::myTexture
protected
osg::ref_ptr< osg::Texture > makVrv::DtPlanarReflection::myDepthTexture
protected
osg::ref_ptr< osg::RefMatrix > makVrv::DtPlanarReflection::myTextureProjectionMatrix
protected
osg::observer_ptr< osg::Camera > makVrv::DtPlanarReflection::mySceneCameraObserver
protected
osg::Matrix makVrv::DtPlanarReflection::myMirrorMatrix
protected
int makVrv::DtPlanarReflection::myTexFormat
protected
int makVrv::DtPlanarReflection::mySourceFormat
protected
int makVrv::DtPlanarReflection::mySourceType
protected

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

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)