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 | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions
makVrv::DtTritonPlanarReflectionManager Class Reference

class for managing the planar reflections used by triton drawable.

Public Member Functions

virtual ~DtTritonPlanarReflectionManager ()
 
virtual void enableReflection (bool enabled)
 
virtual void removePlanarReflection ()
 
virtual DtPlanarReflectionCameragetOrCreatePlanarReflection (osg::RenderInfo &renderInfo, double seaLevel, bool &isNewReflection)
 
virtual DtPlanarReflectionCameraplanarReflectionCamera ()
 
virtual void updateReflectionMatrix (const osg::Vec3 &currentPosition, double seaLevel)
 
virtual const osg::Matrixd & reflectionMatrix (void) const
 
virtual const osg::Plane & reflectionPlane (void) const
 
virtual void setPlanarReflectionEnabled (bool enabled)
 

Public Attributes

friend DtTritonPlanarReflectionManagerCreator
 

Protected Member Functions

 DtTritonPlanarReflectionManager (DtDe &de)
 
virtual DtPlanarReflectionCamerasetupPlanarReflections (osg::RenderInfo &renderInfo, double seaLevel)
 
virtual osg::Node * createReflectionWorldGraph (makVrv::DtOsgRenderer &osgRenderer, const osg::Matrix &localToWorld, const osg::Vec3 &currentPos, double seaLevel)
 
virtual void slot_coordinateSystemChanged ()
 
virtual void slot_planarReflectionTextureSizeChanged (void)
 
virtual void slot_oceanPlanarReflectionsEnabledChanged ()
 

Protected Attributes

DtDemyDe
 
osg::ref_ptr
< DtPlanarReflectionCamera
myPlanarReflectionCamera
 
osg::Plane myReflectionPlane
 
osg::Matrixd myReflectionMatrix
 
DtVector myLastGeocentricReference
 
DtSignalConnectionManager myConnections
 
DtCoordinateConvertermyCoordinateConverter = nullptr
 

Private Member Functions

 DtTritonPlanarReflectionManager ()=delete
 
 DtTritonPlanarReflectionManager (const DtTritonPlanarReflectionManager &other)=delete
 
DtTritonPlanarReflectionManageroperator= (const DtTritonPlanarReflectionManager &other)=delete
 

Constructor & Destructor Documentation

virtual makVrv::DtTritonPlanarReflectionManager::~DtTritonPlanarReflectionManager ( )
virtual
makVrv::DtTritonPlanarReflectionManager::DtTritonPlanarReflectionManager ( DtDe de)
protected

constructor

makVrv::DtTritonPlanarReflectionManager::DtTritonPlanarReflectionManager ( )
privatedelete

Default Constructor not implemented.

makVrv::DtTritonPlanarReflectionManager::DtTritonPlanarReflectionManager ( const DtTritonPlanarReflectionManager other)
privatedelete

Copy Constructor not implemented – Copy Not Allowed.

Member Function Documentation

DtTritonPlanarReflectionManager& makVrv::DtTritonPlanarReflectionManager::operator= ( const DtTritonPlanarReflectionManager other)
privatedelete

Assignment Operator Not implemented – Assignment Not Allowed.

virtual void makVrv::DtTritonPlanarReflectionManager::setPlanarReflectionEnabled ( bool  enabled)
virtual

get/set whether or not planar reflections are enabled, the setter removes/adds the planar reflection cameras from the scene

virtual void makVrv::DtTritonPlanarReflectionManager::enableReflection ( bool  enabled)
virtual

slightly different from setPlanarReflectionsEnabled in that it just changes the enable flag for each of the planar reflections

virtual void makVrv::DtTritonPlanarReflectionManager::removePlanarReflection ( )
virtual

remove all the Planar reflection objects from the scene and set the reflection camera to a nullptr

virtual DtPlanarReflectionCamera* makVrv::DtTritonPlanarReflectionManager::getOrCreatePlanarReflection ( osg::RenderInfo &  renderInfo,
double  seaLevel,
bool isNewReflection 
)
virtual

get or create the planar reflection manager for the current camera based on the renderInfo returns raw pointer since the planar reflection reference pointer is held by the manager Should not return NULL

Parameters
isNewReflection- (out) will become true for a newly created reflection otherwise false
virtual DtPlanarReflectionCamera* makVrv::DtTritonPlanarReflectionManager::planarReflectionCamera ( )
virtual

accessor for the DtPlanarReflection object for a camera. SensorFX needs access to setup the shaders correctly. returns raw pointer since the planar reflection reference pointer is held by the manager Can return NULL if the camera passed in does not have a planar reflection associated with it.

virtual void makVrv::DtTritonPlanarReflectionManager::updateReflectionMatrix ( const osg::Vec3 &  currentPosition,
double  seaLevel 
)
virtual

update the reflection matrix for the planar reflections based on the current position

virtual const osg::Matrixd& makVrv::DtTritonPlanarReflectionManager::reflectionMatrix ( void  ) const
virtual

get the reflection matrix for the last rendered position

virtual const osg::Plane& makVrv::DtTritonPlanarReflectionManager::reflectionPlane ( void  ) const
virtual

get the reflection plane for the last rendered position

virtual DtPlanarReflectionCamera* makVrv::DtTritonPlanarReflectionManager::setupPlanarReflections ( osg::RenderInfo &  renderInfo,
double  seaLevel 
)
protectedvirtual

create a new planar reflection based on the render info returns a raw pointer that may or may not have any referece pointers associated with it. the returned pointer should be put in a ref pointer in the caller function.

virtual osg::Node* makVrv::DtTritonPlanarReflectionManager::createReflectionWorldGraph ( makVrv::DtOsgRenderer osgRenderer,
const osg::Matrix &  localToWorld,
const osg::Vec3 &  currentPos,
double  seaLevel 
)
protectedvirtual

setup the scene graph to render the reflected world.

virtual void makVrv::DtTritonPlanarReflectionManager::slot_coordinateSystemChanged ( )
protectedvirtual

slot for when the coordinate system changes

virtual void makVrv::DtTritonPlanarReflectionManager::slot_planarReflectionTextureSizeChanged ( void  )
protectedvirtual

For when the planar reflection width/height changes.

virtual void makVrv::DtTritonPlanarReflectionManager::slot_oceanPlanarReflectionsEnabledChanged ( )
protectedvirtual

Member Data Documentation

friend makVrv::DtTritonPlanarReflectionManager::DtTritonPlanarReflectionManagerCreator

friend class so only the creator can create this class

DtDe& makVrv::DtTritonPlanarReflectionManager::myDe
protected
osg::ref_ptr< DtPlanarReflectionCamera > makVrv::DtTritonPlanarReflectionManager::myPlanarReflectionCamera
protected
osg::Plane makVrv::DtTritonPlanarReflectionManager::myReflectionPlane
protected
osg::Matrixd makVrv::DtTritonPlanarReflectionManager::myReflectionMatrix
protected
DtVector makVrv::DtTritonPlanarReflectionManager::myLastGeocentricReference
protected
DtSignalConnectionManager makVrv::DtTritonPlanarReflectionManager::myConnections
protected
DtCoordinateConverter* makVrv::DtTritonPlanarReflectionManager::myCoordinateConverter = nullptr
protected

local clone of the current system wide coordinate system converter. for thread safety.


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)