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

Go to the source code of this file.

Classes

struct  primitive_s
 
struct  uArea_t
 
struct  uEntity_t
 
struct  mapTri_s
 
struct  mesh_t
 
struct  parseMesh_s
 
struct  bspface_s
 
struct  textureVectors_t
 
struct  side_s
 
struct  bspbrush_s
 
struct  drawSurfRef_s
 
struct  node_s
 
struct  uPortal_s
 
struct  tree_s
 
struct  mapLight_t
 
struct  optimizeGroup_s
 
struct  dmapGlobals_t
 
struct  interAreaPortal_t
 
struct  optVertex_s
 
struct  optEdge_s
 
struct  optTri_s
 
struct  optIsland_t
 

Macros

#define MAX_PATCH_SIZE   32
 
#define PLANENUM_LEAF   -1
 
#define MAX_QPATH   256
 
#define MAX_GROUP_LIGHTS   16
 
#define CLIP_EPSILON   0.1f
 
#define PSIDE_FRONT   1
 
#define PSIDE_BACK   2
 
#define PSIDE_BOTH   (PSIDE_FRONT|PSIDE_BACK)
 
#define PSIDE_FACING   4
 
#define MAX_INTER_AREA_PORTALS   1024
 

Typedefs

typedef struct primitive_s primitive_t
 
typedef struct mapTri_s mapTri_t
 
typedef struct parseMesh_s parseMesh_t
 
typedef struct bspface_s bspface_t
 
typedef struct side_s side_t
 
typedef struct bspbrush_s uBrush_t
 
typedef struct drawSurfRef_s drawSurfRef_t
 
typedef struct node_s node_t
 
typedef struct uPortal_s uPortal_t
 
typedef struct tree_s tree_t
 
typedef struct optimizeGroup_s optimizeGroup_t
 
typedef struct optVertex_s optVertex_t
 
typedef struct optEdge_s optEdge_t
 
typedef struct optTri_s optTri_t
 

Enumerations

enum  shadowOptLevel_t {
  SO_NONE, SO_MERGE_SURFACES, SO_CULL_OCCLUDED, SO_CLIP_OCCLUDERS,
  SO_CLIP_SILS, SO_SIL_OPTIMIZE
}
 

Functions

int FindFloatPlane (const idPlane &plane, bool *fixedDegeneracies=NULL)
 
int CountBrushList (uBrush_t *brushes)
 
uBrush_tAllocBrush (int numsides)
 
void FreeBrush (uBrush_t *brushes)
 
void FreeBrushList (uBrush_t *brushes)
 
uBrush_tCopyBrush (uBrush_t *brush)
 
void DrawBrushList (uBrush_t *brush)
 
void PrintBrush (uBrush_t *brush)
 
bool BoundBrush (uBrush_t *brush)
 
bool CreateBrushWindings (uBrush_t *brush)
 
uBrush_tBrushFromBounds (const idBounds &bounds)
 
float BrushVolume (uBrush_t *brush)
 
void WriteBspBrushMap (const char *name, uBrush_t *list)
 
void FilterBrushesIntoTree (uEntity_t *e)
 
void SplitBrush (uBrush_t *brush, int planenum, uBrush_t **front, uBrush_t **back)
 
node_tAllocNode (void)
 
bool LoadDMapFile (const char *filename)
 
void FreeOptimizeGroupList (optimizeGroup_t *groups)
 
void FreeDMapFile (void)
 
void Draw_ClearWindow (void)
 
void DrawWinding (const idWinding *w)
 
void DrawAuxWinding (const idWinding *w)
 
void DrawLine (idVec3 v1, idVec3 v2, int color)
 
void GLS_BeginScene (void)
 
void GLS_Winding (const idWinding *w, int code)
 
void GLS_Triangle (const mapTri_t *tri, int code)
 
void GLS_EndScene (void)
 
bool FloodEntities (tree_t *tree)
 
void FillOutside (uEntity_t *e)
 
void FloodAreas (uEntity_t *e)
 
void MakeTreePortals (tree_t *tree)
 
void FreePortal (uPortal_t *p)
 
void OutputWinding (idWinding *w, idFile *glview)
 
void WriteGLView (tree_t *tree, char *source)
 
void LeakFile (tree_t *tree)
 
tree_tAllocTree (void)
 
void FreeTree (tree_t *tree)
 
void FreeTree_r (node_t *node)
 
void FreeTreePortals_r (node_t *node)
 
