My Project
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | Protected Attributes | List of all members
ParaEngine::ShadowVolume Class Reference

ShadowVolume is a structure for storing shadow volume geometries. More...

#include <ShadowVolume.h>

Public Types

enum  ShadowMethod { SHADOW_NONE = 0, SHADOW_Z_PASS, SHADOW_Z_FAIL }
 

Public Member Functions

void Reset ()
 current view matrix More...
 
void ReserveNewBlock (Vector3 **pVertices, int nSize)
 
void CommitBlock (int nSize)
 
void BuildFromShadowCaster (ShadowCaster *pCaster, LightParams *pLight)
 
void ReCalculateOcclusionPyramid (CAutoCamera *pCamera)
 recalculate occlusion pyramid
 
void UpdateProjectionInfo (const ParaViewport *pViewport, const Matrix4 *pProj, const Matrix4 *pView)
 update projection information
 
void ProjectPoint (Vector3 *pOut, const Vector3 *pV, const Matrix4 *pWorld)
 project point to screen
 
bool PointsInsideOcclusionPyramid (Vector3 *pVecBounds, int nCount)
 check if the region inside the points intersect with the occlusion pyramid
 
void SetLightParams (LightParams *l)
 set current light
 
HRESULT Render (SceneState *sceneState)
 render without states overhead
 
HRESULT RenderZPassShadow (SceneState *sceneState)
 render to stencil with Z Pass
 
HRESULT RenderZFailShadow (SceneState *sceneState)
 render to stencil with Z Fail
 

Public Attributes

int m_nVertexArraySize
 
Vector3m_pVertices
 initial value is 32000, doubled when exceeded
 
int m_nNumVertices
 Vertex data for rendering shadow volume.
 
LinearColor m_shadowColor
 number of vertices in the shadow volume, it must be multiple of 6, since 6 vertices will describe a face.
 
ShadowMethod m_shadowMethod
 the color of the shadow, alpha enabled.
 
LightParamsm_pLightParam
 in which way, the data in this shadow volume should be drawn
 
Plane occlusionPyramid [5]
 current light info associated with the shadow volume
 

Static Public Attributes

static float m_fMinShadowCastDistance = MIN_SHADOW_CAST_DISTANCE
 

Protected Attributes

ParaViewport m_viewport
 used to decide whether to use Z-Fail or Z pass method
 
Matrix4 m_matProjection
 current viewport for projection
 
Matrix4 m_matView
 current projection matrix
 

Detailed Description

ShadowVolume is a structure for storing shadow volume geometries.

Member Function Documentation

§ ReserveNewBlock()

void ShadowVolume::ReserveNewBlock ( Vector3 **  pVertices,
int  nSize 
)

we have enough space for the new block.

§ Reset()

void ParaEngine::ShadowVolume::Reset ( )
inline

current view matrix

reset the shadow volume to zero


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