OpenSceneGraph 2.8.3

osg::CullStack Class Reference

A CullStack class which accumulates the current project, modelview matrices and the CullingSet. More...

Inheritance diagram for osg::CullStack:

List of all members.

Public Types

typedef std::vector
< ShadowVolumeOccluder > 
OccluderList
typedef std::vector< CullingSet > CullingStack

Public Member Functions

 CullStack ()
 CullStack (const CullStack &cs)
 ~CullStack ()
void reset ()
void pushCullingSet ()
void popCullingSet ()
void setOccluderList (const ShadowVolumeOccluderList &svol)
ShadowVolumeOccluderList & getOccluderList ()
const ShadowVolumeOccluderList & getOccluderList () const
void pushViewport (osg::Viewport *viewport)
void popViewport ()
void pushProjectionMatrix (osg::RefMatrix *matrix)
void popProjectionMatrix ()
void pushModelViewMatrix (osg::RefMatrix *matrix, Transform::ReferenceFrame referenceFrame)
void popModelViewMatrix ()
float getFrustumVolume ()
float pixelSize (const Vec3 &v, float radius) const
 Compute the pixel size of an object at position v, with specified radius.
float pixelSize (const BoundingSphere &bs) const
 Compute the pixel size of the bounding sphere.
float clampedPixelSize (const Vec3 &v, float radius) const
 Compute the pixel size of an object at position v, with specified radius.
float clampedPixelSize (const BoundingSphere &bs) const
 Compute the pixel size of the bounding sphere.
void disableAndPushOccludersCurrentMask (NodePath &nodePath)
void popOccludersCurrentMask (NodePath &nodePath)
bool isCulled (const std::vector< Vec3 > &vertices)
bool isCulled (const BoundingBox &bb)
bool isCulled (const BoundingSphere &bs)
bool isCulled (const osg::Node &node)
void pushCurrentMask ()
void popCurrentMask ()
CullingStack & getClipSpaceCullingStack ()
CullingStack & getProjectionCullingStack ()
CullingStack & getModelViewCullingStack ()
CullingSet & getCurrentCullingSet ()
const CullingSet & getCurrentCullingSet () const
osg::Viewport * getViewport ()
osg::RefMatrix * getModelViewMatrix ()
osg::RefMatrix * getProjectionMatrix ()
osg::Matrix getWindowMatrix ()
const osg::RefMatrix * getMVPW ()
const osg::Vec3 & getReferenceViewPoint () const
void pushReferenceViewPoint (const osg::Vec3 &viewPoint)
void popReferenceViewPoint ()
const osg::Vec3 & getEyeLocal () const
const osg::Vec3 & getViewPointLocal () const
const osg::Vec3 getUpLocal () const
const osg::Vec3 getLookVectorLocal () const

Protected Types

typedef fast_back_stack
< ref_ptr< RefMatrix > > 
MatrixStack
typedef fast_back_stack
< ref_ptr< Viewport > > 
ViewportStack
typedef fast_back_stack< Vec3 > EyePointStack
typedef std::vector
< osg::ref_ptr< osg::RefMatrix > > 
MatrixList

Protected Member Functions

void computeFrustumVolume ()
osg::RefMatrix * createOrReuseMatrix (const osg::Matrix &value)

Protected Attributes

ShadowVolumeOccluderList _occluderList
MatrixStack _projectionStack
MatrixStack _modelviewStack
MatrixStack _MVPW_Stack
ViewportStack _viewportStack
EyePointStack _referenceViewPoints
EyePointStack _eyePointStack
EyePointStack _viewPointStack
CullingStack _clipspaceCullingStack
CullingStack _projectionCullingStack
CullingStack _modelviewCullingStack
unsigned int _index_modelviewCullingStack
CullingSet * _back_modelviewCullingStack
float _frustumVolume
unsigned int _bbCornerNear
unsigned int _bbCornerFar
ref_ptr< osg::RefMatrix > _identity
MatrixList _reuseMatrixList
unsigned int _currentReuseMatrixIndex

Detailed Description

A CullStack class which accumulates the current project, modelview matrices and the CullingSet.


Member Typedef Documentation

typedef std::vector< CullingSet > osg::CullStack::CullingStack
typedef std::vector< osg::ref_ptr<osg::RefMatrix> > osg::CullStack::MatrixList [protected]

Constructor & Destructor Documentation

osg::CullStack::CullStack ( )
osg::CullStack::CullStack ( const CullStack &  cs)
osg::CullStack::~CullStack ( )