bspface_tMakeStructuralBspFaceList (primitive_t *list)
 
bspface_tMakeVisibleBspFaceList (primitive_t *list)
 
tree_tFaceBSP (bspface_t *list)
 
mapTri_tCullTrisInOpaqueLeafs (mapTri_t *triList, tree_t *tree)
 
void ClipSidesByTree (uEntity_t *e)
 
void SplitTrisToSurfaces (mapTri_t *triList, tree_t *tree)
 
void PutPrimitivesInAreas (uEntity_t *e)
 
void Prelight (uEntity_t *e)
 
struct hashVert_sGetHashVert (idVec3 &v)
 
void HashTriangles (optimizeGroup_t *groupList)
 
void FreeTJunctionHash (void)
 
int CountGroupListTris (const optimizeGroup_t *groupList)
 
void FixEntityTjunctions (uEntity_t *e)
 
void FixAreaGroupsTjunctions (optimizeGroup_t *groupList)
 
void FixGlobalTjunctions (uEntity_t *e)
 
void OptimizeEntity (uEntity_t *e)
 
void OptimizeGroupList (optimizeGroup_t *groupList)
 
mapTri_tAllocTri (void)
 
void FreeTri (mapTri_t *tri)
 
int CountTriList (const mapTri_t *list)
 
mapTri_tMergeTriLists (mapTri_t *a, mapTri_t *b)
 
mapTri_tCopyTriList (const mapTri_t *a)
 
void FreeTriList (mapTri_t *a)
 
mapTri_tCopyMapTri (const mapTri_t *tri)
 
float MapTriArea (const mapTri_t *tri)
 
mapTri_tRemoveBadTris (const mapTri_t *tri)
 
void BoundTriList (const mapTri_t *list, idBounds &b)
 
void DrawTri (const mapTri_t *tri)
 
void FlipTriList (mapTri_t *tris)
 
void TriVertsFromOriginal (mapTri_t *tri, const mapTri_t *original)
 
void PlaneForTri (const mapTri_t *tri, idPlane &plane)
 
idWindingWindingForTri (const mapTri_t *tri)
 
mapTri_tWindingToTriList (const idWinding *w, const mapTri_t *originalTri)
 
void ClipTriList (const mapTri_t *list, const idPlane &plane, float epsilon, mapTri_t **front, mapTri_t **back)
 
srfTriangles_tShareMapTriVerts (const mapTri_t *tris)
 
void WriteOutputFile (void)
 
srfTriangles_tCreateLightShadow (optimizeGroup_t *shadowerGroups, const mapLight_t *light)
 
void FreeBeamTree (struct beamTree_s *beamTree)
 
void CarveTriByBeamTree (const struct beamTree_s *beamTree, const mapTri_t *tri, mapTri_t **lit, mapTri_t **unLit)
 

Variables

dmapGlobals_t dmapGlobals
 
interAreaPortal_t interAreaPortals [MAX_INTER_AREA_PORTALS]
 
int numInterAreaPortals
 

Macro Definition Documentation

#define CLIP_EPSILON   0.1f

Definition at line 281 of file dmap.h.

#define MAX_GROUP_LIGHTS   16

Definition at line 186 of file dmap.h.

#define MAX_INTER_AREA_PORTALS   1024

Definition at line 337 of file dmap.h.

#define MAX_PATCH_SIZE   32

Definition at line 79 of file dmap.h.

#define MAX_QPATH   256

Definition at line 178 of file dmap.h.

#define PLANENUM_LEAF   -1

Definition at line 81 of file dmap.h.

#define PSIDE_BACK   2

Definition at line 285 of file dmap.h.

#define PSIDE_BOTH   (PSIDE_FRONT|PSIDE_BACK)

Definition at line 286 of file dmap.h.

#define PSIDE_FACING   4

Definition at line 287 of file dmap.h.

#define PSIDE_FRONT   1

Definition at line 284 of file dmap.h.

Typedef Documentation

typedef struct bspface_s bspface_t
typedef struct drawSurfRef_s drawSurfRef_t
typedef struct mapTri_s mapTri_t
typedef struct node_s node_t
typedef struct optEdge_s optEdge_t
typedef struct optTri_s optTri_t
typedef struct optVertex_s optVertex_t
typedef struct parseMesh_s parseMesh_t
typedef struct primitive_s primitive_t
typedef struct side_s side_t
typedef struct tree_s tree_t
typedef struct bspbrush_s uBrush_t
typedef struct uPortal_s uPortal_t

Enumeration Type Documentation

