osgShadow::StandardShadowMap Class Reference

`#include <StandardShadowMap>`

Inheritance diagram for osgShadow::StandardShadowMap:

## Classes

struct | ViewData

## Public Types

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

## Public Member Functions

| StandardShadowMap ()
| StandardShadowMap (const StandardShadowMap &ssm, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
| META_Object (osgShadow, StandardShadowMap)
void | setBaseTextureUnit (unsigned int unit)
unsigned int | getBaseTextureUnit (void) const
void | setShadowTextureUnit (unsigned int unit)
unsigned int | getShadowTextureUnit (void) const
void | setBaseTextureCoordIndex (unsigned int index)
unsigned int | getBaseTextureCoordIndex (void) const
void | setShadowTextureCoordIndex (unsigned int index)
unsigned int | getShadowTextureCoordIndex (void) const
void | setTextureSize (const osg::Vec2s &textureSize)
const osg::Vec2s & | getTextureSize () const
void | setLight (osg::Light *light)
osg::Light * | getLight (void)
const osg::Light * | getLight (void) const
osg::Shader * | getShadowVertexShader ()
osg::Shader * | getShadowFragmentShader ()
osg::Shader * | getMainVertexShader ()
osg::Shader * | getMainFragmentShader ()
void | setShadowVertexShader (osg::Shader *shader)
void | setShadowFragmentShader (osg::Shader *shader)
void | setMainVertexShader (osg::Shader *shader)
void | setMainFragmentShader (osg::Shader *shader)
virtual void | resizeGLObjectBuffers (unsigned int maxSize)
virtual void | releaseGLObjects (osg::State *=0) const
Public Member Functions inherited from osgShadow::DebugShadowMap
| 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)
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)
ShadowedScene * | getShadowedScene ()
const ShadowedScene * | getShadowedScene () const
Public Member Functions inherited from osg::Object
| Object ()
| Object (bool threadSafeRefUnref)
| Object (const Object &, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
virtual Object * | cloneType () const =0
virtual Object * | clone (const CopyOp &) const =0
std::string | getCompoundClassName () const
virtual Node * | asNode ()
virtual const Node * | asNode () const
virtual NodeVisitor * | asNodeVisitor ()
virtual const NodeVisitor * | asNodeVisitor () const
virtual StateSet * | asStateSet ()
virtual const StateSet * | asStateSet () const
virtual StateAttribute * | asStateAttribute ()
virtual const StateAttribute * | asStateAttribute () const
virtual Uniform * | asUniform ()
virtual const Uniform * | asUniform () const
virtual Camera * | asCamera ()
virtual const Camera * | asCamera () const
virtual Drawable * | asDrawable ()
virtual const Drawable * | asDrawable () const
virtual Callback * | asCallback ()
virtual const Callback * | asCallback () const
virtual CallbackObject * | asCallbackObject ()
virtual const CallbackObject * | asCallbackObject () const
virtual UserDataContainer * | asUserDataContainer ()
virtual const UserDataContainer * | asUserDataContainer () const
virtual ValueObject * | asValueObject ()
virtual const ValueObject * | asValueObject () const
virtual Image * | asImage ()
virtual const Image * | asImage () 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::UserDataContainer * | getUserDataContainer ()
const osg::UserDataContainer * | getUserDataContainer () const
osg::UserDataContainer * | getOrCreateUserDataContainer ()
virtual void | setUserData (Referenced *obj)
template<class T>
void | setUserData (const ref_ptr< T > &ud)
virtual Referenced * | getUserData ()
virtual const Referenced * | getUserData () 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 &)
Referenced & | operator= (const Referenced &)
bool | getThreadSafeRefUnref () const
OpenThreads::Mutex * | getRefMutex () const
int | ref () const
int | unref () const
int | unref_nodelete () const
int | referenceCount () const
ObserverSet * | getObserverSet () const
ObserverSet * | getOrCreateObserverSet () const
void | addObserver (Observer *observer) const
void | removeObserver (Observer *observer) const

## Protected Member Functions

