osgShadow::OccluderGeometry Class Reference
List of all members.
Classes |
struct | Edge |
Public Types |
typedef std::vector< osg::Vec3 > | Vec3List |
typedef std::vector< GLuint > | UIntList |
Public Member Functions |
| OccluderGeometry () |
| OccluderGeometry (const OccluderGeometry &oc, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY) |
virtual Object * | cloneType () const |
virtual Object * | clone (const osg::CopyOp ©op) const |
virtual bool | isSameKindAs (const osg::Object *obj) const |
virtual const char * | libraryName () const |
virtual const char * | className () const |
void | computeOccluderGeometry (osg::Node *subgraph, osg::Matrix *matrix=0, float sampleRatio=1.0f) |
void | computeOccluderGeometry (osg::Drawable *drawable, osg::Matrix *matrix=0, float sampleRatio=1.0f) |
void | computeShadowVolumeGeometry (const osg::Vec4 &lightpos, ShadowVolumeGeometry &svg) const |
void | setBoundingPolytope (const osg::Polytope &polytope) |
osg::Polytope & | getBoundingPolytope () |
const osg::Polytope & | getBoundingPolytope () const |
virtual void | drawImplementation (osg::RenderInfo &renderInfo) const |
virtual osg::BoundingBox | computeBound () const |
void | processGeometry (osg::Drawable *drawable, osg::Matrix *matrix=0, float sampleRatio=1.0f) |
Protected Types |
typedef std::vector< Edge > | EdgeList |
Protected Member Functions |
virtual | ~OccluderGeometry () |
bool | isLightPointSilhouetteEdge (const osg::Vec3 &lightpos, const Edge &edge) const |
bool | isLightDirectionSilhouetteEdge (const osg::Vec3 &lightdirection, const Edge &edge) const |
void | setUpInternalStructures () |
void | removeDuplicateVertices () |
void | removeNullTriangles () |
void | computeNormals () |
void | buildEdgeMaps () |
void | computeLightDirectionSilhouetteEdges (const osg::Vec3 &lightdirection, UIntList &silhouetteIndices) const |
void | computeLightPositionSilhouetteEdges (const osg::Vec3 &lightpos, UIntList &silhouetteIndices) const |
Protected Attributes |
osg::Polytope | _boundingPolytope |
Vec3List | _vertices |
Vec3List | _normals |
Vec3List | _triangleNormals |
UIntList | _triangleIndices |
EdgeList | _edges |
Detailed Description
OccluderGeometry provides a sepecialised geometry representation of objects in scene that occlude light and therefore cast shadows. OccluderGeometry supports the computation of silhouette edges and shadow volume geometries, as well as use as geometry that one can rendering into a shadow map or end caps for the ZP+ algorithm. OccluderGeometry may be of the same resolution as an underlying geometry that it represents, or can be of lower resolution and combine manager seperate geometries together into a single shadow casting object. OccluderGeometry may be attached as UserData to Nodes or to Drawables.
Member Typedef Documentation
Constructor & Destructor Documentation
osgShadow::OccluderGeometry::OccluderGeometry |
( |
|
) |
|
virtual osgShadow::OccluderGeometry::~OccluderGeometry |
( |
|
) |
[inline, protected, virtual] |
Member Function Documentation
void osgShadow::OccluderGeometry::buildEdgeMaps |
( |
|
) |
[protected] |
virtual const char* osgShadow::OccluderGeometry::className |
( |
|
) |
const [inline, virtual] |
return the name of the object's class type. Must be defined by derived classes.
Reimplemented from osg::Drawable.
virtual Object* osgShadow::OccluderGeometry::clone |
( |
const osg::CopyOp & |
|
) |
const [inline, virtual] |
Clone an object, with Object* return type. Must be defined by derived classes.
Implements osg::Object.
virtual Object* osgShadow::OccluderGeometry::cloneType |
( |
|
) |
const [inline, virtual] |
Clone the type of an object, with Object* return type. Must be defined by derived classes.
Implements osg::Object.
virtual osg::BoundingBox osgShadow::OccluderGeometry::computeBound |
( |
|
) |
const [virtual] |
Compute the bounding box around occluder geometry.
Reimplemented from osg::Drawable.
void osgShadow::OccluderGeometry::computeLightDirectionSilhouetteEdges |
( |
const osg::Vec3 & |
lightdirection, |
|
|
UIntList & |
silhouetteIndices | |
|
) |
| | const [protected] |
void osgShadow::OccluderGeometry::computeLightPositionSilhouetteEdges |
( |
const osg::Vec3 & |
lightpos, |
|
|
UIntList & |
silhouetteIndices | |
|
) |
| | const [protected] |
void osgShadow::OccluderGeometry::computeNormals |
( |
|
) |
[protected] |
void osgShadow::OccluderGeometry::computeOccluderGeometry |
( |
osg::Drawable * |
drawable, |
|
|
osg::Matrix * |
matrix = 0 , |
|
|
float |
sampleRatio = 1.0f | |
|
) |
| | |
Compute an occluder geometry containing the geometry in specified drawable.
void osgShadow::OccluderGeometry::computeOccluderGeometry |
( |
osg::Node * |
subgraph, |
|
|
osg::Matrix * |
matrix = 0 , |
|
|
float |
sampleRatio = 1.0f | |
|
) |
| | |
Compute an occluder geometry containing all the geometry in specified subgraph.
virtual void osgShadow::OccluderGeometry::drawImplementation |
( |
osg::RenderInfo & |
renderInfo |
) |
const [virtual] |
const osg::Polytope& osgShadow::OccluderGeometry::getBoundingPolytope |
( |
|
) |
const [inline] |
osg::Polytope& osgShadow::OccluderGeometry::getBoundingPolytope |
( |
|
) |
[inline] |
bool osgShadow::OccluderGeometry::isLightDirectionSilhouetteEdge |
( |
const osg::Vec3 & |
lightdirection, |
|
|
const Edge & |
edge | |
|
) |
| | const [inline, protected] |
bool osgShadow::OccluderGeometry::isLightPointSilhouetteEdge |
( |
const osg::Vec3 & |
lightpos, |
|
|
const Edge & |
edge | |
|
) |
| | const [inline, protected] |
virtual bool osgShadow::OccluderGeometry::isSameKindAs |
( |
const osg::Object * |
obj |
) |
const [inline, virtual] |
virtual const char* osgShadow::OccluderGeometry::libraryName |
( |
|
) |
const [inline, virtual] |
return the name of the object's library. Must be defined by derived classes. The OpenSceneGraph convention is that the namespace of a library is the same as the library name.
Reimplemented from osg::Drawable.
void osgShadow::OccluderGeometry::processGeometry |
( |
osg::Drawable * |
drawable, |
|
|
osg::Matrix * |
matrix = 0 , |
|
|
float |
sampleRatio = 1.0f | |
|
) |
| | |
void osgShadow::OccluderGeometry::removeDuplicateVertices |
( |
|
) |
[protected] |
void osgShadow::OccluderGeometry::removeNullTriangles |
( |
|
) |
[protected] |
void osgShadow::OccluderGeometry::setBoundingPolytope |
( |
const osg::Polytope & |
polytope |
) |
[inline] |
void osgShadow::OccluderGeometry::setUpInternalStructures |
( |
|
) |
[protected] |
Member Data Documentation
The documentation for this class was generated from the following file: