VR-Forces 5.0.1 Developer's Guide
 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.

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

Public Member Functions

 DtPlanarReflection (osg::Camera *mainCamera, DtDe &de)
 
virtual osg::Texture * getTexture ()
 
virtual osg::RefMatrix * getTextureProjectionMatrix ()
 
virtual void accept (osg::NodeVisitor &nv)
 
virtual void enable (bool enabled)
 
virtual void releaseGLObjects (osg::State *state=0) const
 
virtual bool isRenderToTextureValid ()
 
virtual void setMirrorMatrix (const osg::Matrix &mirror)
 
virtual void updateFogColor (bool skyEnabled, const osg::Vec4f &envFogColor)
 

Protected Member Functions

virtual ~DtPlanarReflection ()
 
virtual void lodScaleChanged (float lodScale)
 
virtual osg::Matrixd modifyProjectionMatrix (const osg::Matrix &sceneProjection, const osg::Vec4d &clipPlane) const
 
virtual void setupColorBufferTexture (int format, int sourceFormat, int sourceType)
 
virtual osg::Texture * allocateRenderTexture (int width, int height)
 
virtual void updateReflectionTexture ()
 

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
 

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 Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)