osgShadow::ShadowSettings Class Reference

`#include <ShadowSettings>`

Inheritance diagram for osgShadow::ShadowSettings:

## Public Types

enum | ShadowMapProjectionHint { ORTHOGRAPHIC_SHADOW_MAP , PERSPECTIVE_SHADOW_MAP }
enum | MultipleShadowMapHint { PARALLEL_SPLIT , CASCADED }
enum | ShaderHint { NO_SHADERS , PROVIDE_FRAGMENT_SHADER , PROVIDE_VERTEX_AND_FRAGMENT_SHADER }
Public Types inherited from osg::Object
enum | DataVariance { DYNAMIC , STATIC , UNSPECIFIED }

## Public Member Functions

| ShadowSettings ()
| ShadowSettings (const ShadowSettings &ss, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
| META_Object (osgShadow, ShadowSettings)
void | setReceivesShadowTraversalMask (unsigned int mask)
unsigned int | getReceivesShadowTraversalMask () const
void | setCastsShadowTraversalMask (unsigned int mask)
unsigned int | getCastsShadowTraversalMask () const
void | setComputeNearFarModeOverride (osg::CullSettings::ComputeNearFarMode cnfn)
osg::CullSettings::ComputeNearFarMode | getComputeNearFarModeOverride () const
void | setLightNum (int lightNum)
int | getLightNum () const
void | setBaseShadowTextureUnit (unsigned int unit)
unsigned int | getBaseShadowTextureUnit () const
void | setUseOverrideForShadowMapTexture (bool useOverride)
bool | getUseOverrideForShadowMapTexture () const
void | setTextureSize (const osg::Vec2s &textureSize)
const osg::Vec2s & | getTextureSize () const
void | setMinimumShadowMapNearFarRatio (double ratio)
double | getMinimumShadowMapNearFarRatio () const
void | setMaximumShadowMapDistance (double distance)
double | getMaximumShadowMapDistance () const
void | setShadowMapProjectionHint (ShadowMapProjectionHint hint)
ShadowMapProjectionHint | getShadowMapProjectionHint () const
void | setPerspectiveShadowMapCutOffAngle (double angle)
double | getPerspectiveShadowMapCutOffAngle () const
void | setNumShadowMapsPerLight (unsigned int numShadowMaps)
unsigned int | getNumShadowMapsPerLight () const
void | setMultipleShadowMapHint (MultipleShadowMapHint hint)
MultipleShadowMapHint | getMultipleShadowMapHint () const
void | setShaderHint (ShaderHint shaderHint)
ShaderHint | getShaderHint () const
void | setDebugDraw (bool debugDraw)
bool | getDebugDraw () 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
virtual bool | isSameKindAs (const Object *) const
virtual const char * | libraryName () const =0
virtual const char * | className () 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)
virtual void | resizeGLObjectBuffers (unsigned int)
virtual void | releaseGLObjects (osg::State *=0) const
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 | ~ShadowSettings ()
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

unsigned int | _receivesShadowTraversalMask
unsigned int | _castsShadowTraversalMask
osg::CullSettings::ComputeNearFarMode | _computeNearFearModeOverride
int | _lightNum
unsigned int | _baseShadowTextureUnit
bool | _useShadowMapTextureOverride
osg::Vec2s | _textureSize
double | _minimumShadowMapNearFarRatio
double | _maximumShadowMapDistance
ShadowMapProjectionHint | _shadowMapProjectionHint
double | _perspectiveShadowMapCutOffAngle
unsigned int | _numShadowMapsPerLight
MultipleShadowMapHint | _multipleShadowMapHint
ShaderHint | _shaderHint
bool | _debugDraw
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::Mutex * | getGlobalReferencedMutex ()
static void | setDeleteHandler (DeleteHandler *handler)
static DeleteHandler * | getDeleteHandler ()

## Detailed Description

ShadowSettings provides the parameters that the ShadowTechnique should use as a guide for setting up shadowing.

## Member Enumeration Documentation

## MultipleShadowMapHint

enum osgShadow::ShadowSettings::MultipleShadowMapHint

Enumerator
PARALLEL_SPLIT |
CASCADED |

## ShaderHint

enum osgShadow::ShadowSettings::ShaderHint

Enumerator
NO_SHADERS |
PROVIDE_FRAGMENT_SHADER |
PROVIDE_VERTEX_AND_FRAGMENT_SHADER |

## ShadowMapProjectionHint

enum osgShadow::ShadowSettings::ShadowMapProjectionHint

Enumerator
ORTHOGRAPHIC_SHADOW_MAP |
PERSPECTIVE_SHADOW_MAP |

## Constructor & Destructor Documentation

## ShadowSettings() [1/2]

osgShadow::ShadowSettings::ShadowSettings | ( |  | ) |

Referenced by META_Object(), and ShadowSettings().

## ShadowSettings() [2/2]

osgShadow::ShadowSettings::ShadowSettings | ( | const ShadowSettings & | ss,
|  | const osg::CopyOp & | copyop = osg::CopyOp::SHALLOW_COPY )

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

