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 Member Functions | Protected Attributes
makVrv::DtOsgCullVisitor Class Reference

DtOsgCullVisitor will inspect the camera to see which visual mode is active. More...

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

Public Member Functions

 DtOsgCullVisitor (DtDe &de)
 CTOR. More...
 
 DtOsgCullVisitor (const DtOsgCullVisitor &)
 Copy constructor. More...
 
void initializeViewDependentSettings ()
 Virtual void. More...
 
bool orthoCulling () const
 Query whether this visitor is doing orthographic culling. More...
 
bool coordinateSystemChanged () const
 Query whether the coordinate system changed this frame (used to reset localToWorkd matrices) More...
 
virtual float getDistanceToScreenEdge (const osg::Vec3 &vec) const
 Get a projected distance from the screen edge (approximate) when orthoCulling. More...
 
virtual float altitude2D () const
 Same as getDistanceToViewPoint() when ortho culling. More...
 
const DtOsgCullVisitorParametersvisitorParameters () const
 Get the cull visitor parameters. More...
 
void setInReflectionPass (bool bReflecting)
 Indicate whether we are now in a reflection pass. More...
 
bool inReflectionPass (void) const
 Query whether this visitor is in a reflection pass. More...
 
const DtDede (void) const
 const accessor for DtDe. More...
 
DtDede (void)
 const accessor for DtDe. More...
 
virtual void apply (osg::Transform &node)
 check for scalable transform and scale as required More...
 
virtual void apply (osg::Node &node)
 check for light point nodes so we can disable shaders on them More...
 
virtual void apply (osg::Group &group)
 check for scalable group and scale bounding sphere as required More...
 
virtual void apply (osg::LightSource &lightSource)
 check for emissive lights in models and make them global More...
 
virtual void apply (osg::Geode &geode)
 sync shader uniforms to the state More...
 
virtual void apply (osg::Camera &node)
 currently unused but can be used for profiling the camera apply More...
 
virtual void apply (osg::Billboard &node)
 process the cull for billboards More...
 
virtual void apply (osg::PagedLOD &node)
 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 More...
 
virtual void apply (osg::OcclusionQueryNode &node)
 process and check the queries for a this query node. More...
 
virtual bool isCulled (osg::Node &node, double scaleFactor)
 for nodes that need scaling, we call this instead of CullVisitor::isCulled More...
 

Protected Member Functions

virtual ~DtOsgCullVisitor ()
 destructor More...
 
virtual float getDistanceToViewPoint (const osg::Vec3 &vec, bool useLOD) const
 Gets the distance to the view point with the given visual mode. More...
 
virtual float calculateFocusPointDistance (const osg::Vec3 &vec, bool useLOD, float magVal) const
 utility function for calculating the distance based on focus points. More...
 
DtOsgCullVisitorParametersgetVisitorParameters () const
 Fetches the info from the visitor's renderInfo object. More...
 
virtual osgUtil::CullVisitor * clone () const
 Protected clone function. More...
 
virtual void reset ()
 reset the light manager and call osgUtil::CullVisitor::reset More...
 
void slot_StateSetChanged (const osg::StateSet *pStateSet)
 connect to the state set changed signal so we can invalidate the uniforms. More...
 

Protected Attributes

DtOsgCullVisitorParametersmyInfoCopy
 
double myAltitude2D
 
double myAltitude3D
 
osg::Matrix myWorldToWindowMatrix
 
DtDemyDe
 
boost::signalslib::connection m_signalConnection
 
bool myIsInReflectionPass
 
bool myIsInTerrain
 

Detailed Description

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

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

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

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

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

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)