Enumerator
SO_NONE 
SO_MERGE_SURFACES 
SO_CULL_OCCLUDED 
SO_CLIP_OCCLUDERS 
SO_CLIP_SILS 
SO_SIL_OPTIMIZE 

Definition at line 224 of file dmap.h.

Function Documentation

uBrush_t* AllocBrush ( int  numsides)

Definition at line 77 of file ubrush.cpp.

node_t* AllocNode ( void  )

Definition at line 487 of file ubrush.cpp.

tree_t* AllocTree ( void  )

Definition at line 471 of file ubrush.cpp.

mapTri_t* AllocTri ( void  )

Definition at line 45 of file tritools.cpp.

bool BoundBrush ( uBrush_t brush)

Definition at line 206 of file ubrush.cpp.

void BoundTriList ( const mapTri_t list,
idBounds b 
)

Definition at line 191 of file tritools.cpp.

uBrush_t* BrushFromBounds ( const idBounds bounds)

Definition at line 273 of file ubrush.cpp.

float BrushVolume ( uBrush_t brush)

Definition at line 302 of file ubrush.cpp.

void CarveTriByBeamTree ( const struct beamTree_s *  beamTree,
const mapTri_t tri,
mapTri_t **  lit,
mapTri_t **  unLit 
)
void ClipSidesByTree ( uEntity_t e)

Definition at line 324 of file usurface.cpp.

void ClipTriList ( const mapTri_t list,
const idPlane plane,
float  epsilon,
mapTri_t **  front,
mapTri_t **  back 
)

Definition at line 356 of file tritools.cpp.

uBrush_t* CopyBrush ( uBrush_t brush)

Definition at line 136 of file ubrush.cpp.

mapTri_t* CopyMapTri ( const mapTri_t tri)

Definition at line 143 of file tritools.cpp.

mapTri_t* CopyTriList ( const mapTri_t a)

Definition at line 103 of file tritools.cpp.

int CountBrushList ( uBrush_t brushes)

Definition at line 51 of file ubrush.cpp.

int CountGroupListTris ( const optimizeGroup_t groupList)

Definition at line 450 of file tritjunction.cpp.

int CountTriList ( const mapTri_t list)

Definition at line 125 of file tritools.cpp.

bool CreateBrushWindings ( uBrush_t brush)

Definition at line 237 of file ubrush.cpp.

srfTriangles_t* CreateLightShadow ( optimizeGroup_t shadowerGroups,
const mapLight_t light 
)

Definition at line 1220 of file shadowopt3.cpp.

mapTri_t* CullTrisInOpaqueLeafs ( mapTri_t triList,
tree_t tree 
)
void Draw_ClearWindow ( void  )

Definition at line 273 of file gldraw.cpp.

void DrawAuxWinding ( const idWinding w)

Definition at line 279 of file gldraw.cpp.

void DrawBrushList ( uBrush_t brush)

Definition at line 162 of file ubrush.cpp.

void DrawLine ( idVec3  v1,
idVec3  v2,
int  color 
)
void DrawTri ( const mapTri_t tri)

Definition at line 205 of file tritools.cpp.

void DrawWinding ( const idWinding w)

Definition at line 276 of file gldraw.cpp.

tree_t* FaceBSP ( bspface_t list)

Definition at line 375 of file facebsp.cpp.

void FillOutside ( uEntity_t e)

Definition at line 990 of file portals.cpp.

void FilterBrushesIntoTree ( uEntity_t e)

Definition at line 439 of file ubrush.cpp.

int FindFloatPlane ( const idPlane plane,
bool fixedDegeneracies = NULL 
)

Definition at line 75 of file map.cpp.

void FixAreaGroupsTjunctions ( optimizeGroup_t groupList)

Definition at line 466 of file tritjunction.cpp.

void FixEntityTjunctions ( uEntity_t e)

Definition at line 517 of file tritjunction.cpp.

void FixGlobalTjunctions ( uEntity_t e)

Definition at line 531 of file tritjunction.cpp.

void FlipTriList ( mapTri_t tris)

Definition at line 223 of file tritools.cpp.

void FloodAreas ( uEntity_t e)

Definition at line 924 of file portals.cpp.

bool FloodEntities ( tree_t tree)

Definition at line 580 of file portals.cpp.

void FreeBeamTree ( struct beamTree_s *  beamTree)
void FreeBrush ( uBrush_t brushes)

Definition at line 95 of file ubrush.cpp.

