doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Macros | Functions | Variables
tr_stencilshadow.cpp File Reference
#include "../idlib/precompiled.h"
#include "tr_local.h"

Go to the source code of this file.

Classes

struct  indexRef_t
 
struct  clipTri_t
 

Macros

#define TRIANGLE_CULLED(p1, p2, p3)   ( pointCull[p1] & pointCull[p2] & pointCull[p3] & 0x3f )
 
#define TRIANGLE_CLIPPED(p1, p2, p3)   ( ( ( pointCull[p1] & pointCull[p2] & pointCull[p3] ) & 0xfc0 ) != 0xfc0 )
 
#define EDGE_CULLED(p1, p2)   ( ( pointCull[p1] ^ 0xfc0 ) & ( pointCull[p2] ^ 0xfc0 ) & 0xfc0 )
 
#define EDGE_CLIPPED(p1, p2)   ( ( pointCull[p1] & pointCull[p2] & 0xfc0 ) != 0xfc0 )
 
#define POINT_CULLED(p1)   ( ( pointCull[p1] & 0xfc0 ) != 0xfc0 )
 
#define LIGHT_CLIP_EPSILON   0.1f
 
#define MAX_CLIP_SIL_EDGES   2048
 
#define MAX_SHADOW_INDEXES   0x18000
 
#define MAX_SHADOW_VERTS   0x18000
 
#define MAX_CLIPPED_POINTS   20
 

Functions

void R_LightProjectionMatrix (const idVec3 &origin, const idPlane &rearPlane, idVec4 mat[4])
 
void R_MakeShadowFrustums (idRenderLightLocal *light)
 
srfTriangles_tR_CreateShadowVolume (const idRenderEntityLocal *ent, const srfTriangles_t *tri, const idRenderLightLocal *light, shadowGen_t optimize, srfCullInfo_t &cullInfo)
 

Variables

idPlane pointLightFrustums [6][6]
 
int c_caps
 
int c_sils
 

Macro Definition Documentation

#define EDGE_CLIPPED (   p1,
  p2 
)    ( ( pointCull[p1] & pointCull[p2] & 0xfc0 ) != 0xfc0 )

Definition at line 120 of file tr_stencilshadow.cpp.

#define EDGE_CULLED (   p1,
  p2 
)    ( ( pointCull[p1] ^ 0xfc0 ) & ( pointCull[p2] ^ 0xfc0 ) & 0xfc0 )

Definition at line 118 of file tr_stencilshadow.cpp.

#define LIGHT_CLIP_EPSILON   0.1f

Definition at line 127 of file tr_stencilshadow.cpp.

#define MAX_CLIP_SIL_EDGES   2048

Definition at line 129 of file tr_stencilshadow.cpp.

#define MAX_CLIPPED_POINTS   20

Definition at line 348 of file tr_stencilshadow.cpp.

#define MAX_SHADOW_INDEXES   0x18000

Definition at line 143 of file tr_stencilshadow.cpp.

#define MAX_SHADOW_VERTS   0x18000

Definition at line 144 of file tr_stencilshadow.cpp.

#define POINT_CULLED (   p1)    ( ( pointCull[p1] & 0xfc0 ) != 0xfc0 )

Definition at line 124 of file tr_stencilshadow.cpp.

#define TRIANGLE_CLIPPED (   p1,
  p2,
  p3 
)    ( ( ( pointCull[p1] & pointCull[p2] & pointCull[p3] ) & 0xfc0 ) != 0xfc0 )

Definition at line 115 of file tr_stencilshadow.cpp.

#define TRIANGLE_CULLED (   p1,
  p2,
  p3 
)    ( pointCull[p1] & pointCull[p2] & pointCull[p3] & 0x3f )

Definition at line 112 of file tr_stencilshadow.cpp.

Function Documentation

srfTriangles_t* R_CreateShadowVolume ( const idRenderEntityLocal ent,
const srfTriangles_t tri,
const idRenderLightLocal light,
shadowGen_t  optimize,
srfCullInfo_t cullInfo 
)

Definition at line 1217 of file tr_stencilshadow.cpp.

void R_LightProjectionMatrix ( const idVec3 origin,
const idPlane rearPlane,
idVec4  mat[4] 
)

Definition at line 257 of file tr_stencilshadow.cpp.

void R_MakeShadowFrustums ( idRenderLightLocal light)

Definition at line 1032 of file tr_stencilshadow.cpp.

Variable Documentation

int c_caps

Definition at line 204 of file tr_stencilshadow.cpp.

int c_sils

Definition at line 204 of file tr_stencilshadow.cpp.

idPlane pointLightFrustums[6][6]

Definition at line 151 of file tr_stencilshadow.cpp.