OpenSceneGraph 2.8.4
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
osg::CollectOccludersVisitor Class Reference
Inheritance diagram for osg::CollectOccludersVisitor:
Inheritance graph
[legend]

List of all members.

Public Types

typedef std::set
< ShadowVolumeOccluder
ShadowVolumeOccluderSet

Public Member Functions

 CollectOccludersVisitor ()
virtual ~CollectOccludersVisitor ()
 META_NodeVisitor ("osg","CollectOccludersVisitor") virtual CollectOccludersVisitor *cloneType() const
virtual void reset ()
virtual float getDistanceToEyePoint (const Vec3 &pos, bool withLODScale) const
 Get the distance from a point to the eye point, distance value in local coordinate system.
virtual float getDistanceToViewPoint (const Vec3 &pos, bool withLODScale) const
 Get the distance from a point to the view point, distance value in local coordinate system.
virtual float getDistanceFromEyePoint (const Vec3 &pos, bool withLODScale) const
 Get the distance of a point from the eye point, distance value in the eye coordinate system.
virtual void apply (osg::Node &)
virtual void apply (osg::Transform &node)
virtual void apply (osg::Projection &node)
virtual void apply (osg::Switch &node)
virtual void apply (osg::LOD &node)
virtual void apply (osg::OccluderNode &node)
void setMinimumShadowOccluderVolume (float vol)
 Sets the minimum shadow occluder volume that an active occluder must have.
float getMinimumShadowOccluderVolume () const
void setMaximumNumberOfActiveOccluders (unsigned int num)
 Sets the maximum number of occluders to have active for culling purposes.
unsigned int getMaximumNumberOfActiveOccluders () const
void setCreateDrawablesOnOccludeNodes (bool flag)
bool getCreateDrawablesOnOccludeNodes () const
void setCollectedOccluderSet (const ShadowVolumeOccluderSet &svol)
ShadowVolumeOccluderSetgetCollectedOccluderSet ()
const ShadowVolumeOccluderSetgetCollectedOccluderSet () const
void removeOccludedOccluders ()
 Removes occluded occluders for the collected occluders list, then discards all but MaximumNumberOfActiveOccluders of occluders, discarding the occluders with the lowest shadow occluder volume.

Protected Member Functions

CollectOccludersVisitoroperator= (const CollectOccludersVisitor &)
 Prevents unwanted copy construction.
void handle_cull_callbacks_and_traverse (osg::Node &node)
void handle_cull_callbacks_and_accept (osg::Node &node, osg::Node *acceptNode)

Protected Attributes

float _minimumShadowOccluderVolume
unsigned _maximumNumberOfActiveOccluders
bool _createDrawables
ShadowVolumeOccluderSet _occluderSet

Member Typedef Documentation


Constructor & Destructor Documentation

osg::CollectOccludersVisitor::CollectOccludersVisitor ( )
virtual osg::CollectOccludersVisitor::~CollectOccludersVisitor ( ) [virtual]

Member Function Documentation

virtual void osg::CollectOccludersVisitor::apply ( osg::Node ) [virtual]

Reimplemented from osg::NodeVisitor.

virtual void osg::CollectOccludersVisitor::apply ( osg::Projection node) [virtual]

Reimplemented from osg::NodeVisitor.

virtual void osg::CollectOccludersVisitor::apply ( osg::Switch node) [virtual]

Reimplemented from osg::NodeVisitor.

virtual void osg::CollectOccludersVisitor::apply ( osg::LOD node) [virtual]

Reimplemented from osg::NodeVisitor.

virtual void osg::CollectOccludersVisitor::apply ( osg::OccluderNode node) [virtual]

Reimplemented from osg::NodeVisitor.

virtual void osg::CollectOccludersVisitor::apply ( osg::Transform node) [virtual]

Reimplemented from osg::NodeVisitor.

ShadowVolumeOccluderSet& osg::CollectOccludersVisitor::getCollectedOccluderSet ( ) [inline]
const ShadowVolumeOccluderSet& osg::CollectOccludersVisitor::getCollectedOccluderSet ( ) const [inline]
bool osg::CollectOccludersVisitor::getCreateDrawablesOnOccludeNodes ( ) const [inline]
virtual float osg::CollectOccludersVisitor::getDistanceFromEyePoint ( const Vec3 ,
bool   
) const [virtual]

Get the distance of a point from the eye point, distance value in the eye coordinate system.

Note, not all NodeVisitor implement this method, it is mainly cull visitors which will implement. If the getDistanceFromEyePoint(pos) is not implemented than a default value of 0.0 is returned.

Reimplemented from osg::NodeVisitor.

virtual float osg::CollectOccludersVisitor::getDistanceToEyePoint ( const Vec3 ,
bool   
) const [virtual]

Get the distance from a point to the eye point, distance value in local coordinate system.

Note, not all NodeVisitor implement this method, it is mainly cull visitors which will implement. If the getDistanceFromEyePoint(pos) is not implemented then a default value of 0.0 is returned.

Reimplemented from osg::NodeVisitor.

virtual float osg::CollectOccludersVisitor::getDistanceToViewPoint ( const Vec3 ,
bool   
) const [virtual]

Get the distance from a point to the view point, distance value in local coordinate system.

Note, not all NodeVisitor implement this method, it is mainly cull visitors which will implement. If the getDistanceToViewPoint(pos) is not implemented then a default value of 0.0 is returned.

Reimplemented from osg::NodeVisitor.

unsigned int osg::CollectOccludersVisitor::getMaximumNumberOfActiveOccluders ( ) const [inline]
float osg::CollectOccludersVisitor::getMinimumShadowOccluderVolume ( ) const [inline]
void osg::CollectOccludersVisitor::handle_cull_callbacks_and_accept ( osg::Node node,
osg::Node acceptNode 
) [inline, protected]
void osg::CollectOccludersVisitor::handle_cull_callbacks_and_traverse ( osg::Node node) [inline, protected]
osg::CollectOccludersVisitor::META_NodeVisitor ( "osg"  ,
"CollectOccludersVisitor"   
) const [inline]
CollectOccludersVisitor& osg::CollectOccludersVisitor::operator= ( const CollectOccludersVisitor ) [inline, protected]

Prevents unwanted copy construction.

Prevents unwanted copy operator.

void osg::CollectOccludersVisitor::removeOccludedOccluders ( )

Removes occluded occluders for the collected occluders list, then discards all but MaximumNumberOfActiveOccluders of occluders, discarding the occluders with the lowest shadow occluder volume.

virtual void osg::CollectOccludersVisitor::reset ( ) [virtual]

Reimplemented from osg::CullStack.

void osg::CollectOccludersVisitor::setCollectedOccluderSet ( const ShadowVolumeOccluderSet svol) [inline]
void osg::CollectOccludersVisitor::setCreateDrawablesOnOccludeNodes ( bool  flag) [inline]
void osg::CollectOccludersVisitor::setMaximumNumberOfActiveOccluders ( unsigned int  num) [inline]

Sets the maximum number of occluders to have active for culling purposes.

void osg::CollectOccludersVisitor::setMinimumShadowOccluderVolume ( float  vol) [inline]

Sets the minimum shadow occluder volume that an active occluder must have.

vol is units relative the clip space volume where 1.0 is the whole clip space.


Member Data Documentation


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

osg logo
Generated at Sun Jan 8 2012 13:16:07 for the OpenSceneGraph by doxygen 1.7.4.