virtual | ~StandardShadowMap (void)
virtual void | updateTextureCoordIndices (unsigned int baseTexCoordIndex, unsigned int shadowTexCoordIndex)
virtual void | searchAndReplaceShaderSource (osg::Shader *, std::string fromString, std::string toString)
Protected Member Functions inherited from osgShadow::DebugShadowMap
virtual | ~DebugShadowMap ()
Protected Member Functions inherited from osgShadow::ViewDependentShadowTechnique
| ~ViewDependentShadowTechnique (void)
virtual ViewDependentShadowTechnique::ViewData * | getViewDependentData (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::ref_ptr< osg::Shader > | _mainVertexShader
osg::ref_ptr< osg::Shader > | _mainFragmentShader
osg::ref_ptr< osg::Shader > | _shadowVertexShader
osg::ref_ptr< osg::Shader > | _shadowFragmentShader
osg::ref_ptr< osg::Light > | _light
float | _polygonOffsetFactor
float | _polygonOffsetUnits
osg::Vec2s | _textureSize
unsigned int | _baseTextureUnit
unsigned int | _shadowTextureUnit
unsigned int | _baseTextureCoordIndex
unsigned int | _shadowTextureCoordIndex
Protected Attributes inherited from osgShadow::DebugShadowMap
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

## Friends

struct | ViewData

## Additional Inherited Members

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

## Member Typedef Documentation

## BaseClass

typedef DebugShadowMap osgShadow::StandardShadowMap::BaseClass

Convenient typedef used in definition of ViewData struct and methods

## ThisClass

typedef StandardShadowMap osgShadow::StandardShadowMap::ThisClass

Convenient typedef used in definition of ViewData struct and methods

## Constructor & Destructor Documentation

## StandardShadowMap() [1/2]

osgShadow::StandardShadowMap::StandardShadowMap | ( |  | ) |

Classic OSG constructor

Referenced by META_Object(), and StandardShadowMap().

## StandardShadowMap() [2/2]

osgShadow::StandardShadowMap::StandardShadowMap | ( | const StandardShadowMap & | ssm,
|  | const osg::CopyOp & | copyop = osg::CopyOp::SHALLOW_COPY )

Classic OSG cloning constructor

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

## ~StandardShadowMap()

virtual osgShadow::StandardShadowMap::~StandardShadowMap | ( | void |  | ) |

protected virtual

Classic protected OSG destructor

## Member Function Documentation

## getBaseTextureCoordIndex()

unsigned int osgShadow::StandardShadowMap::getBaseTextureCoordIndex | ( | void |  | ) | const

inline

References _baseTextureCoordIndex.

## getBaseTextureUnit()

unsigned int osgShadow::StandardShadowMap::getBaseTextureUnit | ( | void |  | ) | const

inline

References _baseTextureUnit.

## getLight() [1/2]

osg::Light * osgShadow::StandardShadowMap::getLight | ( | void |  | ) |

inline

References _light.

## getLight() [2/2]

const osg::Light * osgShadow::StandardShadowMap::getLight | ( | void |  | ) | const

inline

References _light.

## getMainFragmentShader()

osg::Shader * osgShadow::StandardShadowMap::getMainFragmentShader | ( |  | ) |

inline

References _mainFragmentShader.

## getMainVertexShader()

osg::Shader * osgShadow::StandardShadowMap::getMainVertexShader | ( |  | ) |

inline

References _mainVertexShader.

## getShadowFragmentShader()

osg::Shader * osgShadow::StandardShadowMap::getShadowFragmentShader | ( |  | ) |

inline

References _shadowFragmentShader.

## getShadowTextureCoordIndex()

unsigned int osgShadow::StandardShadowMap::getShadowTextureCoordIndex | ( | void |  | ) | const

inline

References _shadowTextureCoordIndex.

## getShadowTextureUnit()

unsigned int osgShadow::StandardShadowMap::getShadowTextureUnit | ( | void |  | ) | const

inline

References _shadowTextureUnit.

## getShadowVertexShader()

osg::Shader * osgShadow::StandardShadowMap::getShadowVertexShader | ( |  | ) |

inline

References _shadowVertexShader.

## getTextureSize()

const osg::Vec2s & osgShadow::StandardShadowMap::getTextureSize | ( |  | ) | const

inline

References _textureSize.

## META_Object()

osgShadow::StandardShadowMap::META_Object | ( | osgShadow | ,
|  | StandardShadowMap | )

Declaration of standard OSG object methods

References StandardShadowMap().

## releaseGLObjects()

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

## resizeGLObjectBuffers()

virtual void osgShadow::StandardShadowMap::resizeGLObjectBuffers | ( | unsigned int | maxSize | ) |

virtual

Resize any per context GLObject buffers to specified size.

Reimplemented from osgShadow::DebugShadowMap.

## searchAndReplaceShaderSource()

virtual void osgShadow::StandardShadowMap::searchAndReplaceShaderSource | ( | osg::Shader * | ,
|  | std::string | fromString,
|  | std::string | toString )

protected virtual

## setBaseTextureCoordIndex()

void osgShadow::StandardShadowMap::setBaseTextureCoordIndex | ( | unsigned int | index | ) |

inline

References _baseTextureCoordIndex, and updateTextureCoordIndices().

## setBaseTextureUnit()

void osgShadow::StandardShadowMap::setBaseTextureUnit | ( | unsigned int | unit | ) |

inline

References _baseTextureUnit, and osgShadow::ViewDependentShadowTechnique::dirty().

## setLight()

void osgShadow::StandardShadowMap::setLight | ( | osg::Light * | light | ) |

inline

References _light.

## setMainFragmentShader()

void osgShadow::StandardShadowMap::setMainFragmentShader | ( | osg::Shader * | shader | ) |

inline

References _mainFragmentShader.

## setMainVertexShader()

void osgShadow::StandardShadowMap::setMainVertexShader | ( | osg::Shader * | shader | ) |

inline

References _mainVertexShader.

## setShadowFragmentShader()

void osgShadow::StandardShadowMap::setShadowFragmentShader | ( | osg::Shader * | shader | ) |

inline

References _shadowFragmentShader.

## setShadowTextureCoordIndex()

void osgShadow::StandardShadowMap::setShadowTextureCoordIndex | ( | unsigned int | index | ) |

inline

References _shadowTextureCoordIndex, and updateTextureCoordIndices().

## setShadowTextureUnit()

void osgShadow::StandardShadowMap::setShadowTextureUnit | ( | unsigned int | unit | ) |

inline

References _shadowTextureUnit, and osgShadow::ViewDependentShadowTechnique::dirty().

## setShadowVertexShader()

void osgShadow::StandardShadowMap::setShadowVertexShader | ( | osg::Shader * | shader | ) |

inline

References _shadowVertexShader.

## setTextureSize()

void osgShadow::StandardShadowMap::setTextureSize | ( | const osg::Vec2s & | textureSize | ) |

inline

References _textureSize, and osgShadow::ViewDependentShadowTechnique::dirty().

## updateTextureCoordIndices()

virtual void osgShadow::StandardShadowMap::updateTextureCoordIndices | ( | unsigned int | baseTexCoordIndex,
|  | unsigned int | shadowTexCoordIndex )

protected virtual

Referenced by setBaseTextureCoordIndex(), and setShadowTextureCoordIndex().

## Friends And Related Symbol Documentation

## ViewData

friend struct ViewData

friend

## Member Data Documentation

## _baseTextureCoordIndex

unsigned int osgShadow::StandardShadowMap::_baseTextureCoordIndex

protected

Referenced by getBaseTextureCoordIndex(), and setBaseTextureCoordIndex().

## _baseTextureUnit

unsigned int osgShadow::StandardShadowMap::_baseTextureUnit

protected

Referenced by getBaseTextureUnit(), and setBaseTextureUnit().

## _light

osg::ref_ptr< osg::Light > osgShadow::StandardShadowMap::_light

protected

Referenced by getLight(), getLight(), and setLight().

## _mainFragmentShader

osg::ref_ptr< osg::Shader > osgShadow::StandardShadowMap::_mainFragmentShader

protected

Referenced by getMainFragmentShader(), and setMainFragmentShader().

## _mainVertexShader

osg::ref_ptr< osg::Shader > osgShadow::StandardShadowMap::_mainVertexShader

protected

Referenced by getMainVertexShader(), and setMainVertexShader().

## _polygonOffsetFactor

float osgShadow::StandardShadowMap::_polygonOffsetFactor

protected

## _polygonOffsetUnits

float osgShadow::StandardShadowMap::_polygonOffsetUnits

protected

## _shadowFragmentShader

osg::ref_ptr< osg::Shader > osgShadow::StandardShadowMap::_shadowFragmentShader

protected

Referenced by getShadowFragmentShader(), and setShadowFragmentShader().

## _shadowTextureCoordIndex

unsigned int osgShadow::StandardShadowMap::_shadowTextureCoordIndex

protected

Referenced by getShadowTextureCoordIndex(), and setShadowTextureCoordIndex().

## _shadowTextureUnit

unsigned int osgShadow::StandardShadowMap::_shadowTextureUnit

protected

Referenced by getShadowTextureUnit(), and setShadowTextureUnit().

## _shadowVertexShader

osg::ref_ptr< osg::Shader > osgShadow::StandardShadowMap::_shadowVertexShader

protected

Referenced by getShadowVertexShader(), and setShadowVertexShader().

## _textureSize

osg::Vec2s osgShadow::StandardShadowMap::_textureSize

protected

Referenced by getTextureSize(), and setTextureSize().

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

- StandardShadowMap