#include <W3DProjectedShadow.h>
Inherits ProjectedShadowManager.
Public Member Functions | |
| W3DProjectedShadowManager (void) | |
| ~W3DProjectedShadowManager (void) | |
| Bool | init (void) |
| allocate one-time shadow assets for length of entire game. | |
| void | reset (void) |
| free all existing shadows - ready for next map. | |
| void | shutdown (void) |
| free all assets prior to shutdown of entire game. | |
| Int | renderShadows (RenderInfoClass &rinfo) |
| iterate over each object and render its shadow onto affected objects. | |
| void | ReleaseResources (void) |
| release device dependent D3D resources. | |
| Bool | ReAcquireResources (void) |
| allocate device dependent D3D resources. | |
| void | invalidateCachedLightPositions (void) |
| forces shadows to update regardless of last lightposition | |
| virtual Shadow * | addDecal (RenderObjClass *robj, Shadow::ShadowTypeInfo *shadowInfo) |
| add a non-shadow decal | |
| virtual Shadow * | addDecal (Shadow::ShadowTypeInfo *shadowInfo) |
| add a non-shadow decal which does not follow an object. | |
| W3DProjectedShadow * | addShadow (RenderObjClass *robj, Shadow::ShadowTypeInfo *shadowInfo, Drawable *draw) |
| add a new shadow with texture of given name or that of robj. | |
| W3DProjectedShadow * | createDecalShadow (Shadow::ShadowTypeInfo *shadowInfo) |
| add a new shadow with texture of given name or that of robj. | |
| void | removeShadow (W3DProjectedShadow *shadow) |
| void | removeAllShadows (void) |
| Remove all shadows. | |
| TextureClass * | getRenderTarget (void) |
| SpecialRenderInfoClass * | getRenderContext (void) |
| void | updateRenderTargetTextures (void) |
| render into any textures that need updating. | |
| void | queueDecal (W3DProjectedShadow *shadow) |
| add shadow decal to render list - decal conforms to terrain. | |
| void | queueSimpleDecal (W3DProjectedShadow *shadow) |
| add shadow decal to render list - decal floats on terrain. | |
| void | flushDecals (W3DShadowTexture *texture, ShadowType type) |
| empty queue by rendering all decals with given texture | |
Public Member Functions inherited from ProjectedShadowManager | |
| virtual | ~ProjectedShadowManager () |
Definition at line 46 of file W3DProjectedShadow.h.
| W3DProjectedShadowManager::W3DProjectedShadowManager | ( | void | ) |
Definition at line 215 of file W3DProjectedShadow.cpp.
| W3DProjectedShadowManager::~W3DProjectedShadowManager | ( | void | ) |
Definition at line 226 of file W3DProjectedShadow.cpp.
|
virtual |
add a non-shadow decal
Generic function which can be used to create arbitrary decals that follow the renderObject but don't have to be used for shadows. Some examples: Scorch marks, blood, stains, selection/status indicators, etc.
type of projection
wrap shadow around world geometry - else align perpendicular to local z-axis.
type of projection
wrap shadow around world geometry - else align perpendicular to local z-axis.
Implements ProjectedShadowManager.
Definition at line 1597 of file W3DProjectedShadow.cpp.
|
virtual |
add a non-shadow decal which does not follow an object.
Generic function which can be used to create arbitrary decals that don't have to be used for shadows. Some examples: Scorch marks, blood, stains, selection/status indicators, etc.
type of projection
wrap shadow around world geometry - else align perpendicular to local z-axis.
type of projection
wrap shadow around world geometry - else align perpendicular to local z-axis.
Implements ProjectedShadowManager.
Definition at line 1481 of file W3DProjectedShadow.cpp.
| W3DProjectedShadow * W3DProjectedShadowManager::addShadow | ( | RenderObjClass * | robj, |
| Shadow::ShadowTypeInfo * | shadowInfo, | ||
| Drawable * | draw ) |
add a new shadow with texture of given name or that of robj.
type of projection
wrap shadow around world geometry - else align perpendicular to local z-axis.
type of projection
wrap shadow around world geometry - else align perpendicular to local z-axis.
Definition at line 1731 of file W3DProjectedShadow.cpp.
| W3DProjectedShadow * W3DProjectedShadowManager::createDecalShadow | ( | Shadow::ShadowTypeInfo * | shadowInfo | ) |
add a new shadow with texture of given name or that of robj.
type of projection
wrap shadow around world geometry - else align perpendicular to local z-axis.
type of projection
wrap shadow around world geometry - else align perpendicular to local z-axis.
Definition at line 1927 of file W3DProjectedShadow.cpp.
| void W3DProjectedShadowManager::flushDecals | ( | W3DShadowTexture * | texture, |
| ShadowType | type ) |
empty queue by rendering all decals with given texture
Definition at line 685 of file W3DProjectedShadow.cpp.
|
inline |
Definition at line 72 of file W3DProjectedShadow.h.
|
inline |
Definition at line 71 of file W3DProjectedShadow.h.
| Bool W3DProjectedShadowManager::init | ( | void | ) |
allocate one-time shadow assets for length of entire game.
Definition at line 252 of file W3DProjectedShadow.cpp.
| void W3DProjectedShadowManager::invalidateCachedLightPositions | ( | void | ) |
forces shadows to update regardless of last lightposition
Definition at line 326 of file W3DProjectedShadow.cpp.
| void W3DProjectedShadowManager::queueDecal | ( | W3DProjectedShadow * | shadow | ) |
add shadow decal to render list - decal conforms to terrain.
Decals have a low poly count so its better to render large numbers at once. This system will queue them up until the buffers fill up. It will then flush the buffer (draw decals) and be ready for new decals. This is an optimized system that only uses the render objects bounding box to determine shadow visibility.
Definition at line 811 of file W3DProjectedShadow.cpp.
| void W3DProjectedShadowManager::queueSimpleDecal | ( | W3DProjectedShadow * | shadow | ) |
add shadow decal to render list - decal floats on terrain.
Simpler/faster decal system that always uses 2 triangles that are roughly oriented to terrain. Since they are not projected onto terrain, there may be clipping artifacts in certain situations. TODO: Too much clipping. Need to check terrain heights at all 4 corners and adjust tilt to match
Definition at line 1154 of file W3DProjectedShadow.cpp.
| Bool W3DProjectedShadowManager::ReAcquireResources | ( | void | ) |
allocate device dependent D3D resources.
Definition at line 263 of file W3DProjectedShadow.cpp.
| void W3DProjectedShadowManager::ReleaseResources | ( | void | ) |
release device dependent D3D resources.
Definition at line 314 of file W3DProjectedShadow.cpp.
| void W3DProjectedShadowManager::removeAllShadows | ( | void | ) |
Remove all shadows.
Definition at line 2084 of file W3DProjectedShadow.cpp.
| void W3DProjectedShadowManager::removeShadow | ( | W3DProjectedShadow * | shadow | ) |
Definition at line 2028 of file W3DProjectedShadow.cpp.
| Int W3DProjectedShadowManager::renderShadows | ( | RenderInfoClass & | rinfo | ) |
iterate over each object and render its shadow onto affected objects.
Definition at line 1294 of file W3DProjectedShadow.cpp.
| void W3DProjectedShadowManager::reset | ( | void | ) |
free all existing shadows - ready for next map.
Definition at line 242 of file W3DProjectedShadow.cpp.
| void W3DProjectedShadowManager::shutdown | ( | void | ) |
free all assets prior to shutdown of entire game.
| void W3DProjectedShadowManager::updateRenderTargetTextures | ( | void | ) |
render into any textures that need updating.
Definition at line 331 of file W3DProjectedShadow.cpp.