#include <W3DShadow.h>
Public Member Functions | |
| W3DShadowManager (void) | |
| ~W3DShadowManager (void) | |
| Bool | init (void) |
| initialize resources used by manager, must have valid D3D device. | |
| void | queueShadows (Bool state) |
| flags system to process shadows on next render call. | |
| void | Reset (void) |
| Shadow * | addShadow (RenderObjClass *robj, Shadow::ShadowTypeInfo *shadowInfo=NULL, Drawable *draw=NULL) |
| adds shadow caster to rendering system. | |
| void | removeShadow (Shadow *shadow) |
| removed shadow from rendering system and frees its resources. | |
| void | removeAllShadows (void) |
| Remove all shadows. | |
| void | setShadowColor (UnsignedInt color) |
| sets the shadow color and alpha, value in ARGB format. | |
| UnsignedInt | getShadowColor () |
| gets the shadow color and alpha, value in ARGB format. | |
| void | setLightPosition (Int lightIndex, Real x, Real y, Real z) |
| sets the position of a specific light source. | |
| void | setTimeOfDay (TimeOfDay tod) |
| void | invalidateCachedLightPositions (void) |
| forces shadow volumes to update regardless of last lightposition | |
| Vector3 & | getLightPosWorld (Int lightIndex) |
| returns the position of specified light source. | |
| Bool | isShadowScene (void) |
| void | setStencilShadowMask (int mask) |
| mask used to mask out stencil bits used for storing occlusion/playerColor | |
| Int | getStencilShadowMask (void) |
| void | RenderShadows (void) |
| void | ReleaseResources (void) |
| Bool | ReAcquireResources (void) |
Protected Attributes | |
| Bool | m_isShadowScene |
| flag if current scene needs shadows. No shadows on pre-pass and 2D. | |
| UnsignedInt | m_shadowColor |
| color and alpha for all shadows in scene. | |
| Int | m_stencilShadowMask |
Definition at line 37 of file W3DShadow.h.
| W3DShadowManager::W3DShadowManager | ( | void | ) |
Definition at line 97 of file W3DShadow.cpp.
| W3DShadowManager::~W3DShadowManager | ( | void | ) |
Definition at line 116 of file W3DShadow.cpp.
| Shadow * W3DShadowManager::addShadow | ( | RenderObjClass * | robj, |
| Shadow::ShadowTypeInfo * | shadowInfo = NULL, | ||
| Drawable * | draw = NULL ) |
adds shadow caster to rendering system.
Definition at line 175 of file W3DShadow.cpp.
returns the position of specified light source.
Definition at line 222 of file W3DShadow.cpp.
|
inline |
gets the shadow color and alpha, value in ARGB format.
Definition at line 53 of file W3DShadow.h.
|
inline |
Definition at line 60 of file W3DShadow.h.
| Bool W3DShadowManager::init | ( | void | ) |
initialize resources used by manager, must have valid D3D device.
Do one-time initilalization of shadow systems that need to be active for full duration of game
Definition at line 126 of file W3DShadow.cpp.
| void W3DShadowManager::invalidateCachedLightPositions | ( | void | ) |
forces shadow volumes to update regardless of last lightposition
Force update of all shadows even when light source and object have not moved
Definition at line 214 of file W3DShadow.cpp.
|
inline |
Definition at line 58 of file W3DShadow.h.
|
inline |
flags system to process shadows on next render call.
Definition at line 45 of file W3DShadow.h.
| Bool W3DShadowManager::ReAcquireResources | ( | void | ) |
Definition at line 155 of file W3DShadow.cpp.
| void W3DShadowManager::ReleaseResources | ( | void | ) |
Definition at line 167 of file W3DShadow.cpp.
| void W3DShadowManager::removeAllShadows | ( | void | ) |
Remove all shadows.
Definition at line 205 of file W3DShadow.cpp.
| void W3DShadowManager::removeShadow | ( | Shadow * | shadow | ) |
removed shadow from rendering system and frees its resources.
Definition at line 200 of file W3DShadow.cpp.
| void W3DShadowManager::RenderShadows | ( | void | ) |
| void W3DShadowManager::Reset | ( | void | ) |
Do per-map reset. This frees up shadows from all objects since they may not exist on the next map
Definition at line 146 of file W3DShadow.cpp.
sets the position of a specific light source.
Definition at line 227 of file W3DShadow.cpp.
|
inline |
sets the shadow color and alpha, value in ARGB format.
Definition at line 52 of file W3DShadow.h.
|
inline |
mask used to mask out stencil bits used for storing occlusion/playerColor
Definition at line 59 of file W3DShadow.h.
| void W3DShadowManager::setTimeOfDay | ( | TimeOfDay | tod | ) |
Definition at line 235 of file W3DShadow.cpp.
|
protected |
flag if current scene needs shadows. No shadows on pre-pass and 2D.
Definition at line 69 of file W3DShadow.h.
|
protected |
color and alpha for all shadows in scene.
Definition at line 70 of file W3DShadow.h.
|
protected |
Definition at line 71 of file W3DShadow.h.