doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
dmap.h
Go to the documentation of this file.
1 /*
2 ===========================================================================
3 
4 Doom 3 GPL Source Code
5 Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
6 
7 This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
8 
9 Doom 3 Source Code is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13 
14 Doom 3 Source Code is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18 
19 You should have received a copy of the GNU General Public License
20 along with Doom 3 Source Code. If not, see <http://www.gnu.org/licenses/>.
21 
22 In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below.
23 
24 If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
25 
26 ===========================================================================
27 */
28 
29 #include "../../../renderer/tr_local.h"
30 
31 
32 typedef struct primitive_s {
33  struct primitive_s *next;
34 
35  // only one of these will be non-NULL
36  struct bspbrush_s * brush;
37  struct mapTri_s * tris;
38 } primitive_t;
39 
40 
41 typedef struct {
43  // we might want to add other fields later
44 } uArea_t;
45 
46 typedef struct {
47  idMapEntity * mapEntity; // points into mapFile_t data
48 
51  struct tree_s * tree;
52 
53  int numAreas;
55 } uEntity_t;
56 
57 
58 // chains of mapTri_t are the general unit of processing
59 typedef struct mapTri_s {
60  struct mapTri_s * next;
61 
63  void * mergeGroup; // we want to avoid merging triangles
64  // from different fixed groups, like guiSurfs and mirrors
65  int planeNum; // not set universally, just in some areas
66 
68  const struct hashVert_s *hashVert[3];
69  struct optVertex_s *optVert[3];
70 } mapTri_t;
71 
72 
73 typedef struct {
74  int width, height;
76 } mesh_t;
77 
78 
79 #define MAX_PATCH_SIZE 32
80 
81 #define PLANENUM_LEAF -1
82 
83 typedef struct parseMesh_s {
84  struct parseMesh_s *next;
87 } parseMesh_t;
88 
89 typedef struct bspface_s {
90  struct bspface_s * next;
91  int planenum;
92  bool portal; // all portals will be selected before
93  // any non-portals
94  bool checked; // used by SelectSplitPlaneNum()
96 } bspface_t;
97 
98 typedef struct {
99  idVec4 v[2]; // the offset value will always be in the 0.0 to 1.0 range
101 
102 typedef struct side_s {
103  int planenum;
104 
107 
108  idWinding * winding; // only clipped to the other sides of the brush
109  idWinding * visibleHull; // also clipped to the solid parts of the world
110 } side_t;
111 
112 
113 typedef struct bspbrush_s {
114  struct bspbrush_s * next;
115  struct bspbrush_s * original; // chopped up brushes will reference the originals
116 
117  int entitynum; // editor numbering for messages
118  int brushnum; // editor numbering for messages
119 
120  const idMaterial * contentShader; // one face's shader will determine the volume attributes
121 
122  int contents;
123  bool opaque;
124  int outputNumber; // set when the brush is written to the file list
125 
127  int numsides;
128  side_t sides[6]; // variably sized
129 } uBrush_t;
130 
131 
132 typedef struct drawSurfRef_s {
135 } drawSurfRef_t;
136 
137 
138 typedef struct node_s {
139  // both leafs and nodes
140  int planenum; // -1 = leaf node
141  struct node_s * parent;
142  idBounds bounds; // valid after portalization
143 
144  // nodes only
145  side_t * side; // the side that created the node
146  struct node_s * children[2];
147  int nodeNumber; // set after pruning
148 
149  // leafs only
150  bool opaque; // view can never be inside
151 
152  uBrush_t * brushlist; // fragments of all brushes in this leaf
153  // needed for FindSideForPortal
154 
155  int area; // determined by flood filling up to areaportals
156  int occupied; // 1 or greater can reach entity
157  uEntity_t * occupant; // for leak file testing
158 
159  struct uPortal_s * portals; // also on nodes during construction
160 } node_t;
161 
162 
163 typedef struct uPortal_s {
165  node_t *onnode; // NULL = outside box
166  node_t *nodes[2]; // [0] = front side of plane
167  struct uPortal_s *next[2];
169 } uPortal_t;
170 
171 // a tree_t is created by FaceBSP()
172 typedef struct tree_s {
176 } tree_t;
177 
178 #define MAX_QPATH 256 // max length of a game pathname
179 
180 typedef struct {
182  char name[MAX_QPATH]; // for naming the shadow volume surface and interactions
184 } mapLight_t;
185 
186 #define MAX_GROUP_LIGHTS 16
187 
188 typedef struct optimizeGroup_s {
190 
191  idBounds bounds; // set in CarveGroupsByLight
192 
193  // all of these must match to add a triangle to the triList
194  bool smoothed; // curves will never merge with brushes
195  int planeNum;
196  int areaNum;
199  mapLight_t * groupLights[MAX_GROUP_LIGHTS]; // lights effecting this list
200  void * mergeGroup; // if this differs (guiSurfs, mirrors, etc), the
201  // groups will not be combined into model surfaces
202  // after optimization
204 
206 
208  mapTri_t * regeneratedTris; // after each island optimization
209  idVec3 axis[2]; // orthogonal to the plane, so optimization can be 2D
211 
212 // all primitives from the map are added to optimzeGroups, creating new ones as needed
213 // each optimizeGroup is then split into the map areas, creating groups in each area
214 // each optimizeGroup is then divided by each light, creating more groups
215 // the final list of groups is then tjunction fixed against all groups, then optimized internally
216 // multiple optimizeGroups will be merged together into .proc surfaces, but no further optimization
217 // is done on them
218 
219 
220 //=============================================================================
221 
222 // dmap.cpp
223 
224 typedef enum {
225  SO_NONE, // 0
232 
233 typedef struct {
234  // mapFileBase will contain the qpath without any extension: "maps/test_box"
235  char mapFileBase[1024];
236 
238 
240 
243 
245 
247 
248  bool verbose;
249 
250  bool glview;
253  bool noCurves;
254  bool fullCarve;
256  bool noTJunc;
257  bool nomerge;
258  bool noFlood;
259  bool noClipSides; // don't cut sides by solid leafs, use the entire thing
260  bool noLightCarve; // extra triangle subdivision by light frustums
262  bool noShadow; // don't create optimized shadow volumes
263 
265  bool drawflag;
266 
269 } dmapGlobals_t;
270 
272 
273 int FindFloatPlane( const idPlane &plane, bool *fixedDegeneracies = NULL );
274 
275 
276 //=============================================================================
277 
278 // brush.cpp
279 
280 #ifndef CLIP_EPSILON
281 #define CLIP_EPSILON 0.1f
282 #endif
283 
284 #define PSIDE_FRONT 1
285 #define PSIDE_BACK 2
286 #define PSIDE_BOTH (PSIDE_FRONT|PSIDE_BACK)
287 #define PSIDE_FACING 4
288 
289 int CountBrushList (uBrush_t *brushes);
290 uBrush_t *AllocBrush (int numsides);
291 void FreeBrush (uBrush_t *brushes);
292 void FreeBrushList (uBrush_t *brushes);
293 uBrush_t *CopyBrush (uBrush_t *brush);
294 void DrawBrushList (uBrush_t *brush);
295 void PrintBrush (uBrush_t *brush);
296 bool BoundBrush (uBrush_t *brush);
297 bool CreateBrushWindings (uBrush_t *brush);
298 uBrush_t *BrushFromBounds( const idBounds &bounds );
299 float BrushVolume (uBrush_t *brush);
300 void WriteBspBrushMap( const char *name, uBrush_t *list );
301 
303 
304 void SplitBrush( uBrush_t *brush, int planenum, uBrush_t **front, uBrush_t **back);
305 node_t *AllocNode( void );
306 
307 
308 //=============================================================================
309 
310 // map.cpp
311 
312 bool LoadDMapFile( const char *filename );
313 void FreeOptimizeGroupList( optimizeGroup_t *groups );
314 void FreeDMapFile( void );
315 
316 //=============================================================================
317 
318 // draw.cpp -- draw debug views either directly, or through glserv.exe
319 
320 void Draw_ClearWindow( void );
321 void DrawWinding( const idWinding *w );
322 void DrawAuxWinding( const idWinding *w );
323 
324 void DrawLine( idVec3 v1, idVec3 v2, int color );
325 
326 void GLS_BeginScene( void );
327 void GLS_Winding( const idWinding *w, int code );
328 void GLS_Triangle( const mapTri_t *tri, int code );
329 void GLS_EndScene( void );
330 
331 
332 
333 //=============================================================================
334 
335 // portals.cpp
336 
337 #define MAX_INTER_AREA_PORTALS 1024
338 
339 typedef struct {
340  int area0, area1;
343 
345 extern int numInterAreaPortals;
346 
347 bool FloodEntities( tree_t *tree );
348 void FillOutside( uEntity_t *e );
349 void FloodAreas( uEntity_t *e );
350 void MakeTreePortals( tree_t *tree );
351 void FreePortal( uPortal_t *p );
352 
353 //=============================================================================
354 
355 // glfile.cpp -- write a debug file to be viewd with glview.exe
356 
357 void OutputWinding( idWinding *w, idFile *glview );
358 void WriteGLView( tree_t *tree, char *source );
359 
360 //=============================================================================
361 
362 // leakfile.cpp
363 
364 void LeakFile( tree_t *tree );
365 
366 //=============================================================================
367 
368 // facebsp.cpp
369 
370 tree_t *AllocTree( void );
371 
372 void FreeTree( tree_t *tree );
373 
374 void FreeTree_r( node_t *node );
375 void FreeTreePortals_r( node_t *node );
376 
377 
380 tree_t *FaceBSP( bspface_t *list );
381 
382 //=============================================================================
383 
384 // surface.cpp
385 
386 mapTri_t *CullTrisInOpaqueLeafs( mapTri_t *triList, tree_t *tree );
387 void ClipSidesByTree( uEntity_t *e );
388 void SplitTrisToSurfaces( mapTri_t *triList, tree_t *tree );
390 void Prelight( uEntity_t *e );
391 
392 //=============================================================================
393 
394 // tritjunction.cpp
395 
396 struct hashVert_s *GetHashVert( idVec3 &v );
397 void HashTriangles( optimizeGroup_t *groupList );
398 void FreeTJunctionHash( void );
399 int CountGroupListTris( const optimizeGroup_t *groupList );
400 void FixEntityTjunctions( uEntity_t *e );
401 void FixAreaGroupsTjunctions( optimizeGroup_t *groupList );
402 void FixGlobalTjunctions( uEntity_t *e );
403 
404 //=============================================================================
405 
406 // optimize.cpp -- trianlge mesh reoptimization
407 
408 // the shadow volume optimizer call internal optimizer routines, normal triangles
409 // will just be done by OptimizeEntity()
410 
411 
412 typedef struct optVertex_s {
414  idVec3 pv; // projected against planar axis, third value is 0
415  struct optEdge_s *edges;
418  bool emited; // when regenerating triangles
419 } optVertex_t;
420 
421 typedef struct optEdge_s {
425  bool created; // not one of the original edges
426  bool combined; // combined from two or more colinear edges
429 } optEdge_t;
430 
431 typedef struct optTri_s {
432  struct optTri_s *next;
435  bool filled;
436 } optTri_t;
437 
438 typedef struct {
443 } optIsland_t;
444 
445 
446 void OptimizeEntity( uEntity_t *e );
447 void OptimizeGroupList( optimizeGroup_t *groupList );
448 
449 //=============================================================================
450 
451 // tritools.cpp
452 
453 mapTri_t *AllocTri( void );
454 void FreeTri( mapTri_t *tri );
455 int CountTriList( const mapTri_t *list );
457 mapTri_t *CopyTriList( const mapTri_t *a );
458 void FreeTriList( mapTri_t *a );
459 mapTri_t *CopyMapTri( const mapTri_t *tri );
460 float MapTriArea( const mapTri_t *tri );
461 mapTri_t *RemoveBadTris( const mapTri_t *tri );
462 void BoundTriList( const mapTri_t *list, idBounds &b );
463 void DrawTri( const mapTri_t *tri );
464 void FlipTriList( mapTri_t *tris );
465 void TriVertsFromOriginal( mapTri_t *tri, const mapTri_t *original );
466 void PlaneForTri( const mapTri_t *tri, idPlane &plane );
467 idWinding *WindingForTri( const mapTri_t *tri );
468 mapTri_t *WindingToTriList( const idWinding *w, const mapTri_t *originalTri );
469 void ClipTriList( const mapTri_t *list, const idPlane &plane, float epsilon, mapTri_t **front, mapTri_t **back );
470 
471 //=============================================================================
472 
473 // output.cpp
474 
476 void WriteOutputFile( void );
477 
478 //=============================================================================
479 
480 // shadowopt.cpp
481 
482 srfTriangles_t *CreateLightShadow( optimizeGroup_t *shadowerGroups, const mapLight_t *light );
483 void FreeBeamTree( struct beamTree_s *beamTree );
484 
485 void CarveTriByBeamTree( const struct beamTree_s *beamTree, const mapTri_t *tri, mapTri_t **lit, mapTri_t **unLit );
void WriteBspBrushMap(const char *name, uBrush_t *list)
Definition: ubrush.cpp:351
void DrawWinding(const idWinding *w)
Definition: gldraw.cpp:276
textureVectors_t texVec
Definition: dmap.h:203
void PrintBrush(uBrush_t *brush)
Definition: ubrush.cpp:187
void FlipTriList(mapTri_t *tris)
Definition: tritools.cpp:223
byte color[4]
Definition: MegaTexture.cpp:54
void MakeTreePortals(tree_t *tree)
Definition: portals.cpp:498
int numInterAreaPortals
Definition: portals.cpp:36
side_t * side
Definition: dmap.h:341
int numGroupLights
Definition: dmap.h:198
void FixGlobalTjunctions(uEntity_t *e)
struct primitive_s primitive_t
node_t * headnode
Definition: dmap.h:173
int areaNum
Definition: dmap.h:196
bool smoothed
Definition: dmap.h:194
#define MAX_QPATH
Definition: dmap.h:178
struct mapTri_s * tris
Definition: dmap.h:37
struct optEdge_s * edges
Definition: dmap.h:415
bool BoundBrush(uBrush_t *brush)
Definition: ubrush.cpp:206
int contents
Definition: dmap.h:122
struct hashVert_s * GetHashVert(idVec3 &v)
void FreeDMapFile(void)
Definition: map.cpp:599
struct mapTri_s * next
Definition: dmap.h:60
mapTri_t * CopyMapTri(const mapTri_t *tri)
Definition: tritools.cpp:143
void CarveTriByBeamTree(const struct beamTree_s *beamTree, const mapTri_t *tri, mapTri_t **lit, mapTri_t **unLit)
bool LoadDMapFile(const char *filename)
Definition: map.cpp:513
tree_t * AllocTree(void)
Definition: ubrush.cpp:471
idWinding * winding
Definition: dmap.h:108
node_t * nodes[2]
Definition: dmap.h:166
const GLdouble * v
Definition: glext.h:2936
int width
Definition: dmap.h:74
void DrawLine(idVec3 v1, idVec3 v2, int color)
struct optTri_s optTri_t
bool emited
Definition: dmap.h:418
idBounds bounds
Definition: dmap.h:175
int occupied
Definition: dmap.h:156
void PutPrimitivesInAreas(uEntity_t *e)
Definition: usurface.cpp:589
primitive_t * primitives
Definition: dmap.h:50
bool noOptimize
Definition: dmap.h:251
mapTri_t * RemoveBadTris(const mapTri_t *tri)
Definition: tritools.cpp:168
void * mergeGroup
Definition: dmap.h:63
bool filled
Definition: dmap.h:435
idList< mapLight_t * > mapLights
Definition: dmap.h:246
uBrush_t * BrushFromBounds(const idBounds &bounds)
Definition: ubrush.cpp:273
void FreeTree_r(node_t *node)
Definition: facebsp.cpp:93
Definition: dmap.h:172
node_t * onnode
Definition: dmap.h:165
int planenum
Definition: dmap.h:103
idWinding * WindingForTri(const mapTri_t *tri)
Definition: tritools.cpp:250
int FindFloatPlane(const idPlane &plane, bool *fixedDegeneracies=NULL)
Definition: map.cpp:75
tree_t * FaceBSP(bspface_t *list)
Definition: facebsp.cpp:375
void DrawAuxWinding(const idWinding *w)
Definition: gldraw.cpp:279
bool noClipSides
Definition: dmap.h:259
optVertex_t * v1
Definition: dmap.h:422
struct optVertex_s * islandLink
Definition: dmap.h:416
Definition: Vector.h:316
const struct hashVert_s * hashVert[3]
Definition: dmap.h:68
struct uPortal_s * next[2]
Definition: dmap.h:167
void FreeTri(mapTri_t *tri)
Definition: tritools.cpp:58
float BrushVolume(uBrush_t *brush)
Definition: ubrush.cpp:302
bool fullCarve
Definition: dmap.h:254
struct bspface_s * next
Definition: dmap.h:90
mapTri_t * WindingToTriList(const idWinding *w, const mapTri_t *originalTri)
Definition: tritools.cpp:310
uArea_t * areas
Definition: dmap.h:54
#define MAX_INTER_AREA_PORTALS
Definition: dmap.h:337
shadowOptLevel_t shadowOptLevel
Definition: dmap.h:261
uEntity_t * occupant
Definition: dmap.h:157
bool verbose
Definition: dmap.h:248
idRenderLightLocal def
Definition: dmap.h:181
bool addedToIsland
Definition: dmap.h:417
void Prelight(uEntity_t *e)
Definition: usurface.cpp:996
bool surfaceEmited
Definition: dmap.h:205
idMapFile * dmapFile
Definition: dmap.h:237
mapLight_t * groupLights[MAX_GROUP_LIGHTS]
Definition: dmap.h:199
int entitynum
Definition: dmap.h:117
bool created
Definition: dmap.h:425
struct mapTri_s mapTri_t
srfTriangles_t * shadowTris
Definition: dmap.h:183
mapTri_t * MergeTriLists(mapTri_t *a, mapTri_t *b)
Definition: tritools.cpp:70
struct optTri_s * backTri
Definition: dmap.h:427
void FixEntityTjunctions(uEntity_t *e)
bool glview
Definition: dmap.h:250
int planenum
Definition: dmap.h:140
struct node_s node_t
int planeNum
Definition: dmap.h:65
void GLS_Triangle(const mapTri_t *tri, int code)
idPlaneSet mapPlanes
Definition: dmap.h:239
void GLS_BeginScene(void)
Definition: gldraw.cpp:285
int planenum
Definition: dmap.h:91
idVec3 origin
Definition: dmap.h:49
int totalShadowVerts
Definition: dmap.h:268
void FreeTriList(mapTri_t *a)
Definition: tritools.cpp:89
idBounds bounds
Definition: dmap.h:191
void Draw_ClearWindow(void)
Definition: gldraw.cpp:273
side_t * side
Definition: dmap.h:145
void SplitBrush(uBrush_t *brush, int planenum, uBrush_t **front, uBrush_t **back)
Definition: ubrush.cpp:543
idVec3 pv
Definition: dmap.h:414
void OptimizeGroupList(optimizeGroup_t *groupList)
Definition: optimize.cpp:1947
idVec3 midpoint
Definition: dmap.h:433
shadowOptLevel_t
Definition: dmap.h:224
void FreeTree(tree_t *tree)
Definition: facebsp.cpp:116
struct optimizeGroup_s * groups
Definition: dmap.h:42
bspface_t * MakeVisibleBspFaceList(primitive_t *list)
Definition: facebsp.cpp:464
struct optTri_s * frontTri
Definition: dmap.h:427
Definition: File.h:50
const idMaterial * material
Definition: dmap.h:105
GLsizei GLsizei GLcharARB * source
Definition: glext.h:3633
float MapTriArea(const mapTri_t *tri)
Definition: tritools.cpp:157
struct optVertex_s optVertex_t
GLfloat GLfloat GLfloat v2
Definition: glext.h:3608
struct drawSurfRef_s drawSurfRef_t
bool noCurves
Definition: dmap.h:253
struct uPortal_s uPortal_t
struct bspbrush_s uBrush_t
Definition: dmap.h:89
idVec3 axis[2]
Definition: dmap.h:209
void TriVertsFromOriginal(mapTri_t *tri, const mapTri_t *original)
Definition: tritools.cpp:269
mapTri_t * CullTrisInOpaqueLeafs(mapTri_t *triList, tree_t *tree)
void ClipTriList(const mapTri_t *list, const idPlane &plane, float epsilon, mapTri_t **front, mapTri_t **back)
Definition: tritools.cpp:356
void FloodAreas(uEntity_t *e)
Definition: portals.cpp:924
struct node_s * children[2]
Definition: dmap.h:146
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:3454
Definition: Vector.h:808
uBrush_t * CopyBrush(uBrush_t *brush)
Definition: ubrush.cpp:136
bool noFlood
Definition: dmap.h:258
mapTri_t * regeneratedTris
Definition: dmap.h:208
void FreeTreePortals_r(node_t *node)
Definition: facebsp.cpp:64
mapTri_t * CopyTriList(const mapTri_t *a)
Definition: tritools.cpp:103
idWinding * visibleHull
Definition: dmap.h:109
struct tree_s tree_t
#define NULL
Definition: Lib.h:88
struct uPortal_s * portals
Definition: dmap.h:159
struct bspface_s bspface_t
void FreeBrush(uBrush_t *brushes)
Definition: ubrush.cpp:95
void FreeOptimizeGroupList(optimizeGroup_t *groups)
Definition: map.cpp:584
void GLS_Winding(const idWinding *w, int code)
Definition: gldraw.cpp:282
bspface_t * MakeStructuralBspFaceList(primitive_t *list)
Definition: facebsp.cpp:420
void PlaneForTri(const mapTri_t *tri, idPlane &plane)
Definition: tritools.cpp:385
Definition: dmap.h:41
bool drawflag
Definition: dmap.h:265
Definition: Plane.h:71
mesh_t mesh
Definition: dmap.h:85
side_t sides[6]
Definition: dmap.h:128
void HashTriangles(optimizeGroup_t *groupList)
struct optEdge_s * v1link
Definition: dmap.h:428
struct optVertex_s * optVert[3]
Definition: dmap.h:69
int totalShadowTriangles
Definition: dmap.h:267
int planeNum
Definition: dmap.h:195
void FixAreaGroupsTjunctions(optimizeGroup_t *groupList)
bool CreateBrushWindings(uBrush_t *brush)
Definition: ubrush.cpp:237
bool portal
Definition: dmap.h:92
void SplitTrisToSurfaces(mapTri_t *triList, tree_t *tree)
idWinding * winding
Definition: dmap.h:168
srfTriangles_t * ShareMapTriVerts(const mapTri_t *tris)
Definition: output.cpp:191
uBrush_t * brushlist
Definition: dmap.h:152
idBounds drawBounds
Definition: dmap.h:264
Definition: dmap.h:102
idBounds bounds
Definition: dmap.h:142
GLubyte GLubyte GLubyte a
Definition: glext.h:4662
bool opaque
Definition: dmap.h:150
mapTri_t * AllocTri(void)
Definition: tritools.cpp:45
bool checked
Definition: dmap.h:94
const idMaterial * material
Definition: dmap.h:86
struct bspbrush_s * next
Definition: dmap.h:114
void * mergeGroup
Definition: dmap.h:200
int numsides
Definition: dmap.h:127
bool noLightCarve
Definition: dmap.h:260
GLfloat GLfloat v1
Definition: glext.h:3607
GLenum GLsizei GLsizei height
Definition: glext.h:2856
bool noModelBrushes
Definition: dmap.h:255
int entityNum
Definition: dmap.h:244
idBounds bounds
Definition: dmap.h:126
GLubyte GLubyte b
Definition: glext.h:4662
uEntity_t * uEntities
Definition: dmap.h:242
struct parseMesh_s parseMesh_t
int CountBrushList(uBrush_t *brushes)
Definition: ubrush.cpp:51
idWinding * w
Definition: dmap.h:95
struct optimizeGroup_s optimizeGroup_t
Definition: dmap.h:431
srfTriangles_t * CreateLightShadow(optimizeGroup_t *shadowerGroups, const mapLight_t *light)
bool verboseentities
Definition: dmap.h:252
struct primitive_s * next
Definition: dmap.h:33
struct tree_s * tree
Definition: dmap.h:51
int CountGroupListTris(const optimizeGroup_t *groupList)
Definition: dmap.h:59
uBrush_t * AllocBrush(int numsides)
Definition: ubrush.cpp:77
#define MAX_GROUP_LIGHTS
Definition: dmap.h:186
struct optEdge_s * islandLink
Definition: dmap.h:423
struct bspbrush_s * original
Definition: dmap.h:115
void BoundTriList(const mapTri_t *list, idBounds &b)
Definition: tritools.cpp:191
void FreeBrushList(uBrush_t *brushes)
Definition: ubrush.cpp:117
int nodeNumber
Definition: dmap.h:147
struct node_s * parent
Definition: dmap.h:141
const idMaterial * contentShader
Definition: dmap.h:120
void FreeTJunctionHash(void)
void FreeBeamTree(struct beamTree_s *beamTree)
const idMaterial * material
Definition: dmap.h:62
Definition: dmap.h:46
int num_entities
Definition: dmap.h:241
node_t * AllocNode(void)
Definition: ubrush.cpp:487
void FreePortal(uPortal_t *p)
Definition: portals.cpp:62
const GLcharARB * name
Definition: glext.h:3629
optimizeGroup_t * group
Definition: dmap.h:439
optVertex_t * verts
Definition: dmap.h:440
mapTri_t * triList
Definition: dmap.h:207
Definition: dmap.h:225
Definition: dmap.h:73
interAreaPortal_t interAreaPortals[MAX_INTER_AREA_PORTALS]
Definition: portals.cpp:35
int CountTriList(const mapTri_t *list)
Definition: tritools.cpp:125
bool FloodEntities(tree_t *tree)
Definition: portals.cpp:580
optTri_t * tris
Definition: dmap.h:442
void WriteGLView(tree_t *tree, char *source)
Definition: glfile.cpp:142
bool addedToIsland
Definition: dmap.h:424
bool opaque
Definition: dmap.h:123
struct optimizeGroup_s * nextGroup
Definition: dmap.h:189
idDrawVert v
Definition: dmap.h:413
const idMaterial * material
Definition: dmap.h:197
void LeakFile(tree_t *tree)
Definition: leakfile.cpp:53
void WriteOutputFile(void)
Definition: output.cpp:636
int brushnum
Definition: dmap.h:118
void ClipSidesByTree(uEntity_t *e)
Definition: usurface.cpp:324
Definition: dmap.h:138
void OutputWinding(idWinding *w, idFile *glview)
Definition: glfile.cpp:57
void FilterBrushesIntoTree(uEntity_t *e)
Definition: ubrush.cpp:439
bool nomerge
Definition: dmap.h:257
struct bspbrush_s * brush
Definition: dmap.h:36
struct parseMesh_s * next
Definition: dmap.h:84
struct optEdge_s optEdge_t
struct optTri_s * next
Definition: dmap.h:432
struct drawSurfRef_s * nextRef
Definition: dmap.h:133
void GLS_EndScene(void)
Definition: gldraw.cpp:288
bool combined
Definition: dmap.h:426
int area
Definition: dmap.h:155
int outputNumber
Definition: dmap.h:124
textureVectors_t texVec
Definition: dmap.h:106
void OptimizeEntity(uEntity_t *e)
Definition: optimize.cpp:1983
GLfloat GLfloat p
Definition: glext.h:4674
void FillOutside(uEntity_t *e)
Definition: portals.cpp:990
int outputNumber
Definition: dmap.h:134
bool noTJunc
Definition: dmap.h:256
void DrawBrushList(uBrush_t *brush)
Definition: ubrush.cpp:162
struct side_s side_t
idMapEntity * mapEntity
Definition: dmap.h:47
optVertex_t * v2
Definition: dmap.h:422
optEdge_t * edges
Definition: dmap.h:441
void DrawTri(const mapTri_t *tri)
Definition: tritools.cpp:205
dmapGlobals_t dmapGlobals
Definition: dmap.cpp:34
bool noShadow
Definition: dmap.h:262
struct optEdge_s * v2link
Definition: dmap.h:428
idDrawVert * verts
Definition: dmap.h:75
idPlane plane
Definition: dmap.h:164
int numAreas
Definition: dmap.h:53
node_t outside_node
Definition: dmap.h:174