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::DtOsgCullVisitor Class Reference

DtOsgCullVisitor will inspect the camera to see which visual mode is active. If the visual mode is a 2D display mode, it changes the way LODs are paged in by pixel size and zoom level, else uses a distance from eye-point check with no LOD scale.

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

Public Member Functions

 DtOsgCullVisitor (DtDe &de)
 
 DtOsgCullVisitor (const DtOsgCullVisitor &rhs)
 
virtual void initializeViewDependentSettings ()
 
virtual void setMaximumMagnificationAngle (double angleRadians)
 
virtual double maximumMagnificationAngle () const
 
virtual bool orthoCulling () const
 
virtual bool coordinateSystemChanged () const
 
virtual float getDistanceToScreenEdge (const osg::Vec3 &vec) const
 
virtual float altitude2D () const
 
virtual const
DtOsgCullVisitorParameters
visitorParameters () const
 
virtual void apply (osg::Transform &node) override
 
virtual void apply (osg::Node &node) override
 
virtual void apply (osg::Group &group) override
 
virtual void apply (osg::LightSource &lightSource) override
 
virtual void apply (osg::Geode &geode) override
 
virtual void apply (osg::Camera &node) override
 
virtual void apply (osg::Billboard &node) override
 
virtual bool isCulled (osg::Node &node, double scaleFactor)
 
virtual float getDistanceToViewPoint (const osg::Vec3 &vec, bool useLOD) const override
 
virtual void preCull ()
 

Protected Member Functions

virtual ~DtOsgCullVisitor ()
 
virtual float calculateFocusPointDistance (const osg::Vec3 &vec, bool useLOD, float magVal, double angle) const
 
virtual
DtOsgCullVisitorParameters
getVisitorParameters () const
 
virtual osgUtil::CullVisitor * clone () const
 
virtual bool isOcean (const osg::Node *node) const
 
virtual void slot_StateSetChanged (const osg::StateSet *pStateSet)
 
virtual void slot_coordinateSystemChanged ()
 

Protected Attributes

DtOsgCullVisitorParametersmyInfoCopy
 
double myAltitude2D
 
double myAltitude3D
 
osg::Matrix myWorldToWindowMatrix
 
DtDemyDe
 
boost::signalslib::connection m_signalConnection
 
bool myIsInTerrain
 
DtSignalConnectionManager myConnections
 
DtCoordinateSystemmyCoordinateSystem = nullptr
 
double myMaximumMagnificationAngle
 
DtSkyObjectManagermySkyObjectManager
 
bool myHasCurrentCamera
 
osg::Matrix myCurrentCameraViewMatrixI
 
osg::Matrix myMainCameraViewMatrixI
 

Private Member Functions

 DtOsgCullVisitor ()=delete
 
DtOsgCullVisitoroperator= (DtOsgCullVisitor &rhs)=delete
 

Constructor & Destructor Documentation

makVrv::DtOsgCullVisitor::DtOsgCullVisitor ( DtDe de)

CTOR.

makVrv::DtOsgCullVisitor::DtOsgCullVisitor ( const DtOsgCullVisitor rhs)

Copy constructor.

virtual makVrv::DtOsgCullVisitor::~DtOsgCullVisitor ( )
protectedvirtual

destructor

makVrv::DtOsgCullVisitor::DtOsgCullVisitor ( )
privatedelete

not allowed

Member Function Documentation

DtOsgCullVisitor& makVrv::DtOsgCullVisitor::operator= ( DtOsgCullVisitor rhs)
privatedelete

not allowed

virtual void makVrv::DtOsgCullVisitor::initializeViewDependentSettings ( )
virtual

Virtual void.

virtual void makVrv::DtOsgCullVisitor::setMaximumMagnificationAngle ( double  angleRadians)
virtual

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. Note that this is called from initializeViewDependentSettings(), however this method allows override behavior and/or the ability to change the value after initializeViewDependentSettings() has been called.

virtual double makVrv::DtOsgCullVisitor::maximumMagnificationAngle ( ) const
virtual

Get 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.

virtual bool makVrv::DtOsgCullVisitor::orthoCulling ( ) const
virtual

Query whether this visitor is doing orthographic culling.

virtual bool makVrv::DtOsgCullVisitor::coordinateSystemChanged ( ) const
virtual

Query whether the coordinate system changed this frame (used to reset localToWorkd matrices)

