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

Go to the source code of this file.

Classes

struct  faceTangents_t
 
struct  tangentVert_t
 
struct  indexSort_t
 

Macros

#define USE_INVA
 
#define DERIVE_UNSMOOTHED_BITANGENT
 

Functions

void R_InitTriSurfData (void)
 
void R_ShutdownTriSurfData (void)
 
void R_PurgeTriSurfData (frameData_t *frame)
 
void R_ShowTriSurfMemory_f (const idCmdArgs &args)
 
int R_TriSurfMemory (const srfTriangles_t *tri)
 
void R_FreeStaticTriSurfVertexCaches (srfTriangles_t *tri)
 
void R_ReallyFreeStaticTriSurf (srfTriangles_t *tri)
 
void R_CheckStaticTriSurfMemory (const srfTriangles_t *tri)
 
void R_FreeDeferredTriSurfs (frameData_t *frame)
 
void R_FreeStaticTriSurf (srfTriangles_t *tri)
 
srfTriangles_tR_AllocStaticTriSurf (void)
 
srfTriangles_tR_CopyStaticTriSurf (const srfTriangles_t *tri)
 
void R_AllocStaticTriSurfVerts (srfTriangles_t *tri, int numVerts)
 
void R_AllocStaticTriSurfIndexes (srfTriangles_t *tri, int numIndexes)
 
void R_AllocStaticTriSurfShadowVerts (srfTriangles_t *tri, int numVerts)
 
void R_AllocStaticTriSurfPlanes (srfTriangles_t *tri, int numIndexes)
 
void R_ResizeStaticTriSurfVerts (srfTriangles_t *tri, int numVerts)
 
void R_ResizeStaticTriSurfIndexes (srfTriangles_t *tri, int numIndexes)
 
void R_ResizeStaticTriSurfShadowVerts (srfTriangles_t *tri, int numVerts)
 
void R_ReferenceStaticTriSurfVerts (srfTriangles_t *tri, const srfTriangles_t *reference)
 
void R_ReferenceStaticTriSurfIndexes (srfTriangles_t *tri, const srfTriangles_t *reference)
 
void R_FreeStaticTriSurfSilIndexes (srfTriangles_t *tri)
 
void R_RangeCheckIndexes (const srfTriangles_t *tri)
 
void R_BoundTriSurf (srfTriangles_t *tri)
 
void R_CreateSilIndexes (srfTriangles_t *tri)
 
void R_CreateDupVerts (srfTriangles_t *tri)
 
void R_DeriveFacePlanes (srfTriangles_t *tri)
 
void R_CreateVertexNormals (srfTriangles_t *tri)
 
void R_IdentifySilEdges (srfTriangles_t *tri, bool omitCoplanarEdges)
 
void R_DeriveTangentsWithoutNormals (srfTriangles_t *tri)
 
void R_BuildDominantTris (srfTriangles_t *tri)
 
void R_DeriveUnsmoothedTangents (srfTriangles_t *tri)
 
void R_DeriveTangents (srfTriangles_t *tri, bool allocFacePlanes)
 
void R_RemoveDuplicatedTriangles (srfTriangles_t *tri)
 
void R_RemoveDegenerateTriangles (srfTriangles_t *tri)
 
void R_TestDegenerateTextureSpace (srfTriangles_t *tri)
 
void R_RemoveUnusedVerts (srfTriangles_t *tri)
 
srfTriangles_tR_MergeSurfaceList (const srfTriangles_t **surfaces, int numSurfaces)
 
srfTriangles_tR_MergeTriangles (const srfTriangles_t *tri1, const srfTriangles_t *tri2)
 
void R_ReverseTriangles (srfTriangles_t *tri)
 
void R_CleanupTriangles (srfTriangles_t *tri, bool createNormals, bool identifySilEdges, bool useUnsmoothedTangents)
 
deformInfo_tR_BuildDeformInfo (int numVerts, const idDrawVert *verts, int numIndexes, const int *indexes, bool useUnsmoothedTangents)
 
void R_FreeDeformInfo (deformInfo_t *deformInfo)
 
int R_DeformInfoMemoryUsed (deformInfo_t *deformInfo)
 

Variables

const int MAX_SIL_EDGES = 0x10000
 
const int SILEDGE_HASH_SIZE = 1024
 
int c_coplanarSilEdges
 
int c_totalSilEdges
 

Macro Definition Documentation

#define DERIVE_UNSMOOTHED_BITANGENT

Definition at line 117 of file tr_trisurf.cpp.

#define USE_INVA

Definition at line 114 of file tr_trisurf.cpp.

Function Documentation

srfTriangles_t* R_AllocStaticTriSurf ( void  )

Definition at line 523 of file tr_trisurf.cpp.

void R_AllocStaticTriSurfIndexes ( srfTriangles_t tri,
int  numIndexes 
)

Definition at line 565 of file tr_trisurf.cpp.

void R_AllocStaticTriSurfPlanes ( srfTriangles_t tri,
int  numIndexes 
)

Definition at line 585 of file tr_trisurf.cpp.

void R_AllocStaticTriSurfShadowVerts ( srfTriangles_t tri,
int  numVerts 
)

Definition at line 575 of file tr_trisurf.cpp.

void R_AllocStaticTriSurfVerts ( srfTriangles_t tri,
int  numVerts 
)

Definition at line 555 of file tr_trisurf.cpp.

void R_BoundTriSurf ( srfTriangles_t tri)

Definition at line 704 of file tr_trisurf.cpp.

deformInfo_t* R_BuildDeformInfo ( int  numVerts,
const idDrawVert verts,
int  numIndexes,
const int indexes,
bool  useUnsmoothedTangents 
)

Definition at line 2147 of file tr_trisurf.cpp.

