OpenSceneGraph 2.8.4
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
osg::CullStack Class Reference

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

Inheritance diagram for osg::CullStack:
Inheritance graph
[legend]

List of all members.

Public Types

typedef std::vector
< ShadowVolumeOccluder
OccluderList
typedef std::vector< CullingSetCullingStack

Public Member Functions

 CullStack ()
 CullStack (const CullStack &cs)
 ~CullStack ()
void reset ()
void pushCullingSet ()
void popCullingSet ()
void setOccluderList (const ShadowVolumeOccluderList &svol)
ShadowVolumeOccluderListgetOccluderList ()
const ShadowVolumeOccluderListgetOccluderList () 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 ()
CullingStackgetClipSpaceCullingStack ()
CullingStackgetProjectionCullingStack ()
CullingStackgetModelViewCullingStack ()
CullingSetgetCurrentCullingSet ()
const CullingSetgetCurrentCullingSet () const
osg::ViewportgetViewport ()
osg::RefMatrixgetModelViewMatrix ()
osg::RefMatrixgetProjectionMatrix ()
osg::Matrix getWindowMatrix ()
const osg::RefMatrixgetMVPW ()
const osg::Vec3getReferenceViewPoint () const
void pushReferenceViewPoint (const osg::Vec3 &viewPoint)
void popReferenceViewPoint ()
const osg::Vec3getEyeLocal () const
const osg::Vec3getViewPointLocal () 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< Vec3EyePointStack
typedef std::vector
< osg::ref_ptr< osg::RefMatrix > > 
MatrixList

Protected Member Functions

void computeFrustumVolume ()
osg::RefMatrixcreateOrReuseMatrix (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]
const osg::RefMatrix * osg::CullStack::getMVPW ( ) [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]
osg::Viewport * osg::CullStack::getViewport ( ) [inline]
osg::Matrix osg::CullStack::getWindowMatrix ( ) [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]

Referenced by getModelViewMatrix().

Referenced by getMVPW().

Referenced by createOrReuseMatrix().

Referenced by getViewport(), and getWindowMatrix().


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

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