openscenegraph
osgShadow::DebugShadowMap Class Reference

#include <DebugShadowMap>

Inheritance diagram for osgShadow::DebugShadowMap:
osgShadow::ViewDependentShadowTechnique osgShadow::ShadowTechnique osg::Object osg::Referenced osgShadow::StandardShadowMap osgShadow::MinimalShadowMap osgShadow::ProjectionShadowMap< MinimalShadowMap, LightSpacePerspectiveShadowMapAlgorithm > osgShadow::MinimalCullBoundsShadowMap osgShadow::MinimalDrawBoundsShadowMap osgShadow::LightSpacePerspectiveShadowMapVB osgShadow::ProjectionShadowMap< MinimalCullBoundsShadowMap, LightSpacePerspectiveShadowMapAlgorithm > osgShadow::ProjectionShadowMap< MinimalDrawBoundsShadowMap, LightSpacePerspectiveShadowMapAlgorithm > osgShadow::LightSpacePerspectiveShadowMapCB osgShadow::LightSpacePerspectiveShadowMapDB

Classes

struct  ViewData

Public Types

typedef DebugShadowMap ThisClass
typedef ViewDependentShadowTechnique BaseClass
Public Types inherited from osg::Object
enum  DataVariance { DYNAMIC , STATIC , UNSPECIFIED }

