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

class for managing the planar reflections used by triton drawable. More...

Public Member Functions

virtual ~DtTritonPlanarReflectionManager ()
 
virtual void setMaxReflectionWindSpeed (double metersPerSecond)
 set the maximum wind speed (m/s) that the reflection will show up. More...
 
virtual void enableReflections (bool enabled)
 slightly different from setPlanarReflectionsEnabled in that it just changes the enable flag for each of the planar reflections More...
 
virtual void removeAllPlanarReflections ()
 remove all the Planar reflection objects from the scnee and clear them from the manager More...
 
virtual DtPlanarReflectiongetOrCreatePlanarReflection (osg::RenderInfo &renderInfo)
 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 More...
 
virtual DtPlanarReflectiongetPlanarReflection (osg::Camera *camera)
 accessor for the DtPlanarReflection object for a camera. More...
 
virtual void updateReflectionBlend (const osg::Vec3 &currentPosition)
 update the reflection blend for the planar reflections based on the wind at the current position More...
 
virtual void updateReflectionMatrix (const osg::Vec3 &currentPosition)
 update the reflection matrix for the planar reflections based on the current position More...
 
virtual void updateReflectionBlendAndMatrix (const osg::Vec3 &currentPosition)
 update the reflection matrix and blend for the planar reflections based on the current position More...
 
virtual const osg::Matrixd & reflectionMatrix (void) const
 get the reflection matrix for the last rendered position More...
 
virtual const osg::Plane & reflectionPlane (void) const
 get the reflection plane for the last rendered position More...
 
virtual float reflectionBlend (void) const
 get the reflection blend for the last rendered position More...
 
virtual bool planarReflectionsFlag (void) const
 flag to know if the planar reflections are in the scene graph More...
 
virtual int numPlanarReflectionCameras (void) const
 get the number of planar reflection cameras currently managed by this manager More...
 
