OpenSceneGraph
Public Types | Public Member Functions | Protected Attributes | List of all members
osg::ShadowVolumeOccluder Class Reference

ShadowVolumeOccluder is a helper class for implementing shadow occlusion culling. More...

Collaboration diagram for osg::ShadowVolumeOccluder:
Collaboration graph
[legend]

Public Types

typedef std::vector< PolytopeHoleList
 

Public Member Functions

 ShadowVolumeOccluder (const ShadowVolumeOccluder &svo)
 
bool operator< (const ShadowVolumeOccluder &svo) const
 
bool computeOccluder (const NodePath &nodePath, const ConvexPlanarOccluder &occluder, CullStack &cullStack, bool createDrawables=false)
 compute the shadow volume occluder. More...
 
void disableResultMasks ()
 
void pushCurrentMask ()
 
void popCurrentMask ()
 
bool matchProjectionMatrix (const osg::Matrix &matrix) const
 return true if the matrix passed in matches the projection matrix that this ShadowVolumeOccluder is associated with. More...
 
void setNodePath (NodePath &nodePath)
 Set the NodePath which describes which node in the scene graph that this occluder is attached to. More...
 
NodePathgetNodePath ()
 
const NodePathgetNodePath () const
 
float getVolume () const
 get the volume of the occluder minus its holes, in eye coords, the volume is normalized by dividing by the volume of the view frustum in eye coords. More...
 
PolytopegetOccluder ()
 return the occluder polytope. More...
 
const PolytopegetOccluder () const
 return the const occluder polytope. More...
 
HoleList & getHoleList ()
 return the list of holes. More...
 
const HoleList & getHoleList () const
 return the const list of holes. More...
 
bool contains (const std::vector< Vec3 > &vertices)
 return true if the specified vertex list is contained entirely within this shadow occluder volume. More...
 
bool contains (const BoundingSphere &bound)
 return true if the specified bounding sphere is contained entirely within this shadow occluder volume. More...
 
bool contains (const BoundingBox &bound)
 return true if the specified bounding box is contained entirely within this shadow occluder volume. More...
 
void transformProvidingInverse (const osg::Matrix &matrix)
 

Protected Attributes

float _volume
 
NodePath _nodePath
 
ref_ptr< const RefMatrix_projectionMatrix
 
Polytope _occluderVolume
 
HoleList _holeList
 

Detailed Description

ShadowVolumeOccluder is a helper class for implementing shadow occlusion culling.

Member Function Documentation

◆ computeOccluder()

bool osg::ShadowVolumeOccluder::computeOccluder ( const NodePath nodePath,
const ConvexPlanarOccluder occluder,
CullStack cullStack,
bool  createDrawables = false 
)

compute the shadow volume occluder.

◆ contains() [1/3]

bool osg::ShadowVolumeOccluder::contains ( const std::vector< Vec3 > &  vertices)

return true if the specified vertex list is contained entirely within this shadow occluder volume.

◆ contains() [2/3]

bool osg::ShadowVolumeOccluder::contains ( const BoundingSphere bound)

return true if the specified bounding sphere is contained entirely within this shadow occluder volume.

◆ contains() [3/3]

bool osg::ShadowVolumeOccluder::contains ( const BoundingBox &  bound)

return true if the specified bounding box is contained entirely within this shadow occluder volume.

◆ getHoleList() [1/2]

HoleList& osg::ShadowVolumeOccluder::getHoleList ( )
inline

return the list of holes.

◆ getHoleList() [2/2]

const HoleList& osg::ShadowVolumeOccluder::getHoleList ( ) const
inline

return the const list of holes.

◆ getOccluder() [1/2]

Polytope& osg::ShadowVolumeOccluder::getOccluder ( )
inline

return the occluder polytope.

◆ getOccluder() [2/2]

const Polytope& osg::ShadowVolumeOccluder::getOccluder ( ) const
inline

return the const occluder polytope.

◆ getVolume()

float osg::ShadowVolumeOccluder::getVolume ( ) const
inline

get the volume of the occluder minus its holes, in eye coords, the volume is normalized by dividing by the volume of the view frustum in eye coords.

◆ matchProjectionMatrix()

bool osg::ShadowVolumeOccluder::matchProjectionMatrix ( const osg::Matrix matrix) const
inline

return true if the matrix passed in matches the projection matrix that this ShadowVolumeOccluder is associated with.

◆ setNodePath()

void osg::ShadowVolumeOccluder::setNodePath ( NodePath nodePath)
inline

Set the NodePath which describes which node in the scene graph that this occluder is attached to.


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