Public Member Functions

 DebugShadowMap ()
 DebugShadowMap (const DebugShadowMap &dsm, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 META_Object (osgShadow, DebugShadowMap)
void setDebugDraw (bool draw)
bool getDebugDraw (void) const
std::string getDebugDump (void) const
void setDebugDump (const std::string &debugDumpFile)
virtual void resizeGLObjectBuffers (unsigned int maxSize)
virtual void releaseGLObjects (osg::State *=0) const
Public Member Functions inherited from osgShadow::ViewDependentShadowTechnique
 ViewDependentShadowTechnique (void)
 ViewDependentShadowTechnique (const ViewDependentShadowTechnique &vdst, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 META_Object (osgShadow, ViewDependentShadowTechnique)
virtual void dirty ()
virtual void init ()
virtual void update (osg::NodeVisitor &nv)
virtual void cull (osgUtil::CullVisitor &cv)
virtual void cleanSceneGraph ()
virtual void traverse (osg::NodeVisitor &nv)
Public Member Functions inherited from osgShadow::ShadowTechnique
 ShadowTechnique ()
 ShadowTechnique (const ShadowTechnique &es, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
virtual bool isSameKindAs (const osg::Object *obj) const
virtual const char * libraryName () const
virtual const char * className () const
virtual void setShadowedScene (ShadowedScene *ss)
ShadowedScenegetShadowedScene ()
const ShadowedScenegetShadowedScene () const
Public Member Functions inherited from osg::Object
 Object ()
 Object (bool threadSafeRefUnref)
 Object (const Object &, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
virtual ObjectcloneType () const =0
virtual Objectclone (const CopyOp &) const =0
std::string getCompoundClassName () const
virtual NodeasNode ()
virtual const NodeasNode () const
virtual NodeVisitorasNodeVisitor ()
virtual const NodeVisitorasNodeVisitor () const
virtual StateSetasStateSet ()
virtual const StateSetasStateSet () const
virtual StateAttributeasStateAttribute ()
virtual const StateAttributeasStateAttribute () const
virtual UniformasUniform ()
virtual const UniformasUniform () const
virtual CameraasCamera ()
virtual const CameraasCamera () const
virtual DrawableasDrawable ()
virtual const DrawableasDrawable () const
virtual CallbackasCallback ()
virtual const CallbackasCallback () const
virtual CallbackObjectasCallbackObject ()
virtual const CallbackObjectasCallbackObject () const
virtual UserDataContainerasUserDataContainer ()
virtual const UserDataContainerasUserDataContainer () const
virtual ValueObjectasValueObject ()
virtual const ValueObjectasValueObject () const
virtual ImageasImage ()
virtual const ImageasImage () const
virtual void setThreadSafeRefUnref (bool threadSafe)
virtual void setName (const std::string &name)
void setName (const char *name)
const std::string & getName () const
void setDataVariance (DataVariance dv)
DataVariance getDataVariance () const
virtual void computeDataVariance ()
void setUserDataContainer (osg::UserDataContainer *udc)
template<class T>
void setUserDataContainer (const ref_ptr< T > &udc)
osg::UserDataContainergetUserDataContainer ()
const osg::UserDataContainergetUserDataContainer () const
osg::UserDataContainergetOrCreateUserDataContainer ()
virtual void setUserData (Referenced *obj)
template<class T>
void setUserData (const ref_ptr< T > &ud)
virtual ReferencedgetUserData ()
virtual const ReferencedgetUserData () const
template<typename T>
bool getUserValue (const std::string &name, T &value) const
template<typename T>
void setUserValue (const std::string &name, const T &value)
template<typename T>
BoolValueObject UCharValueObject UShortValueObject UIntValueObject DoubleValueObject Vec3fValueObject Vec2dValueObject Vec4dValueObject PlaneValueObject MatrixdValueObject BoundingBoxdValueObject BoundingSpheredValueObject bool getUserValue (const std::string &name, T &value) const
Public Member Functions inherited from osg::Referenced
 Referenced ()
 Referenced (bool threadSafeRefUnref)
 Referenced (const Referenced &)
Referencedoperator= (const Referenced &)
bool getThreadSafeRefUnref () const
OpenThreads::MutexgetRefMutex () const
int ref () const
int unref () const
int unref_nodelete () const
int referenceCount () const
ObserverSetgetObserverSet () const
ObserverSetgetOrCreateObserverSet () const
void addObserver (Observer *observer) const
void removeObserver (Observer *observer) const

Protected Member Functions

virtual ~DebugShadowMap ()
Protected Member Functions inherited from osgShadow::ViewDependentShadowTechnique
 ~ViewDependentShadowTechnique (void)
virtual ViewDependentShadowTechnique::ViewDatagetViewDependentData (osgUtil::CullVisitor *cv)
virtual void setViewDependentData (osgUtil::CullVisitor *cv, ViewDependentShadowTechnique::ViewData *data)
Protected Member Functions inherited from osgShadow::ShadowTechnique
osg::Vec3 computeOrthogonalVector (const osg::Vec3 &direction) const
virtual ~ShadowTechnique ()
Protected Member Functions inherited from osg::Object
virtual ~Object ()
Protected Member Functions inherited from osg::Referenced
virtual ~Referenced ()
void signalObserversAndDelete (bool signalDelete, bool doDelete) const
void deleteUsingDeleteHandler () const

Protected Attributes

osg::Vec2s _hudSize
osg::Vec2s _hudOrigin
osg::Vec2s _viewportSize
osg::Vec2s _viewportOrigin
osg::Vec2s _orthoSize
osg::Vec2s _orthoOrigin
bool _doDebugDraw
std::string _debugDump
osg::ref_ptr< osg::Shader_depthColorFragmentShader
Protected Attributes inherited from osgShadow::ViewDependentShadowTechnique
ViewDataMap _viewDataMap
OpenThreads::Mutex _viewDataMapMutex
Protected Attributes inherited from osgShadow::ShadowTechnique
ShadowedScene_shadowedScene
bool _dirty
Protected Attributes inherited from osg::Object
std::string _name
DataVariance _dataVariance
osg::UserDataContainer_userDataContainer
Protected Attributes inherited from osg::Referenced
OpenThreads::AtomicPtr _observerSet
OpenThreads::Atomic _refCount

Additional Inherited Members

Static Public Member Functions inherited from osg::Referenced
static OpenThreads::MutexgetGlobalReferencedMutex ()
static void setDeleteHandler (DeleteHandler *handler)
static DeleteHandlergetDeleteHandler ()
Protected Types inherited from osgShadow::ViewDependentShadowTechnique
typedef std::map< osg::ref_ptr< osg::Identifier >, osg::ref_ptr< ViewData > > ViewDataMap

Detailed Description

Class used as a layer for debugging resources used by derived xxxShadowMap classes. As designed by its base ViewDepndentShadowTechnique, DebugShadowMap serves mainly as container of DebugShadowMap::ViewData objects. Most of the debugging support work is done by these objects. DebugShadowMap technique only initializes them in initViewDependentData method.

Debugging outputs present: Shadow maps (pseudo colored to improve readability) Shadow and related volumes (represented as convex polyhedra)

Member Typedef Documentation

◆ BaseClass

Convenient typedef used in definition of ViewData struct and methods

◆ ThisClass

Convenient typedef used in definition of ViewData struct and methods

Constructor & Destructor Documentation

◆ DebugShadowMap() [1/2]

osgShadow::DebugShadowMap::DebugShadowMap ( )

Classic OSG constructor

Referenced by DebugShadowMap(), and META_Object().

◆ DebugShadowMap() [2/2]

osgShadow::DebugShadowMap::DebugShadowMap ( const DebugShadowMap & dsm,
const osg::CopyOp & copyop = osg::CopyOp::SHALLOW_COPY )

Classic OSG cloning constructor

References DebugShadowMap(), and osg::CopyOp::SHALLOW_COPY.

◆ ~DebugShadowMap()

virtual osgShadow::DebugShadowMap::~DebugShadowMap ( )
protectedvirtual

Classic protected OSG destructor

Member Function Documentation

◆ getDebugDraw()

bool osgShadow::DebugShadowMap::getDebugDraw ( void ) const
inline

Tell if debugging hud & rendering of debug volumes is active

References _doDebugDraw.

◆ getDebugDump()

std::string osgShadow::DebugShadowMap::getDebugDump ( void ) const
inline

Get the file name of debugging dump

References _debugDump.

◆ META_Object()

osgShadow::DebugShadowMap::META_Object ( osgShadow ,
DebugShadowMap  )

Declaration of standard OSG object methods

References DebugShadowMap().

◆ releaseGLObjects()

virtual void osgShadow::DebugShadowMap::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 osgShadow::ViewDependentShadowTechnique.

Reimplemented in osgShadow::StandardShadowMap.

◆ resizeGLObjectBuffers()

virtual void osgShadow::DebugShadowMap::resizeGLObjectBuffers ( unsigned int maxSize)
virtual

Resize any per context GLObject buffers to specified size.

Reimplemented from osgShadow::ViewDependentShadowTechnique.

Reimplemented in osgShadow::StandardShadowMap.

◆ setDebugDraw()

void osgShadow::DebugShadowMap::setDebugDraw ( bool draw)
inline

Turn on/off debugging hud & rendering of debug volumes in main view

References _doDebugDraw.

◆ setDebugDump()

void osgShadow::DebugShadowMap::setDebugDump ( const std::string & debugDumpFile)
inline

Set the file name of debugging dump

References _debugDump.

Member Data Documentation

◆ _debugDump

std::string osgShadow::DebugShadowMap::_debugDump
protected

Referenced by getDebugDump(), and setDebugDump().

◆ _depthColorFragmentShader

osg::ref_ptr< osg::Shader > osgShadow::DebugShadowMap::_depthColorFragmentShader
protected

◆ _doDebugDraw

bool osgShadow::DebugShadowMap::_doDebugDraw
protected

Referenced by getDebugDraw(), and setDebugDraw().

◆ _hudOrigin

osg::Vec2s osgShadow::DebugShadowMap::_hudOrigin
protected

◆ _hudSize

osg::Vec2s osgShadow::DebugShadowMap::_hudSize
protected

◆ _orthoOrigin

osg::Vec2s osgShadow::DebugShadowMap::_orthoOrigin
protected

◆ _orthoSize

osg::Vec2s osgShadow::DebugShadowMap::_orthoSize
protected

◆ _viewportOrigin

osg::Vec2s osgShadow::DebugShadowMap::_viewportOrigin
protected

◆ _viewportSize

osg::Vec2s osgShadow::DebugShadowMap::_viewportSize
protected

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