|
My Project
|
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 |
| Vector3 * | m_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. | |
| LightParams * | m_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 | |
ShadowVolume is a structure for storing shadow volume geometries.
| void ShadowVolume::ReserveNewBlock | ( | Vector3 ** | pVertices, |
| int | nSize | ||
| ) |
we have enough space for the new block.
|
inline |
current view matrix
reset the shadow volume to zero
1.8.12