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

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

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

Public Member Functions

 DtOsgCullVisitorParameters ()
 CTOR. More...
 
void setLodScaleFactor (double sf)
 Set the LOD scale factor that affects LODing and paging; this is the product of the channels LOD scale and view magnification. More...
 
double lodScaleFactor () const
 Return the current LOD scale factor. More...
 
void setCameraResolution (double factor)
 Set the zoom factor that effects LODing. More...
 
double cameraResolution () const
 Get the zoom factor. More...
 
void setCameraVelocity (double x, double y, double z)
 Set the camera velocity. More...
 
const osg::Vec3d & cameraVelocity () const
 Get the camera velocity. More...
 
void setTerrainRadius (double rad)
 Set the terrain radius. More...
 
void setAltitude2D (double altitude)
 Set the (implied) altitude when orthoCulling. More...
 
double altitude2D () const
 Return the (implied) 2D altitude. More...
 
unsigned int modelSet () const
 Get the model set currently being rendered. More...
 
void setModelSet (unsigned int modelSet)
 Set the model set currently being rendered. More...
 
double terrainRadius () const
 Get the terrain radius. More...
 
void setOrthoCulling (bool ortho)
 Set whether the culling should be doing in orthographic mode. More...
 
bool orthoCulling () const
 Get whether the culling is to be done in 2D orthographic mode. More...
 
void setSkyRendering (bool renderSky)
 Set whether the sky is being rendered. More...
 
bool skyRendering () const
 Get whether the sky is being rendered. More...
 
void setDynamicLights (bool enabled)
 Set whether dynamic lights are enabled. More...
 
bool dynamicLights () const
 Get whether dynamic lights rendering is enabled. More...
 
void setDynamicOcean (bool enabled)
 Set whether a dynamic ocean rendering is enabled. More...
 
bool dynamicOcean () const
 Get whether a dynamic ocean rendering is enabled. More...
 
void setScaling (bool scaling)
 Set whether scalable groups should be scaled by distance. More...
 
bool scaling () const
 Get whether scalable groups should be scaled by distance. More...
 
void setCoordinateSystemChanged (bool changed)
 Set whether the coordinate system changed this frame. More...
 
bool coordinateSystemChanged () const
 Get whether the coordinate system changed this frame. More...
 
void setModelScaler (DtModelScaler *scaler)
 Set the XR scaler to use. More...
 
DtModelScalerfindModelScaler () const
 
double calculateModelScale (const osg::Camera &camera, const osg::Node &node) const
 calculate the model scale using the registered XR scaler. More...
 
double calculateScale (const osg::Camera &camera, const osg::Vec3d &position, double modelRadius, DtUniqueID objectElementId) const
 
void setClampedPixelSize (double d)
 Set the clamped pixel size calculated when using DtOsgFixedScaleParameters. More...
 
double clampedPixelSize () const
 Retrieve the clamped pixel size set in setClampedPixelSize. More...
 
void setDynamicWaterVisibilityEnable (bool enable)
 Set dynamic water visibility, based on altitude. More...
 
bool dynamicWaterVisibilityEnable () const
 Get whether dynamic water is enabled. More...
 
void setDynamicWaterVisibilityMax (double visMax)
 Set the maximum value to which water visibility will be set when dynamic water visibility is enabled. More...
 
double dynamicWaterVisibilityMax () const
 Get the maximum value to which water visibility will be set when dynamic water visibility is enabled. More...
 
void setTerrainMagnificationScaleFactor (float factor)
 Set the amount that any view magnification value is reduced by when determining the distance to a paged LOD. More...
 
float terrainMagnificationScaleFactor () const
 Get the amount that any view magnification value is reduced by when determining the distance to a paged LOD. More...
 
void setTerrainMagnificationHighLodAngle (float radians)
 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. More...
 
float terrainMagnificationHighLodAngle () const
 Get the viewing angle within which high LOD tiles will be used ex. More...
 
void setIncludeLightPoints (bool flag)
 set the flag for including light points in this cull visitor traversal. If false then light points will be ignored. More...
 
bool includeLightPoints () const
 get the flag for including light points in this cull visitor traversal. If false then light points will be ignored. More...
 
float currentTraversalScaleFactor ()
 get the scale factor for the current place in the cull visitor traversal. More...
 
void setCurrentTraversalScaleFactor (float currentScaleFactor)
 set the scale factor for the current place in the cull visitor traversal. More...
 
void setIndirectDistanceScaleEnabled (bool enabled)
 Set if the distance for culling instanced data is enabled. More...
 
bool indirectDistanceScaleEnabled () const
 True if the distance for culling instanced data is enabled. More...
 
void setIndirectDistanceScale (float scale)
 Set the distance for culling instanced data. More...
 
float indirectDistanceScale () const
 Get the distance for culling instanced data. More...
 
void setChannelLodScale (float scale)
 set the channel lod scale. This is only the channel configuration value and not the view magnification More...
 
float channelLodScale ()
 get the channel lod scale. This is only the channel configuration value and not the view magnification More...
 
void setFocusPoints (std::vector< osg::Vec3d > &points)
 set the focus points. More...
 
std::vector< osg::Vec3d > & focusPoints ()
 get the focus points. More...
 
void setFocusPointEnabled (bool enable)
 set the focust point enabled flag. More...
 
bool focusPointEnabled ()
 get the focust point enabled flag. More...
 

Protected Attributes

double myLodScaleFactor
 
double myCameraResolution
 
double myTerrainRadius
 
double myAltitude2D
 
double myAltitude3D
 
bool mySkyFlag
 
bool myDynamicLightsFlag
 
bool myDynamicOceanFlag
 
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
 

Detailed Description

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

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 ( ) 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::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.

double makVrv::DtOsgCullVisitorParameters::calculateScale ( const osg::Camera &  camera,
const osg::Vec3d &  position,
double  modelRadius,
DtUniqueID  objectElementId 
) const
inline
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

Member Data Documentation

double makVrv::DtOsgCullVisitorParameters::myLodScaleFactor
protected
double makVrv::DtOsgCullVisitorParameters::myCameraResolution
protected
double makVrv::DtOsgCullVisitorParameters::myTerrainRadius
protected
double makVrv::DtOsgCullVisitorParameters::myAltitude2D
protected
double makVrv::DtOsgCullVisitorParameters::myAltitude3D
protected
bool makVrv::DtOsgCullVisitorParameters::mySkyFlag
protected
bool makVrv::DtOsgCullVisitorParameters::myDynamicLightsFlag
protected
bool makVrv::DtOsgCullVisitorParameters::myDynamicOceanFlag
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 Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)