14#ifndef OSGSHADOW_VIEWDEPENDENTSHADOWMAP
15#define OSGSHADOW_VIEWDEPENDENTSHADOWMAP 1
68 typedef std::vector<unsigned int>
Indices;
69 typedef std::vector<Indices>
Faces;
72 typedef std::vector<Indices>
Edges;
188 typedef std::vector< osg::ref_ptr<osg::Uniform> >
Uniforms;
RefMatrixd RefMatrix
Definition Matrix:28
The osgShadow library is a NodeKit that extends the core scene graph to add support for a range of sh...
Definition ConvexPolyhedron:33
Camera - is a subclass of Transform which represents encapsulates the settings of a Camera.
Definition Camera:45
Copy Op(erator) used to control whether shallow or deep copy is used during copy construction and clo...
Definition CopyOp:41
@ SHALLOW_COPY
Definition CopyOp:47
Light state class which encapsulates OpenGL glLight() functionality.
Definition Light:40
Visitor for type safe operations on osg::Nodes.
Definition NodeVisitor:82
A Polytope class for representing convex clipping volumes made up of a set of planes.
Definition Polytope:26
Smart pointer for handling referenced counted objects.
Definition ref_ptr:32
Base class for providing reference counted objects.
Definition Referenced:44
Encapsulates the current applied OpenGL modes, attributes and vertex arrays settings,...
Definition State:80
Stores a set of modes and attributes which represent a set of OpenGL state.
Definition StateSet:46
TexGen encapsulates the OpenGL glTexGen (texture coordinate generation) state.
Definition TexGen:43
General purpose double triple for use as vertices, vectors and normals.
Definition Vec3d:30
General purpose double quad.
Definition Vec4d:29
std::list< osg::ref_ptr< LightData > > LightDataList
Definition ViewDependentShadowMap:105
virtual void cleanSceneGraph()
Clean scene graph from any shadow technique specific nodes, state and drawables.
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)
META_Object(osgShadow, ViewDependentShadowMap)
ViewDependentShadowMap(const ViewDependentShadowMap &vdsm, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY)
std::list< osg::ref_ptr< ShadowData > > ShadowDataList
Definition ViewDependentShadowMap:121
ViewDependentDataMap _viewDependentDataMap
Definition ViewDependentShadowMap:179
ViewDependentData * getViewDependentData(osgUtil::CullVisitor *cv)
virtual osg::StateSet * selectStateSetForRenderingShadow(ViewDependentData &vdd) const
osg::ref_ptr< osg::StateSet > _shadowRecievingPlaceholderStateSet
Definition ViewDependentShadowMap:181
virtual osg::Polytope computeLightViewFrustumPolytope(Frustum &frustum, LightData &positionedLight)
virtual void resizeGLObjectBuffers(unsigned int maxSize)
Resize any per context GLObject buffers to specified size.
virtual void createShaders()
Uniforms _uniforms
Definition ViewDependentShadowMap:190
osg::ref_ptr< osg::Texture2D > _fallbackShadowMapTexture
Definition ViewDependentShadowMap:186
virtual bool assignTexGenSettings(osgUtil::CullVisitor *cv, osg::Camera *camera, unsigned int textureUnit, osg::TexGen *texgen)
OpenThreads::Mutex _viewDependentDataMapMutex
Definition ViewDependentShadowMap:178
virtual ~ViewDependentShadowMap()
virtual void update(osg::NodeVisitor &nv)
run the update traversal of the ShadowedScene and update any loca chached data structures.
virtual void init()
initialize the ShadowedScene and local cached data structures.
osg::ref_ptr< osg::PolygonOffset > _polygonOffset
Definition ViewDependentShadowMap:184
OpenThreads::Mutex _accessUniformsAndProgramMutex
Definition ViewDependentShadowMap:189
virtual void cullShadowReceivingScene(osgUtil::CullVisitor *cv) const
osg::ref_ptr< osg::Program > _program
Definition ViewDependentShadowMap:191
virtual void releaseGLObjects(osg::State *=0) const
If State is non-zero, this function releases any associated OpenGL objects for the specified graphics...
osg::ref_ptr< osg::StateSet > _shadowCastingStateSet
Definition ViewDependentShadowMap:183
virtual ViewDependentData * createViewDependentData(osgUtil::CullVisitor *cv)
std::map< osgUtil::CullVisitor *, osg::ref_ptr< ViewDependentData > > ViewDependentDataMap
Definition ViewDependentShadowMap:177
virtual void cullShadowCastingScene(osgUtil::CullVisitor *cv, osg::Camera *camera) const
std::vector< osg::ref_ptr< osg::Uniform > > Uniforms
Definition ViewDependentShadowMap:188
osg::ref_ptr< osg::Texture2D > _fallbackBaseTexture
Definition ViewDependentShadowMap:185
virtual bool selectActiveLights(osgUtil::CullVisitor *cv, ViewDependentData *vdd) const
virtual void cull(osgUtil::CullVisitor &cv)
run the cull traversal of the ShadowedScene and set up the rendering for this ShadowTechnique.
Definition ViewDependentShadowMap:59
std::vector< Indices > Edges
Definition ViewDependentShadowMap:72
Edges edges
Definition ViewDependentShadowMap:73
osg::Vec3d centerFarPlane
Definition ViewDependentShadowMap:77
Vertices corners
Definition ViewDependentShadowMap:66
Faces faces
Definition ViewDependentShadowMap:70
osg::Vec3d centerNearPlane
Definition ViewDependentShadowMap:76
std::vector< Indices > Faces
Definition ViewDependentShadowMap:69
osg::Matrixd projectionMatrix
Definition ViewDependentShadowMap:62
std::vector< osg::Vec3d > Vertices
Definition ViewDependentShadowMap:65
Frustum(osgUtil::CullVisitor *cv, double minZNear, double maxZFar)
osg::Matrixd modelViewMatrix
Definition ViewDependentShadowMap:63
osg::Vec3d frustumCenterLine
Definition ViewDependentShadowMap:79
std::vector< unsigned int > Indices
Definition ViewDependentShadowMap:68
osg::Vec3d center
Definition ViewDependentShadowMap:78
osg::Vec3d eye
Definition ViewDependentShadowMap:75
Definition ViewDependentShadowMap:86
std::vector< unsigned int > ActiveTextureUnits
Definition ViewDependentShadowMap:101
osg::Vec3d lightPos3
Definition ViewDependentShadowMap:97
osg::ref_ptr< const osg::Light > light
Definition ViewDependentShadowMap:94
bool directionalLight
Definition ViewDependentShadowMap:99
osg::Vec4d lightPos
Definition ViewDependentShadowMap:96
ActiveTextureUnits textureUnits
Definition ViewDependentShadowMap:102
LightData(ViewDependentData *vdd)
ViewDependentData * _viewDependentData
Definition ViewDependentShadowMap:91
osg::Vec3d lightDir
Definition ViewDependentShadowMap:98
virtual void setLightData(osg::RefMatrix *lm, const osg::Light *l, const osg::Matrixd &modelViewMatrix)
osg::ref_ptr< osg::RefMatrix > lightMatrix
Definition ViewDependentShadowMap:93
osg::ref_ptr< osg::Camera > _camera
Definition ViewDependentShadowMap:118
osg::ref_ptr< osg::TexGen > _texgen
Definition ViewDependentShadowMap:117
unsigned int _textureUnit
Definition ViewDependentShadowMap:115
virtual void releaseGLObjects(osg::State *=0) const
ViewDependentData * _viewDependentData
Definition ViewDependentShadowMap:113
ShadowData(ViewDependentData *vdd)
osg::ref_ptr< osg::Texture2D > _texture
Definition ViewDependentShadowMap:116
Definition ViewDependentShadowMap:125
ShadowDataList & getShadowDataList()
Definition ViewDependentShadowMap:133
LightDataList _lightDataList
Definition ViewDependentShadowMap:146
ShadowDataList _shadowDataList
Definition ViewDependentShadowMap:147
const ViewDependentShadowMap * getViewDependentShadowMap() const
Definition ViewDependentShadowMap:129
virtual ~ViewDependentData()
Definition ViewDependentShadowMap:140
ViewDependentShadowMap * _viewDependentShadowMap
Definition ViewDependentShadowMap:142
osg::ref_ptr< osg::StateSet > _stateset
Definition ViewDependentShadowMap:144
ViewDependentData(ViewDependentShadowMap *vdsm)
virtual void releaseGLObjects(osg::State *=0) const
osg::StateSet * getStateSet()
Definition ViewDependentShadowMap:135
LightDataList & getLightDataList()
Definition ViewDependentShadowMap:131
Basic NodeVisitor implementation for rendering a scene.
Definition CullVisitor:49
RenderStage base class.
Definition RenderStage:38
#define OSGSHADOW_EXPORT
Definition Export:39