OpenSceneGraph  3.4.0
Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
osgShadow::ViewDependentShadowMap Class Reference

ViewDependentShadowMap provides an base implementation of view dependent shadow mapping techniques. More...

Inheritance diagram for osgShadow::ViewDependentShadowMap:
Inheritance graph
[legend]

List of all members.

Classes

struct  Frustum
struct  LightData
struct  ShadowData
class  ViewDependentData

Public Types

typedef std::list
< osg::ref_ptr< LightData > > 
LightDataList
typedef std::list
< osg::ref_ptr< ShadowData > > 
ShadowDataList

Public Member Functions

 ViewDependentShadowMap ()
 ViewDependentShadowMap (const ViewDependentShadowMap &vdsm, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 META_Object (osgShadow, ViewDependentShadowMap)
virtual void init ()
 initialize the ShadowedScene and local cached data structures.
virtual void update (osg::NodeVisitor &nv)
 run the update traversal of the ShadowedScene and update any loca chached data structures.
virtual void cull (osgUtil::CullVisitor &cv)
 run the cull traversal of the ShadowedScene and set up the rendering for this ShadowTechnique.
virtual void resizeGLObjectBuffers (unsigned int maxSize)
 Resize any per context GLObject buffers to specified size.
virtual void releaseGLObjects (osg::State *=0) const
 If State is non-zero, this function releases any associated OpenGL objects for the specified graphics context.
virtual void cleanSceneGraph ()
 Clean scene graph from any shadow technique specific nodes, state and drawables.
virtual ViewDependentDatacreateViewDependentData (osgUtil::CullVisitor *cv)
ViewDependentDatagetViewDependentData (osgUtil::CullVisitor *cv)
virtual void createShaders ()
virtual bool selectActiveLights (osgUtil::CullVisitor *cv, ViewDependentData *vdd) const
virtual osg::Polytope computeLightViewFrustumPolytope (Frustum &frustum, LightData &positionedLight)
virtual bool computeShadowCameraSettings (Frustum &frustum, LightData &positionedLight, osg::Matrixd &projectionMatrix, osg::Matrixd &viewMatrix)
virtual bool adjustPerspectiveShadowMapCameraSettings (osgUtil::RenderStage *renderStage, Frustum &frustum, LightData &positionedLight, osg::Camera *camera)
virtual bool assignTexGenSettings (osgUtil::CullVisitor *cv, osg::Camera *camera, unsigned int textureUnit, osg::TexGen *texgen)
virtual void cullShadowReceivingScene (osgUtil::CullVisitor *cv) const
virtual void cullShadowCastingScene (osgUtil::CullVisitor *cv, osg::Camera *camera) const
virtual osg::StateSetselectStateSetForRenderingShadow (ViewDependentData &vdd) const

Protected Types

typedef std::map
< osgUtil::CullVisitor
*, osg::ref_ptr
< ViewDependentData > > 
ViewDependentDataMap
typedef std::vector
< osg::ref_ptr< osg::Uniform > > 
Uniforms

Protected Member Functions

virtual ~ViewDependentShadowMap ()

Protected Attributes

OpenThreads::Mutex _viewDependentDataMapMutex
ViewDependentDataMap _viewDependentDataMap
osg::ref_ptr< osg::StateSet_shadowRecievingPlaceholderStateSet
osg::ref_ptr< osg::StateSet_shadowCastingStateSet
osg::ref_ptr< osg::PolygonOffset_polygonOffset
osg::ref_ptr< osg::Texture2D_fallbackBaseTexture
osg::ref_ptr< osg::Texture2D_fallbackShadowMapTexture
OpenThreads::Mutex _accessUniformsAndProgramMutex
Uniforms _uniforms
osg::ref_ptr< osg::Program_program

Detailed Description

ViewDependentShadowMap provides an base implementation of view dependent shadow mapping techniques.


Member Typedef Documentation


Constructor & Destructor Documentation


Member Function Documentation

virtual bool osgShadow::ViewDependentShadowMap::adjustPerspectiveShadowMapCameraSettings ( osgUtil::RenderStage renderStage,
Frustum frustum,
LightData positionedLight,
osg::Camera camera 
) [virtual]
virtual bool osgShadow::ViewDependentShadowMap::assignTexGenSettings ( osgUtil::CullVisitor cv,
osg::Camera camera,
unsigned int  textureUnit,
osg::TexGen texgen 
) [virtual]

Clean scene graph from any shadow technique specific nodes, state and drawables.

Reimplemented from osgShadow::ShadowTechnique.

virtual bool osgShadow::ViewDependentShadowMap::computeShadowCameraSettings ( Frustum frustum,
LightData positionedLight,
osg::Matrixd projectionMatrix,
osg::Matrixd viewMatrix 
) [virtual]

run the cull traversal of the ShadowedScene and set up the rendering for this ShadowTechnique.

Reimplemented from osgShadow::ShadowTechnique.

virtual void osgShadow::ViewDependentShadowMap::init ( ) [virtual]

initialize the ShadowedScene and local cached data structures.

Reimplemented from osgShadow::ShadowTechnique.

virtual void osgShadow::ViewDependentShadowMap::releaseGLObjects ( osg::State = 0) const [virtual]

If State is non-zero, this function releases any associated OpenGL objects for the specified graphics context.

Otherwise, releases OpenGL objects for all graphics contexts.

Reimplemented from osg::Object.

virtual void osgShadow::ViewDependentShadowMap::resizeGLObjectBuffers ( unsigned int  maxSize) [virtual]

Resize any per context GLObject buffers to specified size.

Reimplemented from osg::Object.

run the update traversal of the ShadowedScene and update any loca chached data structures.

Reimplemented from osgShadow::ShadowTechnique.


Member Data Documentation

OpenThreads::Mutex osgShadow::ViewDependentShadowMap::_viewDependentDataMapMutex [mutable, protected]

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

osg logo
Generated at Tue Dec 8 2015 00:16:49 for the OpenSceneGraph by doxygen 1.7.6.1.