VR-Forces 5.0.2 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 Attributes
makVrv::DtOsgCullVisitorParameters Class Reference

The osg cull vistor parameters class provides additional culling and intersector parameters for choosing the LOD, and cull operations.

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

Public Member Functions

 DtOsgCullVisitorParameters ()
 
void setLodScaleFactor (double sf)
 
double lodScaleFactor () const
 
void setCameraResolution (double factor)
 
double cameraResolution () const
 
void setCameraVelocity (double x, double y, double z)
 
const osg::Vec3d & cameraVelocity () const
 
void setTerrainRadius (double rad)
 
void setAltitude2D (double altitude)
 
double altitude2D () const
 
unsigned int modelSet () const
 
void setModelSet (unsigned int modelSet)
 
double terrainRadius () const
 
void setOrthoCulling (bool ortho)
 
bool orthoCulling () const
 
void setSkyRendering (bool renderSky)
 
bool skyRendering () const
 
void setDynamicLights (bool enabled)
 
bool dynamicLights () const
 
void setDynamicOcean (bool enabled)
 
bool dynamicOcean () const
 
void setCameraAboveWater (bool aboveWater)
 
bool cameraAboveWater () const
 
void setScaling (bool scaling)
 
bool scaling () const
 
void setCoordinateSystemChanged (bool changed)
 
bool coordinateSystemChanged () const
 
void setModelScaler (DtModelScaler *scaler)
 
DtModelScalerfindModelScaler () const
 
double calculateModelScale (const osg::Camera &camera, const osg::Node &node) const
 
void setClampedPixelSize (double d)
 
double clampedPixelSize () const
 
void setDynamicWaterVisibilityEnable (bool enable)
 
bool dynamicWaterVisibilityEnable () const
 
void setDynamicWaterVisibilityMax (double visMax)
 
double dynamicWaterVisibilityMax () const
 
void setTerrainMagnificationScaleFactor (float factor)
 
float terrainMagnificationScaleFactor () const
 
void setTerrainMagnificationHighLodAngle (float radians)
 
float terrainMagnificationHighLodAngle () const
 
void setIncludeLightPoints (bool flag)
 
bool includeLightPoints () const
 
float currentTraversalScaleFactor ()
 
void setCurrentTraversalScaleFactor (float currentScaleFactor)
 
void setIndirectDistanceScaleEnabled (bool enabled)
 
bool indirectDistanceScaleEnabled () const
 
void setIndirectDistanceScale (float scale)
 
float indirectDistanceScale () const
 
void setChannelLodScale (float scale)
 
float channelLodScale ()
 
void setFocusPoints (std::vector< osg::Vec3d > &points)
 
std::vector< osg::Vec3d > & focusPoints ()
 
void setFocusPointEnabled (bool enable)
 
bool focusPointEnabled ()
 
virtual
DtIndirectModelScalingAlgorithm 
indirectModelScalingAlgorithm (void) const
 

Protected Attributes

double myLodScaleFactor
 
double myCameraResolution
 
double myTerrainRadius
 
double myAltitude2D
 
bool mySkyFlag
 
bool myDynamicLightsFlag
 
bool myDynamicOceanFlag
 
bool myCameraAboveWater
 
bool myOrthoFlag
 
bool myScalingFlag
 
double myClampedPixelSize
 
bool myCoordinateSystemChanged
 
bool myDynamicWaterVisibilityEnable
 
double myDynamicWaterVisibilityMax
 
osg::ref_ptr< DtModelScalermyModelScaler
 
float myTerrainMagnificationScaleFactor
 
float myTerrainMagnificationHighLodAngle
 
osg::Vec3d myCameraVelocity
 
unsigned int myModelSet
 
bool myIncludeLightPoints
 
float myCurrentScaleFactor
 
bool myIndirectDistScaleEnabled
 
float myIndirectDistScale
 
std::vector< osg::Vec3d > myFocusPoints
 
float myChannelLodScale
 
bool myFocusPointEnabled
 

Constructor & Destructor Documentation

makVrv::DtOsgCullVisitorParameters::DtOsgCullVisitorParameters ( )
inline

CTOR.

Member Function Documentation

void makVrv::DtOsgCullVisitorParameters::setLodScaleFactor ( double  sf)
inline

Set the LOD scale factor that affects LODing and paging; this is the product of the channels LOD scale and view magnification.

double makVrv::DtOsgCullVisitorParameters::lodScaleFactor ( ) const
inline

Return the current LOD scale factor.

void makVrv::DtOsgCullVisitorParameters::setCameraResolution ( double  factor)
inline

Set the zoom factor that effects LODing.

double makVrv::DtOsgCullVisitorParameters::cameraResolution ( ) const
inline

Get the zoom factor.

void makVrv::DtOsgCullVisitorParameters::setCameraVelocity ( double  x,
double  y,
double  z 
)
inline

Set the camera velocity.

const osg::Vec3d& makVrv::DtOsgCullVisitorParameters::cameraVelocity ( ) const
inline

Get the camera velocity.

void makVrv::DtOsgCullVisitorParameters::setTerrainRadius ( double  rad)
inline

Set the terrain radius.

void makVrv::DtOsgCullVisitorParameters::setAltitude2D ( double  altitude)
inline

Set the (implied) altitude when orthoCulling.

double makVrv::DtOsgCullVisitorParameters::altitude2D ( ) const
inline

Return the (implied) 2D altitude.

unsigned int makVrv::DtOsgCullVisitorParameters::modelSet ( void  ) const
inline

Get the model set currently being rendered.

void makVrv::DtOsgCullVisitorParameters::setModelSet ( unsigned int  modelSet)
inline

Set the model set currently being rendered.

double makVrv::DtOsgCullVisitorParameters::terrainRadius ( ) const
inline

Get the terrain radius.

Referenced by makVrv::DtOsgFixedScaleParameters::calculateScaleFactors().

void makVrv::DtOsgCullVisitorParameters::setOrthoCulling ( bool  ortho)
inline

Set whether the culling should be doing in orthographic mode.

bool makVrv::DtOsgCullVisitorParameters::orthoCulling ( ) const
inline

Get whether the culling is to be done in 2D orthographic mode.

void makVrv::DtOsgCullVisitorParameters::setSkyRendering ( bool  renderSky)
inline

Set whether the sky is being rendered.

bool makVrv::DtOsgCullVisitorParameters::skyRendering ( ) const
inline

Get whether the sky is being rendered.

void makVrv::DtOsgCullVisitorParameters::setDynamicLights ( bool  enabled)
inline

Set whether dynamic lights are enabled.

bool makVrv::DtOsgCullVisitorParameters::dynamicLights ( ) const
inline

Get whether dynamic lights rendering is enabled.

void makVrv::DtOsgCullVisitorParameters::setDynamicOcean ( bool  enabled)
inline

Set whether a dynamic ocean rendering is enabled.

bool makVrv::DtOsgCullVisitorParameters::dynamicOcean ( ) const
inline

Get whether a dynamic ocean rendering is enabled.

void makVrv::DtOsgCullVisitorParameters::setCameraAboveWater ( bool  aboveWater)
inline

Set whether the camera is above water.

bool makVrv::DtOsgCullVisitorParameters::cameraAboveWater ( ) const
inline

Get whether the camera is above water.

void makVrv::DtOsgCullVisitorParameters::setScaling ( bool  scaling)
inline

Set whether scalable groups should be scaled by distance.

bool makVrv::DtOsgCullVisitorParameters::scaling ( ) const
inline

Get whether scalable groups should be scaled by distance.

void makVrv::DtOsgCullVisitorParameters::setCoordinateSystemChanged ( bool  changed)
inline

Set whether the coordinate system changed this frame.

bool makVrv::DtOsgCullVisitorParameters::coordinateSystemChanged ( ) const
inline

Get whether the coordinate system changed this frame.

void makVrv::DtOsgCullVisitorParameters::setModelScaler ( DtModelScaler scaler)
inline

Set the XR scaler to use. This will not typically be called by users to change the XR Node Scaler, register a new DtOsgModelScalerCreator.