void FreeBrushList ( uBrush_t brushes)

Definition at line 117 of file ubrush.cpp.

void FreeDMapFile ( void  )

Definition at line 599 of file map.cpp.

void FreeOptimizeGroupList ( optimizeGroup_t groups)

Definition at line 584 of file map.cpp.

void FreePortal ( uPortal_t p)

Definition at line 62 of file portals.cpp.

void FreeTJunctionHash ( void  )

Definition at line 273 of file tritjunction.cpp.

void FreeTree ( tree_t tree)

Definition at line 116 of file facebsp.cpp.

void FreeTree_r ( node_t node)

Definition at line 93 of file facebsp.cpp.

void FreeTreePortals_r ( node_t node)

Definition at line 64 of file facebsp.cpp.

void FreeTri ( mapTri_t tri)

Definition at line 58 of file tritools.cpp.

void FreeTriList ( mapTri_t a)

Definition at line 89 of file tritools.cpp.

struct hashVert_s* GetHashVert ( idVec3 v)

Definition at line 109 of file tritjunction.cpp.

void GLS_BeginScene ( void  )

Definition at line 285 of file gldraw.cpp.

void GLS_EndScene ( void  )

Definition at line 288 of file gldraw.cpp.

void GLS_Triangle ( const mapTri_t tri,
int  code 
)
void GLS_Winding ( const idWinding w,
int  code 
)

Definition at line 282 of file gldraw.cpp.

void HashTriangles ( optimizeGroup_t groupList)

Definition at line 216 of file tritjunction.cpp.

void LeakFile ( tree_t tree)

Definition at line 53 of file leakfile.cpp.

bool LoadDMapFile ( const char *  filename)

Definition at line 513 of file map.cpp.

bspface_t* MakeStructuralBspFaceList ( primitive_t list)

Definition at line 420 of file facebsp.cpp.

void MakeTreePortals ( tree_t tree)

Definition at line 498 of file portals.cpp.

bspface_t* MakeVisibleBspFaceList ( primitive_t list)

Definition at line 464 of file facebsp.cpp.

float MapTriArea ( const mapTri_t tri)

Definition at line 157 of file tritools.cpp.

mapTri_t* MergeTriLists ( mapTri_t a,
mapTri_t b 
)

Definition at line 70 of file tritools.cpp.

void OptimizeEntity ( uEntity_t e)

Definition at line 1983 of file optimize.cpp.

void OptimizeGroupList ( optimizeGroup_t groupList)

Definition at line 1947 of file optimize.cpp.

void OutputWinding ( idWinding w,
idFile glview 
)

Definition at line 57 of file glfile.cpp.

void PlaneForTri ( const mapTri_t tri,
idPlane plane 
)

Definition at line 385 of file tritools.cpp.

void Prelight ( uEntity_t e)

Definition at line 996 of file usurface.cpp.

void PrintBrush ( uBrush_t brush)

Definition at line 187 of file ubrush.cpp.

void PutPrimitivesInAreas ( uEntity_t e)

Definition at line 589 of file usurface.cpp.

mapTri_t* RemoveBadTris ( const mapTri_t tri)

Definition at line 168 of file tritools.cpp.

srfTriangles_t* ShareMapTriVerts ( const mapTri_t tris)

Definition at line 191 of file output.cpp.

void SplitBrush ( uBrush_t brush,
int  planenum,
uBrush_t **  front,
uBrush_t **  back 
)

Definition at line 543 of file ubrush.cpp.

void SplitTrisToSurfaces ( mapTri_t triList,
tree_t tree 
)
void TriVertsFromOriginal ( mapTri_t tri,
const mapTri_t original 
)

Definition at line 269 of file tritools.cpp.

idWinding* WindingForTri ( const mapTri_t tri)

Definition at line 250 of file tritools.cpp.

mapTri_t* WindingToTriList ( const idWinding w,
const mapTri_t originalTri 
)

Definition at line 310 of file tritools.cpp.

void WriteBspBrushMap ( const char *  name,
uBrush_t list 
)

Definition at line 351 of file ubrush.cpp.

void WriteGLView ( tree_t tree,
char *  source 
)

Definition at line 142 of file glfile.cpp.

void WriteOutputFile ( void  )

Definition at line 636 of file output.cpp.

Variable Documentation

dmapGlobals_t dmapGlobals

Definition at line 34 of file dmap.cpp.

Definition at line 35 of file portals.cpp.

int numInterAreaPortals

Definition at line 36 of file portals.cpp.