VR-Forces 4.6 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
makVrv::DtTritonHeightMapManager Class Reference

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

Public Member Functions

 DtTritonHeightMapManager (makVrv::DtDe &de, DtTritonDrawable *parentDrawable, osg::View *view)
virtual ~DtTritonHeightMapManager ()
void setupHeightMap (void)
 Sets up the height map's resources.
void setHeightMapResolution (float resolution)
 Set the height map resolution in meters per texel.
float getHeightMapResolution () const
 Gets the meters represented by one texel of the height map.
void setHeightMapTextureSize (int pixels)
 Set the texture size length and width.
int heightMapTextureSize () const
 Get the texture size length and width.
bool updateHeightCamera (unsigned int frameNum, const osg::Vec3 &currentPosition, bool isGeocentric)
 Updates the height map as needed; call once per frame.
void setHeightCameraAttachment (bool enabled)
 Attaches or detaches the height map camera from the scene graph.
const osg::Matrix & getHeightMapMatrix ()
 Retrieve the matrix to transform world coordinate to texture coords.
const osg::ref_ptr
< osg::Texture2D > 
getHeightMapTexture ()
 Retrieve the height map itself.
void forceUpdate ()
 Force a height map update on the next frame.

Protected Member Functions

void cleanup ()
osg::Matrixd oglRevDepthOrtho (double left, double right, double bottom, double top, double zNear, double zFar)

Protected Attributes

osg::Vec3 myLastHeightUpdatePos
unsigned int myHeightUpdateFrame
bool myHeightCameraAttached
bool myForceUpdate
float myResolution
bool mySavedPerfOverlayOn
double myLastUpdateTime
osg::ref_ptr< osg::Texture2D > myHeightMap
osg::ref_ptr< osg::Texture2D > myDepthTexture
osg::Matrix myHeightMapMatrix
int myHeightMapDimension
osg::ref_ptr< osg::Camera > myHeightCamera
makVrv::DtDemyDe
DtTritonDrawablemyDrawable
DtSignalConnectionManager myConnections
osg::View * myOsgView

Detailed Description

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

Constructor & Destructor Documentation

makVrv::DtTritonHeightMapManager::DtTritonHeightMapManager ( makVrv::DtDe de,
DtTritonDrawable parentDrawable,
osg::View *  view 
)
virtual makVrv::DtTritonHeightMapManager::~DtTritonHeightMapManager ( )
virtual

Member Function Documentation

void makVrv::DtTritonHeightMapManager::setupHeightMap ( void  )

Sets up the height map's resources.

void makVrv::DtTritonHeightMapManager::setHeightMapResolution ( float  resolution)

Set the height map resolution in meters per texel.

float makVrv::DtTritonHeightMapManager::getHeightMapResolution ( ) const

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

void makVrv::DtTritonHeightMapManager::setHeightMapTextureSize ( int  pixels)

Set the texture size length and width.

The pixel value will be

int makVrv::DtTritonHeightMapManager::heightMapTextureSize ( ) const

Get the texture size length and width.

bool makVrv::DtTritonHeightMapManager::updateHeightCamera ( unsigned int  frameNum,
const osg::Vec3 &  currentPosition,
bool  isGeocentric 
)

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

Returns true if there is a new height map ready.

void makVrv::DtTritonHeightMapManager::setHeightCameraAttachment ( bool  enabled)

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

const osg::Matrix& makVrv::DtTritonHeightMapManager::getHeightMapMatrix ( )
inline

Retrieve the matrix to transform world coordinate to texture coords.

References myHeightMapMatrix.

const osg::ref_ptr<osg::Texture2D> makVrv::DtTritonHeightMapManager::getHeightMapTexture ( )
inline

Retrieve the height map itself.

References myHeightMap.

void makVrv::DtTritonHeightMapManager::forceUpdate ( )
inline

Force a height map update on the next frame.

References myForceUpdate.

void makVrv::DtTritonHeightMapManager::cleanup ( )
protected
osg::Matrixd makVrv::DtTritonHeightMapManager::oglRevDepthOrtho ( double  left,
double  right,
double  bottom,
double  top,
double  zNear,
double  zFar 
)
protected

Member Data Documentation

osg::Vec3 makVrv::DtTritonHeightMapManager::myLastHeightUpdatePos
protected
unsigned int makVrv::DtTritonHeightMapManager::myHeightUpdateFrame
protected
bool makVrv::DtTritonHeightMapManager::myHeightCameraAttached
protected
bool makVrv::DtTritonHeightMapManager::myForceUpdate
protected

Referenced by forceUpdate().

float makVrv::DtTritonHeightMapManager::myResolution
protected
bool makVrv::DtTritonHeightMapManager::mySavedPerfOverlayOn
protected
double makVrv::DtTritonHeightMapManager::myLastUpdateTime
protected
osg::ref_ptr<osg::Texture2D> makVrv::DtTritonHeightMapManager::myHeightMap
protected

Referenced by getHeightMapTexture().

osg::ref_ptr<osg::Texture2D> makVrv::DtTritonHeightMapManager::myDepthTexture
protected
osg::Matrix makVrv::DtTritonHeightMapManager::myHeightMapMatrix
protected

Referenced by getHeightMapMatrix().

int makVrv::DtTritonHeightMapManager::myHeightMapDimension
protected
osg::ref_ptr<osg::Camera> makVrv::DtTritonHeightMapManager::myHeightCamera
protected
makVrv::DtDe& makVrv::DtTritonHeightMapManager::myDe
protected
DtTritonDrawable* makVrv::DtTritonHeightMapManager::myDrawable
protected
DtSignalConnectionManager makVrv::DtTritonHeightMapManager::myConnections
protected
osg::View* makVrv::DtTritonHeightMapManager::myOsgView
protected

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

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)