OpenSceneGraph 2.8.4
|
ShadowVolumeOccluder is a helper class for implementing shadow occlusion culling. More...
Public Types | |
typedef std::vector< Polytope > | HoleList |
Public Member Functions | |
ShadowVolumeOccluder (const ShadowVolumeOccluder &svo) | |
ShadowVolumeOccluder () | |
bool | operator< (const ShadowVolumeOccluder &svo) const |
bool | computeOccluder (const NodePath &nodePath, const ConvexPlanarOccluder &occluder, CullStack &cullStack, bool createDrawables=false) |
compute the shadow volume occluder. | |
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. | |
void | setNodePath (NodePath &nodePath) |
Set the NodePath which describes which node in the scene graph that this occluder is attached to. | |
NodePath & | getNodePath () |
const NodePath & | getNodePath () 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. | |
Polytope & | getOccluder () |
return the occluder polytope. | |
const Polytope & | getOccluder () const |
return the const occluder polytope. | |
HoleList & | getHoleList () |
return the list of holes. | |
const HoleList & | getHoleList () const |
return the const list of holes. | |
bool | contains (const std::vector< Vec3 > &vertices) |
return true if the specified vertex list is contained entirely within this shadow occluder volume. | |
bool | contains (const BoundingSphere &bound) |
return true if the specified bounding sphere is contained entirely within this shadow occluder volume. | |
bool | contains (const BoundingBox &bound) |
return true if the specified bounding box is contained entirely within this shadow occluder volume. | |
void | transformProvidingInverse (const osg::Matrix &matrix) |
Protected Attributes | |
float | _volume |
NodePath | _nodePath |
ref_ptr< const RefMatrix > | _projectionMatrix |
Polytope | _occluderVolume |
HoleList | _holeList |
ShadowVolumeOccluder is a helper class for implementing shadow occlusion culling.
typedef std::vector<Polytope> osg::ShadowVolumeOccluder::HoleList |
osg::ShadowVolumeOccluder::ShadowVolumeOccluder | ( | const ShadowVolumeOccluder & | svo | ) | [inline] |
osg::ShadowVolumeOccluder::ShadowVolumeOccluder | ( | ) | [inline] |
bool osg::ShadowVolumeOccluder::computeOccluder | ( | const NodePath & | nodePath, |
const ConvexPlanarOccluder & | occluder, | ||
CullStack & | cullStack, | ||
bool | createDrawables = false |
||
) |
compute the shadow volume occluder.
bool osg::ShadowVolumeOccluder::contains | ( | const BoundingSphere & | bound | ) |
return true if the specified bounding sphere is contained entirely within this shadow occluder volume.
bool osg::ShadowVolumeOccluder::contains | ( | const BoundingBox & | bound | ) |
return true if the specified bounding box is contained entirely within this shadow occluder volume.
bool osg::ShadowVolumeOccluder::contains | ( | const std::vector< Vec3 > & | vertices | ) |
return true if the specified vertex list is contained entirely within this shadow occluder volume.
void osg::ShadowVolumeOccluder::disableResultMasks | ( | ) | [inline] |
References _holeList, _occluderVolume, and osg::Polytope::setResultMask().
HoleList& osg::ShadowVolumeOccluder::getHoleList | ( | ) | [inline] |
return the list of holes.
const HoleList& osg::ShadowVolumeOccluder::getHoleList | ( | ) | const [inline] |
return the const list of holes.
NodePath& osg::ShadowVolumeOccluder::getNodePath | ( | ) | [inline] |
const NodePath& osg::ShadowVolumeOccluder::getNodePath | ( | ) | const [inline] |
Polytope& osg::ShadowVolumeOccluder::getOccluder | ( | ) | [inline] |
return the occluder polytope.
const Polytope& osg::ShadowVolumeOccluder::getOccluder | ( | ) | const [inline] |
return the const occluder polytope.
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.
Referenced by operator<().
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.
bool osg::ShadowVolumeOccluder::operator< | ( | const ShadowVolumeOccluder & | svo | ) | const [inline] |
References getVolume().
void osg::ShadowVolumeOccluder::popCurrentMask | ( | ) | [inline] |
References _holeList, _occluderVolume, and osg::Polytope::popCurrentMask().
void osg::ShadowVolumeOccluder::pushCurrentMask | ( | ) | [inline] |
References _holeList, _occluderVolume, and osg::Polytope::pushCurrentMask().
void osg::ShadowVolumeOccluder::setNodePath | ( | NodePath & | nodePath | ) | [inline] |
Set the NodePath which describes which node in the scene graph that this occluder is attached to.
void osg::ShadowVolumeOccluder::transformProvidingInverse | ( | const osg::Matrix & | matrix | ) | [inline] |
HoleList osg::ShadowVolumeOccluder::_holeList [protected] |
Referenced by disableResultMasks(), popCurrentMask(), and pushCurrentMask().
NodePath osg::ShadowVolumeOccluder::_nodePath [protected] |
Polytope osg::ShadowVolumeOccluder::_occluderVolume [protected] |
Referenced by disableResultMasks(), popCurrentMask(), and pushCurrentMask().
ref_ptr<const RefMatrix> osg::ShadowVolumeOccluder::_projectionMatrix [protected] |
float osg::ShadowVolumeOccluder::_volume [protected] |
![]() | Generated at Sun Jan 8 2012 13:16:18 for the OpenSceneGraph by doxygen 1.7.4. |