## ~ShadowSettings()

virtual osgShadow::ShadowSettings::~ShadowSettings | ( |  | ) |

protected virtual

## Member Function Documentation

## getBaseShadowTextureUnit()

unsigned int osgShadow::ShadowSettings::getBaseShadowTextureUnit | ( |  | ) | const

inline

References _baseShadowTextureUnit.

## getCastsShadowTraversalMask()

unsigned int osgShadow::ShadowSettings::getCastsShadowTraversalMask | ( |  | ) | const

inline

References _castsShadowTraversalMask.

## getComputeNearFarModeOverride()

osg::CullSettings::ComputeNearFarMode osgShadow::ShadowSettings::getComputeNearFarModeOverride | ( |  | ) | const

inline

References _computeNearFearModeOverride.

## getDebugDraw()

bool osgShadow::ShadowSettings::getDebugDraw | ( |  | ) | const

inline

References _debugDraw.

## getLightNum()

int osgShadow::ShadowSettings::getLightNum | ( |  | ) | const

inline

References _lightNum.

## getMaximumShadowMapDistance()

double osgShadow::ShadowSettings::getMaximumShadowMapDistance | ( |  | ) | const

inline

References _maximumShadowMapDistance.

## getMinimumShadowMapNearFarRatio()

double osgShadow::ShadowSettings::getMinimumShadowMapNearFarRatio | ( |  | ) | const

inline

References _minimumShadowMapNearFarRatio.

## getMultipleShadowMapHint()

MultipleShadowMapHint osgShadow::ShadowSettings::getMultipleShadowMapHint | ( |  | ) | const

inline

References _multipleShadowMapHint.

## getNumShadowMapsPerLight()

unsigned int osgShadow::ShadowSettings::getNumShadowMapsPerLight | ( |  | ) | const

inline

References _numShadowMapsPerLight.

## getPerspectiveShadowMapCutOffAngle()

double osgShadow::ShadowSettings::getPerspectiveShadowMapCutOffAngle | ( |  | ) | const

inline

References _perspectiveShadowMapCutOffAngle.

## getReceivesShadowTraversalMask()

unsigned int osgShadow::ShadowSettings::getReceivesShadowTraversalMask | ( |  | ) | const

inline

References _receivesShadowTraversalMask.

## getShaderHint()

ShaderHint osgShadow::ShadowSettings::getShaderHint | ( |  | ) | const

inline

References _shaderHint.

## getShadowMapProjectionHint()

ShadowMapProjectionHint osgShadow::ShadowSettings::getShadowMapProjectionHint | ( |  | ) | const

inline

References _shadowMapProjectionHint.

## getTextureSize()

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

inline

Get the size of the shadow map textures.

References _textureSize.

## getUseOverrideForShadowMapTexture()

bool osgShadow::ShadowSettings::getUseOverrideForShadowMapTexture | ( |  | ) | const

inline

Get whether to use osg::StateAttribute::OVERRIDE for the shadow map texture.

References _useShadowMapTextureOverride.

## META_Object()

osgShadow::ShadowSettings::META_Object | ( | osgShadow | ,
|  | ShadowSettings | )

References ShadowSettings().

## setBaseShadowTextureUnit()

void osgShadow::ShadowSettings::setBaseShadowTextureUnit | ( | unsigned int | unit | ) |

inline

References _baseShadowTextureUnit.

## setCastsShadowTraversalMask()

void osgShadow::ShadowSettings::setCastsShadowTraversalMask | ( | unsigned int | mask | ) |

inline

References _castsShadowTraversalMask.

## setComputeNearFarModeOverride()

void osgShadow::ShadowSettings::setComputeNearFarModeOverride | ( | osg::CullSettings::ComputeNearFarMode | cnfn | ) |

inline

References _computeNearFearModeOverride.

## setDebugDraw()

void osgShadow::ShadowSettings::setDebugDraw | ( | bool | debugDraw | ) |

inline

References _debugDraw.

## setLightNum()

void osgShadow::ShadowSettings::setLightNum | ( | int | lightNum | ) |

inline

Set the LightNum of the light in the scene to assign a shadow for. Default value is -1, which signifies that shadow technique should automatically select an active light to assign a shadow, typically this will be the first active light found.

References _lightNum.

## setMaximumShadowMapDistance()

void osgShadow::ShadowSettings::setMaximumShadowMapDistance | ( | double | distance | ) |

inline

References _maximumShadowMapDistance.

## setMinimumShadowMapNearFarRatio()

void osgShadow::ShadowSettings::setMinimumShadowMapNearFarRatio | ( | double | ratio | ) |

inline

References _minimumShadowMapNearFarRatio.

## setMultipleShadowMapHint()

void osgShadow::ShadowSettings::setMultipleShadowMapHint | ( | MultipleShadowMapHint | hint | ) |

inline

References _multipleShadowMapHint.

## setNumShadowMapsPerLight()

