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 | Private Member Functions | Friends
makVrv::DtHeightMapManager Class Reference

A class to manage automatic periodic updating of a height map generated from the database dynamically. More...

Public Member Functions

virtual ~DtHeightMapManager ()
 destructor More...
 
virtual void setupHeightMap (void)
 Sets up the height map's resources. More...
 
virtual void setHeightMapResolution (float resolution)
 Set the height map resolution in meters per texel. More...
 
virtual float heightMapResolution () const
 Gets the meters represented by one texel of the height map. More...
 
virtual void setHeightMapTextureSize (int pixels)
 Set the texture size length and width. More...
 
virtual int heightMapTextureSize () const
 Get the texture size length and width. More...
 
virtual bool updateHeightCamera (unsigned int frameNum, const osg::Vec3d &currentPosition, bool isGeocentric)
 Updates the height map as needed; call once per frame. More...
 
virtual void setHeightCameraAttachment (bool enabled)
 Attaches or detaches the height map camera from the scene graph. More...
 
virtual bool heightCameraAttached () const
 Returns the height camera attatched state. More...
 
virtual const osg::Matrix & heightMapMatrix () const
 Retrieve the matrix to transform world coordinate to texture coords. More...
 
virtual const osg::ref_ptr
< osg::Texture2D > 
heightMapTexture () const
 Retrieve the height map itself. More...
 
virtual void slot_terrainDataChanged (DtTerrainPatchObject &tpo)
 Handles the terrain data changed signal. More...
 
virtual void slot_wireframeModeChanged ()
 Handles the wireframe mode changed signal. More...
 
virtual osg::Camera * heightCamera ()
 get the height camera being used by this height map manager More...
 
virtual void syncHeightMapToGpu (const osg::State *state, const osg::Camera *camera)
 Called from DtDrawableUpdateHeightMapJob to sync the height map to the GPU. More...
 
virtual void postDrawFBOCallback (osg::RenderInfo &renderInfo)
 Called from DtHeightMapPostDrawFBOCallback for post draw. More...
 

Protected Member Functions

 DtHeightMapManager (DtDe &de, osg::View *view)
 constructor More...
 
virtual void cleanup ()
 clean up this manager, called by the destuctor and the release gl objects for the drawable. More...
 
virtual void updateHeightMapMatrix ()
 Helper function for updating the height map matrix. More...
 
virtual osg::Matrixd oglRevDepthOrtho (double left, double right, double bottom, double top, double zNear, double zFar)
 get the reverse depth buffer setup for an orthographic camera. used when reverse z is turned on. More...
 
virtual void computeBasis (const osg::Vec3d &inGeocentricPos, osg::Matrixd &rotOut)
 Computes a round earth basis rotation matrix for the given geocentric position. More...
 

Protected Attributes

osg::Vec3d myLastHeightReferencePos
 
osg::Matrixd myHeightReferenceBasis
 
osg::Vec3d myLastHeightUpdatePos
 
unsigned int myHeightUpdateFrame
 
bool myHeightCameraAttached
 
bool myHeightMapCameraUpdateReady
 
bool myForceUpdate
 
float myResolution
 
bool mySavedPerfOverlayOn
 
double myLastUpdateTime
 
bool myShadingRateIsSupported
 
osg::ref_ptr< osg::Texture2D > myHeightMap
 
osg::ref_ptr< osg::Texture2D > myDepthTexture
 
osg::Matrix myHeightMapMatrix
 
int myHeightMapDimension
 
osg::ref_ptr< osg::Camera > myHeightCamera
 
bool myHeightMapUseReverseZ
 
DtDemyDe
 
DtSignalConnectionManager myConnections
 
osg::View * myOsgView
 

Private Member Functions

 DtHeightMapManager ()=delete
 Default Constructor not implemented. More...
 
 DtHeightMapManager (const DtHeightMapManager &other)=delete
 Copy Constructor not implemented – Copy Not Allowed. More...
 
DtHeightMapManageroperator= (const DtHeightMapManager &other)=delete
 Assignment Operator Not implemented – Assignment Not Allowed. More...
 

Friends

class DtHeightMapManagerCreator
 

Detailed Description

A class to manage automatic periodic updating of a height map generated from the database dynamically.

Constructor & Destructor Documentation

virtual makVrv::DtHeightMapManager::~DtHeightMapManager ( )
virtual

destructor

makVrv::DtHeightMapManager::DtHeightMapManager ( DtDe de,
osg::View *  view 
)
protected

constructor

makVrv::DtHeightMapManager::DtHeightMapManager ( )
privatedelete

Default Constructor not implemented.

makVrv::DtHeightMapManager::DtHeightMapManager ( const DtHeightMapManager other)
privatedelete

Copy Constructor not implemented – Copy Not Allowed.

Member Function Documentation

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

Assignment Operator Not implemented – Assignment Not Allowed.

virtual void makVrv::DtHeightMapManager::setupHeightMap ( void  )
virtual

Sets up the height map's resources.

virtual void makVrv::DtHeightMapManager::setHeightMapResolution ( float  resolution)
virtual