Member Function Documentation

float osg::CullStack::clampedPixelSize ( const Vec3 &  v,
float  radius 
) const [inline]

Compute the pixel size of an object at position v, with specified radius.

fabs()ed to always be positive.

float osg::CullStack::clampedPixelSize ( const BoundingSphere &  bs) const [inline]

Compute the pixel size of the bounding sphere.

fabs()ed to always be positive.

References osg::BoundingSphereImpl< VT >::center(), and osg::BoundingSphereImpl< VT >::radius().

void osg::CullStack::computeFrustumVolume ( ) [protected]
RefMatrix * osg::CullStack::createOrReuseMatrix ( const osg::Matrix &  value) [inline, protected]
void osg::CullStack::disableAndPushOccludersCurrentMask ( NodePath &  nodePath) [inline]
CullingStack& osg::CullStack::getClipSpaceCullingStack ( ) [inline]
CullingSet& osg::CullStack::getCurrentCullingSet ( ) [inline]
const CullingSet& osg::CullStack::getCurrentCullingSet ( ) const [inline]
const osg::Vec3& osg::CullStack::getEyeLocal ( ) const [inline]
float osg::CullStack::getFrustumVolume ( ) [inline]
const osg::Vec3 osg::CullStack::getLookVectorLocal ( ) const [inline]
CullingStack& osg::CullStack::getModelViewCullingStack ( ) [inline]
osg::RefMatrix * osg::CullStack::getModelViewMatrix ( ) [inline]
ShadowVolumeOccluderList& osg::CullStack::getOccluderList ( ) [inline]
const ShadowVolumeOccluderList& osg::CullStack::getOccluderList ( ) const [inline]
CullingStack& osg::CullStack::getProjectionCullingStack ( ) [inline]
osg::RefMatrix * osg::CullStack::getProjectionMatrix ( ) [inline]
const osg::Vec3& osg::CullStack::getReferenceViewPoint ( ) const [inline]
const osg::Vec3 osg::CullStack::getUpLocal ( ) const [inline]
const osg::Vec3& osg::CullStack::getViewPointLocal ( ) const [inline]
bool osg::CullStack::isCulled ( const osg::Node &  node) [inline]
bool osg::CullStack::isCulled ( const BoundingBox &  bb) [inline]
bool osg::CullStack::isCulled ( const std::vector< Vec3 > &  vertices) [inline]
bool osg::CullStack::isCulled ( const BoundingSphere &  bs) [inline]
float osg::CullStack::pixelSize ( const Vec3 &  v,
float  radius 
) const [inline]

Compute the pixel size of an object at position v, with specified radius.

float osg::CullStack::pixelSize ( const BoundingSphere &  bs) const [inline]

Compute the pixel size of the bounding sphere.

References osg::BoundingSphereImpl< VT >::center(), and osg::BoundingSphereImpl< VT >::radius().

void osg::CullStack::popCullingSet ( )
void osg::CullStack::popCurrentMask ( ) [inline]
void osg::CullStack::popModelViewMatrix ( )
void osg::CullStack::popOccludersCurrentMask ( NodePath &  nodePath) [inline]
void osg::CullStack::popProjectionMatrix ( )

Reimplemented in osgUtil::CullVisitor.

void osg::CullStack::popReferenceViewPoint ( ) [inline]
void osg::CullStack::popViewport ( )
void osg::CullStack::pushCullingSet ( )
void osg::CullStack::pushCurrentMask ( ) [inline]
void osg::CullStack::pushModelViewMatrix ( osg::RefMatrix *  matrix,
Transform::ReferenceFrame  referenceFrame 
)
void osg::CullStack::pushProjectionMatrix ( osg::RefMatrix *  matrix)
void osg::CullStack::pushReferenceViewPoint ( const osg::Vec3 &  viewPoint) [inline]
void osg::CullStack::pushViewport ( osg::Viewport *  viewport)
void osg::CullStack::reset ( )
void osg::CullStack::setOccluderList ( const ShadowVolumeOccluderList &  svol) [inline]

Member Data Documentation

unsigned int osg::CullStack::_bbCornerFar [protected]
unsigned int osg::CullStack::_bbCornerNear [protected]
unsigned int osg::CullStack::_currentReuseMatrixIndex [protected]

Referenced by createOrReuseMatrix().

float osg::CullStack::_frustumVolume [protected]

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

osg logo
Generated at Tue Mar 22 2011 13:20:21 for the OpenSceneGraph by doxygen 1.7.3.