void osgShadow::ShadowSettings::setNumShadowMapsPerLight | ( | unsigned int | numShadowMaps | ) |

inline

References _numShadowMapsPerLight.

## setPerspectiveShadowMapCutOffAngle()

void osgShadow::ShadowSettings::setPerspectiveShadowMapCutOffAngle | ( | double | angle | ) |

inline

Set the cut off angle, in degrees, between the light direction and the view direction that determines whether perspective shadow mapping is appropriate, or thar orthographic shadow map should be used instead. Default is 2 degrees so that for any angle greater than 2 degrees perspective shadow map will be used, and any angle less than 2 degrees orthographic shadow map will be used. Note, if ShadowMapProjectionHint is set to ORTHOGRAPHIC_SHADOW_MAP then an orthographic shadow map will always be used.

References _perspectiveShadowMapCutOffAngle.

## setReceivesShadowTraversalMask()

void osgShadow::ShadowSettings::setReceivesShadowTraversalMask | ( | unsigned int | mask | ) |

inline

References _receivesShadowTraversalMask.

## setShaderHint()

void osgShadow::ShadowSettings::setShaderHint | ( | ShaderHint | shaderHint | ) |

inline

References _shaderHint.

## setShadowMapProjectionHint()

void osgShadow::ShadowSettings::setShadowMapProjectionHint | ( | ShadowMapProjectionHint | hint | ) |

inline

References _shadowMapProjectionHint.

## setTextureSize()

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

inline

Set the size of the shadow map textures.

References _textureSize.

## setUseOverrideForShadowMapTexture()

void osgShadow::ShadowSettings::setUseOverrideForShadowMapTexture | ( | bool | useOverride | ) |

inline

Set whether to use osg::StateAttribute::OVERRIDE for the shadow map texture. Enabling override will force the shadow map texture to override any texture set on the shadow maps texture unit.

References _useShadowMapTextureOverride.

## Member Data Documentation

## _baseShadowTextureUnit

unsigned int osgShadow::ShadowSettings::_baseShadowTextureUnit

protected

Referenced by getBaseShadowTextureUnit(), and setBaseShadowTextureUnit().

## _castsShadowTraversalMask

unsigned int osgShadow::ShadowSettings::_castsShadowTraversalMask

protected

Referenced by getCastsShadowTraversalMask(), and setCastsShadowTraversalMask().

## _computeNearFearModeOverride

osg::CullSettings::ComputeNearFarMode osgShadow::ShadowSettings::_computeNearFearModeOverride

protected

Referenced by getComputeNearFarModeOverride(), and setComputeNearFarModeOverride().

## _debugDraw

bool osgShadow::ShadowSettings::_debugDraw

protected

Referenced by getDebugDraw(), and setDebugDraw().

## _lightNum

int osgShadow::ShadowSettings::_lightNum

protected

Referenced by getLightNum(), and setLightNum().

## _maximumShadowMapDistance

double osgShadow::ShadowSettings::_maximumShadowMapDistance

protected

Referenced by getMaximumShadowMapDistance(), and setMaximumShadowMapDistance().

## _minimumShadowMapNearFarRatio

double osgShadow::ShadowSettings::_minimumShadowMapNearFarRatio

protected

Referenced by getMinimumShadowMapNearFarRatio(), and setMinimumShadowMapNearFarRatio().

## _multipleShadowMapHint

MultipleShadowMapHint osgShadow::ShadowSettings::_multipleShadowMapHint

protected

Referenced by getMultipleShadowMapHint(), and setMultipleShadowMapHint().

## _numShadowMapsPerLight

unsigned int osgShadow::ShadowSettings::_numShadowMapsPerLight

protected

Referenced by getNumShadowMapsPerLight(), and setNumShadowMapsPerLight().

## _perspectiveShadowMapCutOffAngle

double osgShadow::ShadowSettings::_perspectiveShadowMapCutOffAngle

protected

Referenced by getPerspectiveShadowMapCutOffAngle(), and setPerspectiveShadowMapCutOffAngle().

## _receivesShadowTraversalMask

unsigned int osgShadow::ShadowSettings::_receivesShadowTraversalMask

protected

Referenced by getReceivesShadowTraversalMask(), and setReceivesShadowTraversalMask().

## _shaderHint

ShaderHint osgShadow::ShadowSettings::_shaderHint

protected

Referenced by getShaderHint(), and setShaderHint().

## _shadowMapProjectionHint

ShadowMapProjectionHint osgShadow::ShadowSettings::_shadowMapProjectionHint

protected

Referenced by getShadowMapProjectionHint(), and setShadowMapProjectionHint().

## _textureSize

osg::Vec2s osgShadow::ShadowSettings::_textureSize

protected

Referenced by getTextureSize(), and setTextureSize().

## _useShadowMapTextureOverride

bool osgShadow::ShadowSettings::_useShadowMapTextureOverride

protected

Referenced by getUseOverrideForShadowMapTexture(), and setUseOverrideForShadowMapTexture().

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

- ShadowSettings