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 Member Functions | Protected Attributes
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 &)
 
void initializeViewDependentSettings ()
 
bool orthoCulling () const
 
bool coordinateSystemChanged () const
 
virtual float getDistanceToScreenEdge (const osg::Vec3 &vec) const
 
virtual float altitude2D () const
 
const DtOsgCullVisitorParametersvisitorParameters () const
 
void setInReflectionPass (bool bReflecting)
 
bool inReflectionPass (void) const
 
const DtDede (void) const
 
DtDede (void)
 
virtual void apply (osg::Transform &node)
 
virtual void apply (osg::Node &node)
 
virtual void apply (osg::Group &group)
 
virtual void apply (osg::LightSource &lightSource)
 
virtual void apply (osg::Geode &geode)
 
virtual void apply (osg::Camera &node)
 
virtual void apply (osg::Billboard &node)
 
virtual void apply (osg::PagedLOD &node)
 
virtual void apply (osg::OcclusionQueryNode &node)
 
virtual bool isCulled (osg::Node &node, double scaleFactor)
 

Protected Member Functions

virtual ~DtOsgCullVisitor ()
 
virtual float getDistanceToViewPoint (const osg::Vec3 &vec, bool useLOD) const
 
virtual float calculateFocusPointDistance (const osg::Vec3 &vec, bool useLOD, float magVal) const
 
DtOsgCullVisitorParametersgetVisitorParameters () const
 
virtual osgUtil::CullVisitor * clone () const
 
virtual void reset ()
 
virtual bool isOcean (const osg::Node *node) const
 
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 myIsInReflectionPass
 
bool myIsInTerrain
 
DtSignalConnectionManager myConnections
 
DtCoordinateSystemmyCoordinateSystem = nullptr
 
double myMaximumMagnificationAngle
 

Constructor & Destructor Documentation

makVrv::DtOsgCullVisitor::DtOsgCullVisitor ( DtDe de)

CTOR.

makVrv::DtOsgCullVisitor::DtOsgCullVisitor ( const DtOsgCullVisitor )

Copy constructor.

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

destructor

Member Function Documentation

void makVrv::DtOsgCullVisitor::initializeViewDependentSettings ( )

Virtual void.

bool makVrv::DtOsgCullVisitor::orthoCulling ( ) const

Query whether this visitor is doing orthographic culling.

bool makVrv::DtOsgCullVisitor::coordinateSystemChanged ( ) const

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.

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

Get the cull visitor parameters.

void makVrv::DtOsgCullVisitor::setInReflectionPass ( bool  bReflecting)
inline

Indicate whether we are now in a reflection pass.

bool makVrv::DtOsgCullVisitor::inReflectionPass ( void  ) const
inline

Query whether this visitor is in a reflection pass.

const DtDe& makVrv::DtOsgCullVisitor::de ( void  ) const

const accessor for DtDe. This accessor is useful for retrieving DtDe, in classes where DtDe is not directly accessible for example: osg earth, osg plugins

DtDe& makVrv::DtOsgCullVisitor::de ( void  )

const accessor for DtDe. This accessor is useful for retrieving DtDe, in classes where DtDe is not directly accessible for example: osg earth, osg plugins

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

check for scalable transform and scale as required

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

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

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

check for scalable group and scale bounding sphere as required

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

check for emissive lights in models and make them global

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

sync shader uniforms to the state

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

currently unused but can be used for profiling the camera apply

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

process the cull for billboards

virtual void makVrv::DtOsgCullVisitor::apply ( osg::PagedLOD &  node)
virtual

used so we know when the cull visitor is below a paged lod in the scene graph this lets us apply the paged lod magnification scale factor only to things under paged lods

virtual void makVrv::DtOsgCullVisitor::apply ( osg::OcclusionQueryNode &  node)
virtual

process and check the queries for a this query node.

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
protectedvirtual

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

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

utility function for calculating the distance based on focus points.

DtOsgCullVisitorParameters* makVrv::DtOsgCullVisitor::getVisitorParameters ( ) const
protected

Fetches the info from the visitor's renderInfo object.

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

Protected clone function.

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

reset the light manager and call osgUtil::CullVisitor::reset

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

whether is ocean

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

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::myIsInReflectionPass
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

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)