OpenFrames
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
OpenFrames::DistanceAccumulator Class Reference

This class computes distances to drawables and splits the scene if necessary. More...

#include <DistanceAccumulator.hpp>

Inheritance diagram for OpenFrames::DistanceAccumulator:

Public Types

typedef std::pair< double, double > DistancePair
 
typedef std::vector< DistancePair > PairList
 

Public Member Functions

virtual void apply (osg::Node &node)
 
virtual void apply (osg::Projection &proj)
 
virtual void apply (osg::Transform &transform)
 
virtual void apply (osg::Geode &geode)
 
void setMatrices (const osg::Matrix &modelview, const osg::Matrix &projection)
 
virtual void reset ()
 
void computeCameraPairs ()
 
PairList & getCameraPairs ()
 
PairList & getDistancePairs ()
 
DistancePair & getLimits ()
 
void setNearFarRatio (double ratio)
 
double getNearFarRatio () const
 
void setMaxDepth (unsigned int depth)
 
unsigned int getMaxDepth () const
 
void setMinZNear (double minZNear)
 
double getMinZNear ()
 

Protected Types

typedef std::pair< unsigned int, unsigned int > bbCornerPair
 

Protected Member Functions

void pushLocalFrustum ()
 
void pushDistancePair (double zNear, double zFar)
 
bool shouldContinueTraversal (osg::Node &node)
 

Protected Attributes

osg::fast_back_stack< osg::Matrix > _viewMatrices
 
osg::fast_back_stack< osg::Matrix > _projectionMatrices
 
osg::Matrix _modelview
 
osg::Matrix _projection
 
osg::fast_back_stack< osg::Polytope > _localFrusta
 
osg::fast_back_stack< bbCornerPair > _bbCorners
 
PairList _cameraPairs
 
PairList _distancePairs
 
DistancePair _limits
 
double _nearFarRatio
 
unsigned int _maxDepth
 
unsigned int _currentDepth
 
double _minZNear
 

Detailed Description

This class computes distances to drawables and splits the scene if necessary.

This class traverses the scene, computes the distance to each visible drawable and splits up the scene if the latter are too far away (in the z direction) from each other.


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