#include <W3DProjectedShadow.h>
Inherits Shadow.
Public Member Functions | |
| W3DProjectedShadow (void) | |
| ~W3DProjectedShadow (void) | |
| void | setRenderObject (RenderObjClass *robj) |
| void | setObjPosHistory (Vector3 &pos) |
| position of object when projection matrix was updated. | |
| void | setTexture (Int lightIndex, W3DShadowTexture *texture) |
| textur with light's shadow | |
| void | update (void) |
| updates the texture and/or projection parameters when the object or light moves. | |
| void | init (void) |
| allocates local member variables used for projection | |
| void | updateTexture (Vector3 &lightPos) |
| updates the shadow texture image using render object and given light position. | |
| void | updateProjectionParameters (const Matrix3D &cameraXform) |
| recompute projection matrix - needed when light or object moves. | |
| TexProjectClass * | getShadowProjector (void) |
| W3DShadowTexture * | getTexture (Int lightIndex) |
Public Member Functions inherited from Shadow | |
| Shadow (void) | |
| if this is set, then no render will occur, even if enableShadowRender() is enabled. Used by Shroud. | |
| void | enableShadowInvisible (Bool isEnabled) |
| void | enableShadowRender (Bool isEnabled) |
| Bool | isRenderEnabled (void) |
| Bool | isInvisibleEnabled (void) |
| void | setOpacity (Int value) |
| adjust opacity of decal/shadow | |
| void | setColor (Color value) |
| adjust ARGB color of decal/shadow | |
| void | setAngle (Real angle) |
| adjust orientation around z-axis | |
| void | setPosition (Real x, Real y, Real z) |
| void | setSize (Real sizeX, Real sizeY) |
Protected Member Functions | |
| virtual void | release (void) |
| custom rendering flags | |
Protected Attributes | |
| W3DShadowTexture * | m_shadowTexture [MAX_SHADOW_LIGHTS] |
| cached shadow data | |
| TexProjectClass * | m_shadowProjector |
| object used to generate texture and projection matrix. | |
| RenderObjClass * | m_robj |
| render object used to cast the shadow. | |
| Vector3 | m_lastObjPosition |
| position of object at time of projection matrix update. | |
| W3DProjectedShadow * | m_next |
| Bool | m_allowWorldAlign |
| for the shadow manager list | |
| Real | m_decalOffsetU |
| wrap shadow around world geometry - else align perpendicular to local z-axis. | |
| Real | m_decalOffsetV |
| texture coordinate offset so not centered at object origin. | |
| Int | m_flags |
| texture coordinate offset so not centered at object origin. | |
Protected Attributes inherited from Shadow | |
| Bool | m_isEnabled |
| Bool | m_isInvisibleEnabled |
| toggle to turn rendering of this shadow on/off. | |
| UnsignedInt | m_opacity |
| if set, overrides and causes no rendering. | |
| UnsignedInt | m_color |
| color in ARGB format. (Alpha is ignored). | |
| ShadowType | m_type |
| Int | m_diffuse |
| type of projection | |
| Real | m_x |
| diffuse color used to tint/fade shadow. | |
| Real | m_y |
| Real | m_z |
| Real | m_oowDecalSizeX |
| world position of shadow center when not bound to robj/drawable. | |
| Real | m_oowDecalSizeY |
| 1/(world space extent of texture in x direction) | |
| Real | m_decalSizeX |
| 1/(world space extent of texture in y direction) | |
| Real | m_decalSizeY |
| 1/(world space extent of texture in x direction) | |
| Real | m_localAngle |
| 1/(world space extent of texture in y direction) | |
Friends | |
| class | W3DProjectedShadowManager |
Object for maintaining and updating an object's shadow texture.
Definition at line 96 of file W3DProjectedShadow.h.
| W3DProjectedShadow::W3DProjectedShadow | ( | void | ) |
type of projection
wrap shadow around world geometry - else align perpendicular to local z-axis.
Definition at line 2120 of file W3DProjectedShadow.cpp.
| W3DProjectedShadow::~W3DProjectedShadow | ( | void | ) |
Definition at line 2133 of file W3DProjectedShadow.cpp.
|
inline |
Definition at line 110 of file W3DProjectedShadow.h.
|
inline |
Definition at line 114 of file W3DProjectedShadow.h.
| void W3DProjectedShadow::init | ( | void | ) |
allocates local member variables used for projection
Definition at line 2140 of file W3DProjectedShadow.cpp.
|
inlineprotectedvirtual |
custom rendering flags
release shadow from manager
Implements Shadow.
Definition at line 127 of file W3DProjectedShadow.h.
|
inline |
position of object when projection matrix was updated.
Definition at line 104 of file W3DProjectedShadow.h.
|
inline |
Definition at line 103 of file W3DProjectedShadow.h.
|
inline |
textur with light's shadow
Definition at line 105 of file W3DProjectedShadow.h.
| void W3DProjectedShadow::update | ( | void | ) |
updates the texture and/or projection parameters when the object or light moves.
Definition at line 2239 of file W3DProjectedShadow.cpp.
| void W3DProjectedShadow::updateProjectionParameters | ( | const Matrix3D & | cameraXform | ) |
recompute projection matrix - needed when light or object moves.
Definition at line 2234 of file W3DProjectedShadow.cpp.
| void W3DProjectedShadow::updateTexture | ( | Vector3 & | lightPos | ) |
updates the shadow texture image using render object and given light position.
Definition at line 2155 of file W3DProjectedShadow.cpp.
|
friend |
Definition at line 98 of file W3DProjectedShadow.h.
|
protected |
for the shadow manager list
Definition at line 123 of file W3DProjectedShadow.h.
|
protected |
wrap shadow around world geometry - else align perpendicular to local z-axis.
Definition at line 124 of file W3DProjectedShadow.h.
|
protected |
texture coordinate offset so not centered at object origin.
Definition at line 125 of file W3DProjectedShadow.h.
|
protected |
texture coordinate offset so not centered at object origin.
Definition at line 126 of file W3DProjectedShadow.h.
|
protected |
position of object at time of projection matrix update.
Definition at line 121 of file W3DProjectedShadow.h.
|
protected |
Definition at line 122 of file W3DProjectedShadow.h.
|
protected |
render object used to cast the shadow.
Definition at line 120 of file W3DProjectedShadow.h.
|
protected |
object used to generate texture and projection matrix.
Definition at line 119 of file W3DProjectedShadow.h.
|
protected |
cached shadow data
Definition at line 118 of file W3DProjectedShadow.h.