DtModelScaler* makVrv::DtOsgCullVisitorParameters::findModelScaler ( ) const
inline
double makVrv::DtOsgCullVisitorParameters::calculateModelScale ( const osg::Camera &  camera,
const osg::Node &  node 
) const
inline

calculate the model scale using the registered XR scaler.

void makVrv::DtOsgCullVisitorParameters::setClampedPixelSize ( double  d)
inline

Set the clamped pixel size calculated when using DtOsgFixedScaleParameters. This is ust used to pass the value from one form of calculateScaleFactors to the other.

Referenced by makVrv::DtOsgFixedScaleParameters::calculateScaleFactors().

double makVrv::DtOsgCullVisitorParameters::clampedPixelSize ( ) const
inline

Retrieve the clamped pixel size set in setClampedPixelSize.

Referenced by makVrv::DtOsgFixedScaleParameters::calculateScaleFactors().

void makVrv::DtOsgCullVisitorParameters::setDynamicWaterVisibilityEnable ( bool  enable)
inline

Set dynamic water visibility, based on altitude. Water visibility will be scaled from its specified value at 0 alt to the max value specified.

bool makVrv::DtOsgCullVisitorParameters::dynamicWaterVisibilityEnable ( ) const
inline

Get whether dynamic water is enabled.

void makVrv::DtOsgCullVisitorParameters::setDynamicWaterVisibilityMax ( double  visMax)
inline

Set the maximum value to which water visibility will be set when dynamic water visibility is enabled.

double makVrv::DtOsgCullVisitorParameters::dynamicWaterVisibilityMax ( ) const
inline

Get the maximum value to which water visibility will be set when dynamic water visibility is enabled.

void makVrv::DtOsgCullVisitorParameters::setTerrainMagnificationScaleFactor ( float  factor)
inline

Set the amount that any view magnification value is reduced by when determining the distance to a paged LOD.

float makVrv::DtOsgCullVisitorParameters::terrainMagnificationScaleFactor ( ) const
inline

Get the amount that any view magnification value is reduced by when determining the distance to a paged LOD.

void makVrv::DtOsgCullVisitorParameters::setTerrainMagnificationHighLodAngle ( float  radians)
inline

Set the angle used when paging in high LOD tiles, the angle (radians) represents the half angle, so view dir +/- angle is used like a camera FOV A smaller number results in fewer high LOD tiles and saves memory. A larger number will prevent cracks between tiles by bringing in more nearby high LOD tiles but will use more memory.

float makVrv::DtOsgCullVisitorParameters::terrainMagnificationHighLodAngle ( ) const
inline

Get the viewing angle within which high LOD tiles will be used

ex. rad angle=0.26179 = 15 degrees, so view direction + 15 and -15 (so 30 deg total) will be used. Any tile centers in that range will use high LOD.

void makVrv::DtOsgCullVisitorParameters::setIncludeLightPoints ( bool  flag)
inline

set the flag for including light points in this cull visitor traversal. If false then light points will be ignored.

bool makVrv::DtOsgCullVisitorParameters::includeLightPoints ( ) const
inline

get the flag for including light points in this cull visitor traversal. If false then light points will be ignored.

float makVrv::DtOsgCullVisitorParameters::currentTraversalScaleFactor ( )
inline

get the scale factor for the current place in the cull visitor traversal. this is used by the light point node so it can know how much to scale the light point size.

void makVrv::DtOsgCullVisitorParameters::setCurrentTraversalScaleFactor ( float  currentScaleFactor)
inline

set the scale factor for the current place in the cull visitor traversal. this is used by the light point node so it can know how much to scale the light point size.

void makVrv::DtOsgCullVisitorParameters::setIndirectDistanceScaleEnabled ( bool  enabled)
inline

Set if the distance for culling instanced data is enabled.

bool makVrv::DtOsgCullVisitorParameters::indirectDistanceScaleEnabled ( ) const
inline

True if the distance for culling instanced data is enabled.

void makVrv::DtOsgCullVisitorParameters::setIndirectDistanceScale ( float  scale)
inline

