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

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

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

Public Member Functions

virtual ~DtHeightMapManager ()
 
virtual void setupHeightMap (void)
 
virtual float heightMapResolution () const
 
virtual void updateHeightCamera (unsigned int frameNum, const osg::Vec3d &currentPosition)
 
virtual void enableHeightMapCamera (bool enable)
 
virtual bool heightCameraEnabled () const
 
virtual const osg::Matrix & heightMapMatrix () const
 
virtual const osg::ref_ptr
< osg::Texture2D > 
heightMapTexture () const
 
virtual osg::Camera * heightCamera ()
 
virtual void postDrawFBOCallback (osg::RenderInfo &renderInfo)
 
virtual bool heightMapChanged (void) const
 
virtual const osg::View * osgView (void) const
 
- Public Member Functions inherited from makVrv::DtKeyedDataUserData
 DtKeyedDataUserData (DtDe &de, const std::string &name)
 
virtual ~DtKeyedDataUserData ()
 

Protected Member Functions

 DtHeightMapManager (DtDe &de, const std::string &name, osg::View *&view)
 
virtual void clearHeightmap ()
 
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)
 
virtual void slot_oceanHeightMapTextureSizeChanged (int pixels)
 
virtual void slot_oceanHeightMapResolutionChanged (float resolution)
 
virtual void slot_terrainDataChanged (DtTerrainPatchObject &tpo)
 
virtual void slot_wireframeModeChanged ()
 
virtual void slot_coordinateSystemChanged ()
 
virtual int heightMapTextureSize () const
 
virtual void slot_preTick (void)
 

Protected Attributes

friend DtHeightMapManagerCreator
 
osg::Vec3d myLastHeightReferencePos
 
osg::Matrixd myHeightReferenceBasis
 
osg::Vec3d myLastHeightUpdatePos
 
unsigned int myHeightUpdateFrame
 
bool myForceUpdate
 
float myResolution
 
bool mySavedPerfOverlayOn
 
double myLastUpdateTime
 
const 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
 
DtSignalConnectionManager myConnections
 
osg::View * myOsgView
 
DtCoordinateSystemmyCoordinateSystem = nullptr
 
bool myHeightMapChanged = false
 
const unsigned int myHeightCameraNodeMask
 
- Protected Attributes inherited from makVrv::DtKeyedDataUserData
DtDemyDe
 
const std::string myName
 

Private Member Functions

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

Additional Inherited Members

- Static Protected Attributes inherited from makVrv::DtKeyedDataUserData
static std::atomic< inttheCount
 

Constructor & Destructor Documentation

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

destructor

makVrv::DtHeightMapManager::DtHeightMapManager ( DtDe de,
const std::string &  name,
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 float makVrv::DtHeightMapManager::heightMapResolution ( ) const
virtual

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

virtual void makVrv::DtHeightMapManager::updateHeightCamera ( unsigned int  frameNum,
const osg::Vec3d &  currentPosition 
)
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::enableHeightMapCamera ( bool  enable)
virtual

enable/disable height map camera

virtual bool makVrv::DtHeightMapManager::heightCameraEnabled ( ) 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 osg::Camera* makVrv::DtHeightMapManager::heightCamera ( )
virtual

get the height camera being used by this height map manager

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

Called from DtHeightMapPostDrawFBOCallback for post draw.

virtual bool makVrv::DtHeightMapManager::heightMapChanged ( void  ) const
virtual

Returns whether the height map changed this tick.

virtual const osg::View* makVrv::DtHeightMapManager::osgView ( void  ) const
virtual

view for the camera

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

clean up this manager, called via destructor and slot_oceanHeightMapTextureSizeChanged

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.
virtual void makVrv::DtHeightMapManager::slot_oceanHeightMapTextureSizeChanged ( int  pixels)
protectedvirtual

Set the texture size length and width. The pixel value will be.

virtual void makVrv::DtHeightMapManager::slot_oceanHeightMapResolutionChanged ( float  resolution)
protectedvirtual

slot for when ocean height map resolution changes

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

Handles the terrain data changed signal.

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

Handles the wireframe mode changed signal.

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

slot for when the coordinate system changes

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

Get the texture size length and width.

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

clears the height map changed status

Member Data Documentation

friend makVrv::DtHeightMapManager::DtHeightMapManagerCreator
protected
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::myForceUpdate
protected
float makVrv::DtHeightMapManager::myResolution
protected
bool makVrv::DtHeightMapManager::mySavedPerfOverlayOn
protected
double makVrv::DtHeightMapManager::myLastUpdateTime
protected
const 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
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.

bool makVrv::DtHeightMapManager::myHeightMapChanged = false
protected
const unsigned int makVrv::DtHeightMapManager::myHeightCameraNodeMask
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)