VR-Forces 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::DtPlanarReflectionCamera Class Reference

A camera for rendering Triton's planar reflection texture.

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

Public Member Functions

 DtPlanarReflectionCamera (osg::Camera *mainCamera, DtDe &de)
 
virtual osg::Texture * reflectionTexture ()
 
virtual const osg::Texture * reflectionTexture () const
 
virtual osg::RefMatrix * textureProjectionMatrix ()
 
virtual const osg::RefMatrix * textureProjectionMatrix () const
 
virtual void accept (osg::NodeVisitor &nv)
 
virtual void enable (bool enabled)
 
virtual void releaseGLObjects (osg::State *state=0) const
 
virtual void setClipPlane (const osg::Vec4d &v)
 
virtual bool isRenderToTextureValid ()
 
virtual void setMirrorMatrix (const osg::Matrix &mirror)
 
virtual void updateFogColor (bool skyEnabled, const osg::Vec4f &envFogColor)
 
virtual const
osg::observer_ptr< osg::Camera > & 
sceneCameraObserver (void) const
 

Protected Member Functions

virtual ~DtPlanarReflectionCamera ()
 
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
 
int myWidth
 
int myHeight
 
osg::Vec4d myClipPlane
 
const unsigned int myNodeMask
 

Constructor & Destructor Documentation

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

CTOR.

virtual makVrv::DtPlanarReflectionCamera::~DtPlanarReflectionCamera ( )
protectedvirtual

DTOR.

Member Function Documentation

virtual osg::Texture* makVrv::DtPlanarReflectionCamera::reflectionTexture ( )
virtual

Retrieve the reflection map texture this camera renders to.

virtual const osg::Texture* makVrv::DtPlanarReflectionCamera::reflectionTexture ( ) const
virtual

Retrieve the reflection map texture this camera renders to. (const)

virtual osg::RefMatrix* makVrv::DtPlanarReflectionCamera::textureProjectionMatrix ( )
virtual

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

virtual const osg::RefMatrix* makVrv::DtPlanarReflectionCamera::textureProjectionMatrix ( ) const
virtual

Retrieve the matrix used to map this texture to the water surface. (const)

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

Override Node::accept to intercept cull visitor traversal.

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

Enable / disable this reflection camera at runtime.

virtual void makVrv::DtPlanarReflectionCamera::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 void makVrv::DtPlanarReflectionCamera::setClipPlane ( const osg::Vec4d &  v)
virtual

Set the clip plane for this planar reflection camera.

virtual bool makVrv::DtPlanarReflectionCamera::isRenderToTextureValid ( )
virtual

check to see if the render to texture settings are valid

virtual void makVrv::DtPlanarReflectionCamera::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::DtPlanarReflectionCamera::updateFogColor ( bool  skyEnabled,
const osg::Vec4f &  envFogColor 
)
virtual

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

virtual const osg::observer_ptr<osg::Camera>& makVrv::DtPlanarReflectionCamera::sceneCameraObserver ( void  ) const
virtual

access

virtual void makVrv::DtPlanarReflectionCamera::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::DtPlanarReflectionCamera::modifyProjectionMatrix ( const osg::Matrix &  sceneProjection,
const osg::Vec4d &  clipPlane 
) const
protectedvirtual

modify projection matrix based on clip plane

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

setup the color buffer format

virtual osg::Texture* makVrv::DtPlanarReflectionCamera::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::DtPlanarReflectionCamera::updateReflectionTexture ( )
protectedvirtual

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

Member Data Documentation

DtDe& makVrv::DtPlanarReflectionCamera::myDe
protected
DtSignalConnectionManager makVrv::DtPlanarReflectionCamera::myConnections
protected
osg::ref_ptr< osg::Texture > makVrv::DtPlanarReflectionCamera::myTexture
protected
osg::ref_ptr< osg::Texture > makVrv::DtPlanarReflectionCamera::myDepthTexture
protected
osg::ref_ptr< osg::RefMatrix > makVrv::DtPlanarReflectionCamera::myTextureProjectionMatrix
protected
osg::observer_ptr< osg::Camera > makVrv::DtPlanarReflectionCamera::mySceneCameraObserver
protected
osg::Matrix makVrv::DtPlanarReflectionCamera::myMirrorMatrix
protected
int makVrv::DtPlanarReflectionCamera::myTexFormat
protected
int makVrv::DtPlanarReflectionCamera::mySourceFormat
protected
int makVrv::DtPlanarReflectionCamera::mySourceType
protected
int makVrv::DtPlanarReflectionCamera::myWidth
protected
int makVrv::DtPlanarReflectionCamera::myHeight
protected
osg::Vec4d makVrv::DtPlanarReflectionCamera::myClipPlane
protected
const unsigned int makVrv::DtPlanarReflectionCamera::myNodeMask
protected

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

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)