Set the height map resolution in meters per texel.

virtual float makVrv::DtHeightMapManager::heightMapResolution ( ) const
virtual

Gets the meters represented by one texel of the height map.

virtual void makVrv::DtHeightMapManager::setHeightMapTextureSize ( int  pixels)
virtual

Set the texture size length and width.

The pixel value will be

virtual int makVrv::DtHeightMapManager::heightMapTextureSize ( ) const
virtual

Get the texture size length and width.

virtual bool makVrv::DtHeightMapManager::updateHeightCamera ( unsigned int  frameNum,
const osg::Vec3d &  currentPosition,
bool  isGeocentric 
)
virtual

Updates the height map as needed; call once per frame.

Returns true if there is a new height map ready.

virtual void makVrv::DtHeightMapManager::setHeightCameraAttachment ( bool  enabled)
virtual

Attaches or detaches the height map camera from the scene graph.

virtual bool makVrv::DtHeightMapManager::heightCameraAttached ( ) const
virtual

Returns the height camera attatched state.

virtual const osg::Matrix& makVrv::DtHeightMapManager::heightMapMatrix ( ) const
virtual

Retrieve the matrix to transform world coordinate to texture coords.

virtual const osg::ref_ptr<osg::Texture2D> makVrv::DtHeightMapManager::heightMapTexture ( ) const
virtual

Retrieve the height map itself.

virtual void makVrv::DtHeightMapManager::slot_terrainDataChanged ( DtTerrainPatchObject tpo)
virtual

Handles the terrain data changed signal.

virtual void makVrv::DtHeightMapManager::slot_wireframeModeChanged ( )
virtual

Handles the wireframe mode changed signal.

virtual osg::Camera* makVrv::DtHeightMapManager::heightCamera ( )
virtual

get the height camera being used by this height map manager

virtual void makVrv::DtHeightMapManager::syncHeightMapToGpu ( const osg::State *  state,
const osg::Camera *  camera 
)
virtual

Called from DtDrawableUpdateHeightMapJob to sync the height map to the GPU.

virtual void makVrv::DtHeightMapManager::postDrawFBOCallback ( osg::RenderInfo &  renderInfo)
virtual

Called from DtHeightMapPostDrawFBOCallback for post draw.

virtual void makVrv::DtHeightMapManager::cleanup ( )
protectedvirtual

clean up this manager, called by the destuctor and the release gl objects for the drawable.

virtual void makVrv::DtHeightMapManager::updateHeightMapMatrix ( )
protectedvirtual

Helper function for updating the height map matrix.

virtual osg::Matrixd makVrv::DtHeightMapManager::oglRevDepthOrtho ( double  left,
double  right,
double  bottom,
double  top,
double  zNear,
double  zFar 
)
protectedvirtual

get the reverse depth buffer setup for an orthographic camera. used when reverse z is turned on.

virtual void makVrv::DtHeightMapManager::computeBasis ( const osg::Vec3d &  inGeocentricPos,
osg::Matrixd &  rotOut 
)
protectedvirtual

Computes a round earth basis rotation matrix for the given geocentric position.

Parameters
inGeocentricPosThe geocentric reference position.
rotOutThe computed basis rotation transform.

Friends And Related Function Documentation

friend class DtHeightMapManagerCreator
friend

Member Data Documentation

osg::Vec3d makVrv::DtHeightMapManager::myLastHeightReferencePos
protected
osg::Matrixd makVrv::DtHeightMapManager::myHeightReferenceBasis
protected
osg::Vec3d makVrv::DtHeightMapManager::myLastHeightUpdatePos
protected
unsigned int makVrv::DtHeightMapManager::myHeightUpdateFrame
protected
bool makVrv::DtHeightMapManager::myHeightCameraAttached
protected
bool makVrv::DtHeightMapManager::myHeightMapCameraUpdateReady
protected
bool makVrv::DtHeightMapManager::myForceUpdate
protected
float makVrv::DtHeightMapManager::myResolution
protected
bool makVrv::DtHeightMapManager::mySavedPerfOverlayOn
protected
double makVrv::DtHeightMapManager::myLastUpdateTime
protected
bool makVrv::DtHeightMapManager::myShadingRateIsSupported
protected
osg::ref_ptr<osg::Texture2D> makVrv::DtHeightMapManager::myHeightMap
protected
osg::ref_ptr<osg::Texture2D> makVrv::DtHeightMapManager::myDepthTexture
protected
osg::Matrix makVrv::DtHeightMapManager::myHeightMapMatrix
protected
int makVrv::DtHeightMapManager::myHeightMapDimension
protected
osg::ref_ptr<osg::Camera> makVrv::DtHeightMapManager::myHeightCamera
protected
bool makVrv::DtHeightMapManager::myHeightMapUseReverseZ
protected
DtDe& makVrv::DtHeightMapManager::myDe
protected
DtSignalConnectionManager makVrv::DtHeightMapManager::myConnections
protected
osg::View* makVrv::DtHeightMapManager::myOsgView
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)