17#ifndef OSGSHADOW_VIEWDEPENDENTSHADOWTECHINIQUE
18#define OSGSHADOW_VIEWDEPENDENTSHADOWTECHINIQUE 1
32#define META_ViewDependentShadowTechniqueData( ShadowTechnique, TechniqueData )\
33virtual ViewDependentShadowTechnique::ViewData * initViewDependentData \
34( osgUtil::CullVisitor *cv, ViewDependentShadowTechnique::ViewData * vd ) \
36 TechniqueData* td = dynamic_cast<TechniqueData*>( vd ); \
37 if ( !td ) td = new TechniqueData; \
38 td->init( this, cv ); \
163 virtual const char*
className()
const {
return "ViewData"; }
222 typedef std::map< osg::ref_ptr< osg::Identifier >,
#define META_ViewDependentShadowTechniqueData(ShadowTechnique, TechniqueData)
META_ViewDependentShadowTechniqueData macro defines initViewDependentData method used by derived shad...
Definition ViewDependentShadowTechnique:32
The osgShadow library is a NodeKit that extends the core scene graph to add support for a range of sh...
Definition ConvexPolyhedron:33
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
Visitor for type safe operations on osg::Nodes.
Definition NodeVisitor:82
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
ShadowTechnique is the base class for different shadow implementations.
Definition ShadowTechnique:32
virtual void update(osg::NodeVisitor &nv)
Run the update traversal of the ShadowedScene and update any local cached data structures.
ViewDependentShadowTechnique(void)
osgShadow::ShadowTechnique equivalent methods for view dependent techniques
~ViewDependentShadowTechnique(void)
Classic protected OSG destructor.
virtual void cull(osgUtil::CullVisitor &cv)
Run the cull traversal of the ShadowedScene and set up the rendering for this ShadowTechnique.
virtual void init()
Initialize the ShadowedScene and some data structures.
ViewDataMap _viewDataMap
Definition ViewDependentShadowTechnique:225
std::map< osg::ref_ptr< osg::Identifier >, osg::ref_ptr< ViewData > > ViewDataMap
Map of view dependent data per view cull visitor (CVs are used as indices) ViewDependentShadowTechniq...
Definition ViewDependentShadowTechnique:223
OpenThreads::Mutex _viewDataMapMutex
Mutex used to serialize accesses to ViewDataMap.
Definition ViewDependentShadowTechnique:231
virtual void dirty()
Dirty view data bits and force update of view data resources.
virtual void setViewDependentData(osgUtil::CullVisitor *cv, ViewDependentShadowTechnique::ViewData *data)
Define view dependent data for the cull visitor.
ViewDependentShadowTechnique(const ViewDependentShadowTechnique &vdst, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY)
Classic OSG cloning constructor.
virtual void traverse(osg::NodeVisitor &nv)
Traverse shadow scene graph.
virtual void cleanSceneGraph()
Clean scene graph from any shadow technique specific nodes, state and drawables.
virtual ViewDependentShadowTechnique::ViewData * getViewDependentData(osgUtil::CullVisitor *cv)
Return view dependent data for the cull visitor.
META_Object(osgShadow, ViewDependentShadowTechnique)
Declaration of standard OSG object methods.
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...
Base container class for view dependent shadow resources.
Definition ViewDependentShadowTechnique:162
virtual void cull()
Method called by ViewDependentShadowTechnique to allow ViewData do the hard work computing shadows fo...
virtual void dirty(bool flag)
Dirty is called by parent ViewDependentShadowTechnique to force update of resources after some of the...
virtual void resizeGLObjectBuffers(unsigned int)
Definition ViewDependentShadowTechnique:209
bool _dirty
Dirty flag tells this instance to update its resources.
Definition ViewDependentShadowTechnique:197
virtual void releaseGLObjects(osg::State *=0) const
If State is non-zero, this function releases any associated OpenGL objects for the specified graphics...
Definition ViewDependentShadowTechnique:214
ViewData()
Simple constructor zeroing all variables.
Definition ViewDependentShadowTechnique:186
OpenThreads::Mutex _mutex
Mutex used to guard _dirty flag from override in case when parent technique calls dirty() simultaneou...
Definition ViewDependentShadowTechnique:192
virtual const char * className() const
Definition ViewDependentShadowTechnique:163
virtual void init(ViewDependentShadowTechnique *st, osgUtil::CullVisitor *cv)
Method called upon ViewData instance to initialize internal variables.
osg::observer_ptr< osgUtil::CullVisitor > _cv
View's CullVisitor associated with this ViewData instance.
Definition ViewDependentShadowTechnique:202
osg::observer_ptr< ViewDependentShadowTechnique > _st
Parent ViewDependentShadowTechnique.
Definition ViewDependentShadowTechnique:207
Basic NodeVisitor implementation for rendering a scene.
Definition CullVisitor:49
#define NULL
Definition Export:55
#define OSGSHADOW_EXPORT
Definition Export:39