virtual osg::ref_ptr< osg::Camera > planarReflectionCamera (int index) const
 get the planar reflection camera at index in the map (iterates that many steps into the map to find the osg camera returns ref pointer since the camera is only held by an observer pointer in the manager More...
 
virtual DtPlanarReflectionplanarReflection (int index) const
 get the planar reflection camera at index in the map (iterates that many steps into the map to find the osg camera returns raw pointer since the planar reflection reference pointer is held by the manager More...
 
virtual void flushInvalidCameras (void)
 check for any deleted cameras and remove the planar reflections associated with those cameras. More...
 
virtual void setPlanarReflectionsEnabled (bool enabled)
 get/set whether or not planar reflections are enabled, the setter removes/adds the planar reflection cameras from the scene More...
 
virtual bool planarReflectionsEnabled (void) const
 

Protected Types

typedef osg::observer_ptr
< osg::Camera > 
CameraObserverPtr
 
typedef osg::ref_ptr
< DtPlanarReflection
PlanarReflectionRef
 
typedef std::map
< CameraObserverPtr,
PlanarReflectionRef
MapCameraObserverPtrsToPlanarReflection
 

Protected Member Functions

 DtTritonPlanarReflectionManager (DtTritonDrawable *tritonDrawable, DtDe &de)
 constructor More...
 
virtual DtPlanarReflectionsetupPlanarReflections (osg::RenderInfo &renderInfo)
 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. More...
 
virtual osg::Node * createReflectionWorldGraph (makVrv::DtOsgRenderer &osgRenderer, const osg::Matrix &localToWorld, const osg::Vec3 &currentPos)
 setup the scene graph to render the reflected world. More...
 

Protected Attributes

DtTritonDrawablemyTritonDrawable
 
DtDemyDe
 
MapCameraObserverPtrsToPlanarReflection myPlanarReflectionCameraMap
 
bool myPlanarReflectionsEnabled
 
bool myPlanarReflectionsFlag
 
bool myReflectionsActive
 
float myReflectionBlend
 
float myMaxReflectionBlend
 
osg::Plane myReflectionPlane
 
osg::Matrixd myReflectionMatrix
 
DtVector myLastGeocentricReference
 
float myMaxWindForReflections
 

Private Member Functions

 DtTritonPlanarReflectionManager ()
 Default Constructor not implemented. More...
 
 DtTritonPlanarReflectionManager (const DtTritonPlanarReflectionManager &other)
 Copy Constructor not implemented – Copy Not Allowed. More...
 
DtTritonPlanarReflectionManageroperator= (const DtTritonPlanarReflectionManager &other)
 Assignment Operator Not implemented – Assignment Not Allowed. More...
 

Friends

class DtTritonPlanarReflectionManagerCreator
 friend class so only the creator can create this class More...
 

Detailed Description

class for managing the planar reflections used by triton drawable.

Member Typedef Documentation

typedef osg::observer_ptr< osg::Camera > makVrv::DtTritonPlanarReflectionManager::CameraObserverPtr
protected

Constructor & Destructor Documentation

virtual makVrv::DtTritonPlanarReflectionManager::~DtTritonPlanarReflectionManager ( )
virtual
makVrv::DtTritonPlanarReflectionManager::DtTritonPlanarReflectionManager ( DtTritonDrawable tritonDrawable,
DtDe de 
)
protected

constructor

makVrv::DtTritonPlanarReflectionManager::DtTritonPlanarReflectionManager ( )
private

Default Constructor not implemented.

makVrv::DtTritonPlanarReflectionManager::DtTritonPlanarReflectionManager ( const DtTritonPlanarReflectionManager other)
private

Copy Constructor not implemented – Copy Not Allowed.

Member Function Documentation

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

Assignment Operator Not implemented – Assignment Not Allowed.

virtual void makVrv::DtTritonPlanarReflectionManager::setMaxReflectionWindSpeed ( double  metersPerSecond)
virtual

set the maximum wind speed (m/s) that the reflection will show up.

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

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

virtual bool makVrv::DtTritonPlanarReflectionManager::planarReflectionsEnabled ( void  ) const
virtual
virtual void makVrv::DtTritonPlanarReflectionManager::enableReflections ( 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::removeAllPlanarReflections ( )
virtual

remove all the Planar reflection objects from the scnee and clear them from the manager

virtual DtPlanarReflection* makVrv::DtTritonPlanarReflectionManager::getOrCreatePlanarReflection ( osg::RenderInfo &  renderInfo)
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

virtual DtPlanarReflection* makVrv::DtTritonPlanarReflectionManager::getPlanarReflection ( osg::Camera *  camera)
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::updateReflectionBlend ( const osg::Vec3 &  currentPosition)
virtual

update the reflection blend for the planar reflections based on the wind at the current position

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

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

virtual void makVrv::DtTritonPlanarReflectionManager::updateReflectionBlendAndMatrix ( const osg::Vec3 &  currentPosition)
virtual

update the reflection matrix and blend 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 float makVrv::DtTritonPlanarReflectionManager::reflectionBlend ( void  ) const
virtual

get the reflection blend for the last rendered position

virtual bool makVrv::DtTritonPlanarReflectionManager::planarReflectionsFlag ( void  ) const
virtual

flag to know if the planar reflections are in the scene graph

virtual int makVrv::DtTritonPlanarReflectionManager::numPlanarReflectionCameras ( void  ) const
virtual

get the number of planar reflection cameras currently managed by this manager

virtual osg::ref_ptr<osg::Camera> makVrv::DtTritonPlanarReflectionManager::planarReflectionCamera ( int  index) const
virtual

get the planar reflection camera at index in the map (iterates that many steps into the map to find the osg camera returns ref pointer since the camera is only held by an observer pointer in the manager

virtual DtPlanarReflection* makVrv::DtTritonPlanarReflectionManager::planarReflection ( int  index) const
virtual

get the planar reflection camera at index in the map (iterates that many steps into the map to find the osg camera returns raw pointer since the planar reflection reference pointer is held by the manager

virtual void makVrv::DtTritonPlanarReflectionManager::flushInvalidCameras ( void  )
virtual

check for any deleted cameras and remove the planar reflections associated with those cameras.

virtual DtPlanarReflection* makVrv::DtTritonPlanarReflectionManager::setupPlanarReflections ( osg::RenderInfo &  renderInfo)
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 
)
protectedvirtual

setup the scene graph to render the reflected world.

Friends And Related Function Documentation

friend class so only the creator can create this class

Member Data Documentation

DtTritonDrawable* makVrv::DtTritonPlanarReflectionManager::myTritonDrawable
protected
DtDe& makVrv::DtTritonPlanarReflectionManager::myDe
protected
MapCameraObserverPtrsToPlanarReflection makVrv::DtTritonPlanarReflectionManager::myPlanarReflectionCameraMap
protected
bool makVrv::DtTritonPlanarReflectionManager::myPlanarReflectionsEnabled
protected
bool makVrv::DtTritonPlanarReflectionManager::myPlanarReflectionsFlag
protected
bool makVrv::DtTritonPlanarReflectionManager::myReflectionsActive
protected
float makVrv::DtTritonPlanarReflectionManager::myReflectionBlend
protected
float makVrv::DtTritonPlanarReflectionManager::myMaxReflectionBlend
protected
osg::Plane makVrv::DtTritonPlanarReflectionManager::myReflectionPlane
protected
osg::Matrixd makVrv::DtTritonPlanarReflectionManager::myReflectionMatrix
protected
DtVector makVrv::DtTritonPlanarReflectionManager::myLastGeocentricReference
protected
float makVrv::DtTritonPlanarReflectionManager::myMaxWindForReflections
protected

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

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)