void R_BuildDominantTris ( srfTriangles_t tri)

Definition at line 1470 of file tr_trisurf.cpp.

void R_CheckStaticTriSurfMemory ( const srfTriangles_t tri)

Definition at line 432 of file tr_trisurf.cpp.

void R_CleanupTriangles ( srfTriangles_t tri,
bool  createNormals,
bool  identifySilEdges,
bool  useUnsmoothedTangents 
)

Definition at line 2096 of file tr_trisurf.cpp.

srfTriangles_t* R_CopyStaticTriSurf ( const srfTriangles_t tri)

Definition at line 536 of file tr_trisurf.cpp.

void R_CreateDupVerts ( srfTriangles_t tri)

Definition at line 790 of file tr_trisurf.cpp.

void R_CreateSilIndexes ( srfTriangles_t tri)

Definition at line 765 of file tr_trisurf.cpp.

void R_CreateVertexNormals ( srfTriangles_t tri)

Definition at line 891 of file tr_trisurf.cpp.

int R_DeformInfoMemoryUsed ( deformInfo_t deformInfo)

Definition at line 2249 of file tr_trisurf.cpp.

void R_DeriveFacePlanes ( srfTriangles_t tri)

Definition at line 827 of file tr_trisurf.cpp.

void R_DeriveTangents ( srfTriangles_t tri,
bool  allocFacePlanes 
)

Definition at line 1647 of file tr_trisurf.cpp.

void R_DeriveTangentsWithoutNormals ( srfTriangles_t tri)

Definition at line 1375 of file tr_trisurf.cpp.

void R_DeriveUnsmoothedTangents ( srfTriangles_t tri)

Definition at line 1578 of file tr_trisurf.cpp.

void R_FreeDeferredTriSurfs ( frameData_t frame)

Definition at line 466 of file tr_trisurf.cpp.

void R_FreeDeformInfo ( deformInfo_t deformInfo)

Definition at line 2222 of file tr_trisurf.cpp.

void R_FreeStaticTriSurf ( srfTriangles_t tri)

Definition at line 489 of file tr_trisurf.cpp.

void R_FreeStaticTriSurfSilIndexes ( srfTriangles_t tri)

Definition at line 654 of file tr_trisurf.cpp.

void R_FreeStaticTriSurfVertexCaches ( srfTriangles_t tri)

Definition at line 343 of file tr_trisurf.cpp.

void R_IdentifySilEdges ( srfTriangles_t tri,
bool  omitCoplanarEdges 
)

Definition at line 1003 of file tr_trisurf.cpp.

void R_InitTriSurfData ( void  )

Definition at line 157 of file tr_trisurf.cpp.

srfTriangles_t* R_MergeSurfaceList ( const srfTriangles_t **  surfaces,
int  numSurfaces 
)

Definition at line 2006 of file tr_trisurf.cpp.

srfTriangles_t* R_MergeTriangles ( const srfTriangles_t tri1,
const srfTriangles_t tri2 
)

Definition at line 2049 of file tr_trisurf.cpp.

void R_PurgeTriSurfData ( frameData_t frame)

Definition at line 208 of file tr_trisurf.cpp.

void R_RangeCheckIndexes ( const srfTriangles_t tri)

Definition at line 671 of file tr_trisurf.cpp.

void R_ReallyFreeStaticTriSurf ( srfTriangles_t tri)

Definition at line 374 of file tr_trisurf.cpp.

void R_ReferenceStaticTriSurfIndexes ( srfTriangles_t tri,
const srfTriangles_t reference 
)

Definition at line 645 of file tr_trisurf.cpp.

void R_ReferenceStaticTriSurfVerts ( srfTriangles_t tri,
const srfTriangles_t reference 
)

Definition at line 636 of file tr_trisurf.cpp.

void R_RemoveDegenerateTriangles ( srfTriangles_t tri)

Definition at line 1882 of file tr_trisurf.cpp.

void R_RemoveDuplicatedTriangles ( srfTriangles_t tri)

Definition at line 1842 of file tr_trisurf.cpp.

void R_RemoveUnusedVerts ( srfTriangles_t tri)

Definition at line 1942 of file tr_trisurf.cpp.

void R_ResizeStaticTriSurfIndexes ( srfTriangles_t tri,
int  numIndexes 
)

Definition at line 610 of file tr_trisurf.cpp.

void R_ResizeStaticTriSurfShadowVerts ( srfTriangles_t tri,
int  numVerts 
)

Definition at line 623 of file tr_trisurf.cpp.

void R_ResizeStaticTriSurfVerts ( srfTriangles_t tri,
int  numVerts 
)

Definition at line 597 of file tr_trisurf.cpp.

void R_ReverseTriangles ( srfTriangles_t tri)

Definition at line 2069 of file tr_trisurf.cpp.

void R_ShowTriSurfMemory_f ( const idCmdArgs args)

Definition at line 229 of file tr_trisurf.cpp.

void R_ShutdownTriSurfData ( void  )

Definition at line 188 of file tr_trisurf.cpp.

void R_TestDegenerateTextureSpace ( srfTriangles_t tri)

Definition at line 1916 of file tr_trisurf.cpp.

int R_TriSurfMemory ( const srfTriangles_t tri)

Definition at line 290 of file tr_trisurf.cpp.

Variable Documentation

int c_coplanarSilEdges

Definition at line 1000 of file tr_trisurf.cpp.

int c_totalSilEdges

Definition at line 1001 of file tr_trisurf.cpp.

const int MAX_SIL_EDGES = 0x10000

Definition at line 119 of file tr_trisurf.cpp.

const int SILEDGE_HASH_SIZE = 1024

Definition at line 120 of file tr_trisurf.cpp.