virtual float makVrv::DtOsgCullVisitor::getDistanceToScreenEdge ( const osg::Vec3 &  vec) const
virtual

Get a projected distance from the screen edge (approximate) when orthoCulling.

virtual float makVrv::DtOsgCullVisitor::altitude2D ( ) const
virtual

Same as getDistanceToViewPoint() when ortho culling.

virtual const DtOsgCullVisitorParameters* makVrv::DtOsgCullVisitor::visitorParameters ( ) const
virtual

Get the cull visitor parameters.

virtual void makVrv::DtOsgCullVisitor::apply ( osg::Transform &  node)
overridevirtual

check for scalable transform and scale as required

virtual void makVrv::DtOsgCullVisitor::apply ( osg::Node &  node)
overridevirtual

check for light point nodes so we can disable shaders on them

virtual void makVrv::DtOsgCullVisitor::apply ( osg::Group &  group)
overridevirtual

check for scalable group and scale bounding sphere as required

virtual void makVrv::DtOsgCullVisitor::apply ( osg::LightSource &  lightSource)
overridevirtual

check for emissive lights in models and make them global

virtual void makVrv::DtOsgCullVisitor::apply ( osg::Geode &  geode)
overridevirtual

sync shader uniforms to the state

virtual void makVrv::DtOsgCullVisitor::apply ( osg::Camera &  node)
overridevirtual

currently unused but can be used for profiling the camera apply

virtual void makVrv::DtOsgCullVisitor::apply ( osg::Billboard &  node)
overridevirtual

process the cull for billboards

virtual bool makVrv::DtOsgCullVisitor::isCulled ( osg::Node &  node,
double  scaleFactor 
)
virtual

for nodes that need scaling, we call this instead of CullVisitor::isCulled

virtual float makVrv::DtOsgCullVisitor::getDistanceToViewPoint ( const osg::Vec3 &  vec,
bool  useLOD 
) const
overridevirtual

Gets the distance to the view point with the given visual mode. Will be used to page in LODs.

virtual void makVrv::DtOsgCullVisitor::preCull ( )
virtual

Internally calls renderer preCull. This should only be called by the main thread, once per cullVisitor, and before any culling takes place.

virtual float makVrv::DtOsgCullVisitor::calculateFocusPointDistance ( const osg::Vec3 &  vec,
bool  useLOD,
float  magVal,
double  angle 
) const
protectedvirtual

utility function for calculating the distance based on focus points.

virtual DtOsgCullVisitorParameters* makVrv::DtOsgCullVisitor::getVisitorParameters ( ) const
protectedvirtual

Fetches the info from the visitor's renderInfo object.

virtual osgUtil::CullVisitor* makVrv::DtOsgCullVisitor::clone ( ) const
protectedvirtual

Protected clone function.

virtual bool makVrv::DtOsgCullVisitor::isOcean ( const osg::Node *  node) const
protectedvirtual

whether is ocean

virtual void makVrv::DtOsgCullVisitor::slot_StateSetChanged ( const osg::StateSet *  pStateSet)
protectedvirtual

connect to the state set changed signal so we can invalidate the uniforms.

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

slot for when the coordinate system changes

Member Data Documentation

DtOsgCullVisitorParameters* makVrv::DtOsgCullVisitor::myInfoCopy
protected
double makVrv::DtOsgCullVisitor::myAltitude2D
protected
double makVrv::DtOsgCullVisitor::myAltitude3D
protected
osg::Matrix makVrv::DtOsgCullVisitor::myWorldToWindowMatrix
protected
DtDe& makVrv::DtOsgCullVisitor::myDe
protected
boost::signalslib::connection makVrv::DtOsgCullVisitor::m_signalConnection
protected
bool makVrv::DtOsgCullVisitor::myIsInTerrain
protected
DtSignalConnectionManager makVrv::DtOsgCullVisitor::myConnections
protected
DtCoordinateSystem* makVrv::DtOsgCullVisitor::myCoordinateSystem = nullptr
protected

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

double makVrv::DtOsgCullVisitor::myMaximumMagnificationAngle
protected
DtSkyObjectManager& makVrv::DtOsgCullVisitor::mySkyObjectManager
protected
bool makVrv::DtOsgCullVisitor::myHasCurrentCamera
protected
osg::Matrix makVrv::DtOsgCullVisitor::myCurrentCameraViewMatrixI
protected
osg::Matrix makVrv::DtOsgCullVisitor::myMainCameraViewMatrixI
protected

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

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)