Set the distance for culling instanced data.

float makVrv::DtOsgCullVisitorParameters::indirectDistanceScale ( ) const
inline

Get the distance for culling instanced data.

void makVrv::DtOsgCullVisitorParameters::setChannelLodScale ( float  scale)
inline

set the channel lod scale. This is only the channel configuration value and not the view magnification

float makVrv::DtOsgCullVisitorParameters::channelLodScale ( )
inline

get the channel lod scale. This is only the channel configuration value and not the view magnification

void makVrv::DtOsgCullVisitorParameters::setFocusPoints ( std::vector< osg::Vec3d > &  points)
inline

set the focus points. These are used to calculate the terrain intersections which are then used to limit the LODs that are far away from them.

std::vector<osg::Vec3d>& makVrv::DtOsgCullVisitorParameters::focusPoints ( )
inline

get the focus points. These are used to calculate the terrain intersections which are then used to limit the LODs that are far away from them.

void makVrv::DtOsgCullVisitorParameters::setFocusPointEnabled ( bool  enable)
inline

set the focust point enabled flag. If enabled the focus point distances and angles are used to calculate locations used to limit the lods thar are far away from them

bool makVrv::DtOsgCullVisitorParameters::focusPointEnabled ( )
inline

get the focust point enabled flag. If enabled the focus point distances and angles are used to calculate locations used to limit the lods thar are far away from them

virtual DtIndirectModelScalingAlgorithm makVrv::DtOsgCullVisitorParameters::indirectModelScalingAlgorithm ( void  ) const
virtual

get the scaling algorithm in effect

Member Data Documentation

double makVrv::DtOsgCullVisitorParameters::myLodScaleFactor
protected
double makVrv::DtOsgCullVisitorParameters::myCameraResolution
protected
double makVrv::DtOsgCullVisitorParameters::myTerrainRadius
protected
double makVrv::DtOsgCullVisitorParameters::myAltitude2D
protected
bool makVrv::DtOsgCullVisitorParameters::mySkyFlag
protected
bool makVrv::DtOsgCullVisitorParameters::myDynamicLightsFlag
protected
bool makVrv::DtOsgCullVisitorParameters::myDynamicOceanFlag
protected
bool makVrv::DtOsgCullVisitorParameters::myCameraAboveWater
protected
bool makVrv::DtOsgCullVisitorParameters::myOrthoFlag
protected
bool makVrv::DtOsgCullVisitorParameters::myScalingFlag
protected
double makVrv::DtOsgCullVisitorParameters::myClampedPixelSize
protected
bool makVrv::DtOsgCullVisitorParameters::myCoordinateSystemChanged
protected
bool makVrv::DtOsgCullVisitorParameters::myDynamicWaterVisibilityEnable
protected
double makVrv::DtOsgCullVisitorParameters::myDynamicWaterVisibilityMax
protected
osg::ref_ptr<DtModelScaler> makVrv::DtOsgCullVisitorParameters::myModelScaler
protected
float makVrv::DtOsgCullVisitorParameters::myTerrainMagnificationScaleFactor
protected
float makVrv::DtOsgCullVisitorParameters::myTerrainMagnificationHighLodAngle
protected
osg::Vec3d makVrv::DtOsgCullVisitorParameters::myCameraVelocity
protected
unsigned int makVrv::DtOsgCullVisitorParameters::myModelSet
protected
bool makVrv::DtOsgCullVisitorParameters::myIncludeLightPoints
protected
float makVrv::DtOsgCullVisitorParameters::myCurrentScaleFactor
protected
bool makVrv::DtOsgCullVisitorParameters::myIndirectDistScaleEnabled
protected
float makVrv::DtOsgCullVisitorParameters::myIndirectDistScale
protected
std::vector<osg::Vec3d> makVrv::DtOsgCullVisitorParameters::myFocusPoints
protected
float makVrv::DtOsgCullVisitorParameters::myChannelLodScale
protected
bool makVrv::DtOsgCullVisitorParameters::myFocusPointEnabled
protected

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

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)