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

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

Public Member Functions

virtual ~DtHeightMapManager ()
 
virtual void setupHeightMap (void)
 
virtual void setHeightMapResolution (float resolution)
 
virtual float heightMapResolution () const
 
virtual void setHeightMapTextureSize (int pixels)
 
virtual int heightMapTextureSize () const
 
virtual bool updateHeightCamera (unsigned int frameNum, const osg::Vec3d &currentPosition, bool isGeocentric)
 
virtual void setHeightCameraAttachment (bool enabled)
 
virtual bool heightCameraAttached () const
 
virtual const osg::Matrix & heightMapMatrix () const
 
virtual const osg::ref_ptr
< osg::Texture2D > 
heightMapTexture () const
 
virtual void slot_terrainDataChanged (DtTerrainPatchObject &tpo)
 
virtual void slot_wireframeModeChanged ()
 
virtual void slot_coordinateSystemChanged ()
 
virtual osg::Camera * heightCamera ()
 
virtual void syncHeightMapToGpu (const osg::State *state, const osg::Camera *camera)
 
virtual void postDrawFBOCallback (osg::RenderInfo &renderInfo)
 

Protected Member Functions

 DtHeightMapManager (DtDe &de, osg::View *view)
 
virtual void cleanup ()
 
virtual void updateHeightMapMatrix ()
 
virtual osg::Matrixd oglRevDepthOrtho (double left, double right, double bottom, double top, double zNear, double zFar)
 
virtual void computeBasis (const osg::Vec3d &inGeocentricPos, osg::Matrixd &rotOut)
 

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
 
DtDemyDe
 
DtSignalConnectionManager myConnections
 
osg::View * myOsgView
 
DtCoordinateSystemmyCoordinateSystem = nullptr
 

Private Member Functions

 DtHeightMapManager ()=delete
 
 DtHeightMapManager (const DtHeightMapManager &other)=delete
 
DtHeightMapManageroperator= (const DtHeightMapManager &other)=delete
 

Friends

class DtHeightMapManagerCreator
 

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 void makVrv::DtHeightMapManager::slot_coordinateSystemChanged ( )
virtual

slot for when the coordinate system changes

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
DtDe& makVrv::DtHeightMapManager::myDe
protected
DtSignalConnectionManager makVrv::DtHeightMapManager::myConnections
protected
osg::View* makVrv::DtHeightMapManager::myOsgView
protected
DtCoordinateSystem* makVrv::DtHeightMapManager::myCoordinateSystem = nullptr
protected

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


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

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)