UFO: Alien Invasion
Doxygen documentation generating
bspbrush.h
Go to the documentation of this file.
1 
5 /*
6 Copyright (C) 1997-2001 Id Software, Inc.
7 
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12 
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16 
17 See the GNU General Public License for more details.
18 
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 
23 */
24 
25 #pragma once
26 
27 #include "../../shared/mathlib.h" /* for vec3_t */
28 
29 #if 0
30 /* the code is not yet ready for this */
31 struct bspbrush_s;
32 typedef struct bspbrush_s bspbrush_t;
33 #else
34 #define STANDARD_NUMBER_OF_BRUSHSIDES 6
35 typedef struct bspbrush_s {
36  struct bspbrush_s* next;
38  int side;
39  int testside;
40  struct mapbrush_s* original;
41  int numsides;
43 } bspbrush_t;
44 #endif
45 
46 bspbrush_t* BrushFromBounds(const vec3_t mins, const vec3_t maxs);
47 bspbrush_t* CopyBrush(const bspbrush_t* brush);
48 side_t* SelectSplitSide(bspbrush_t* brushes, bspbrush_t* volume);
49 void SplitBrushList(bspbrush_t* brushes, uint16_t planenum, bspbrush_t** front, bspbrush_t** back);
50 void SplitBrush(const bspbrush_t* brush, uint16_t planenum, bspbrush_t** front, bspbrush_t** back);
51 bspbrush_t* AllocBrush(int numsides);
52 int CountBrushList(bspbrush_t* brushes);
53 void FreeBrush(bspbrush_t* brushes);
54 void FreeBrushList(bspbrush_t* brushes);
55 uint32_t BrushListCalcContents(bspbrush_t* brushlist);
56 void BrushlistCalcStats(bspbrush_t* brushlist, AABB& blBox);
struct mapbrush_s * original
Definition: bspbrush.h:40
void SplitBrushList(bspbrush_t *brushes, uint16_t planenum, bspbrush_t **front, bspbrush_t **back)
Definition: bspbrush.cpp:700
uint32_t BrushListCalcContents(bspbrush_t *brushlist)
Collects the contentsflags of the brushes in the given list.
Definition: bspbrush.cpp:300
side_t * SelectSplitSide(bspbrush_t *brushes, bspbrush_t *volume)
Using a heuristic, choses one of the sides out of the brushlist to partition the brushes with...
Definition: bspbrush.cpp:416
struct bspbrush_s * next
Definition: bspbrush.h:36
int testside
Definition: bspbrush.h:39
AABB brBox
Definition: bspbrush.h:37
bspbrush_t * CopyBrush(const bspbrush_t *brush)
Duplicates the brush, the sides, and the windings.
Definition: bspbrush.cpp:207
int numsides
Definition: bspbrush.h:41
#define STANDARD_NUMBER_OF_BRUSHSIDES
Definition: bspbrush.h:34
Definition: aabb.h:42
int CountBrushList(bspbrush_t *brushes)
Returns the amount of brushes in the given brushlist.
Definition: bspbrush.cpp:152
bspbrush_t * AllocBrush(int numsides)
Definition: bspbrush.cpp:166
void FreeBrush(bspbrush_t *brushes)
Definition: bspbrush.cpp:179
void FreeBrushList(bspbrush_t *brushes)
Definition: bspbrush.cpp:193
vec_t vec3_t[3]
Definition: ufotypes.h:39
Definition: map.h:60
void BrushlistCalcStats(bspbrush_t *brushlist, AABB &blBox)
Counts the faces and calculate the aabb.
Definition: bspbrush.cpp:759
int side
Definition: bspbrush.h:38
void SplitBrush(const bspbrush_t *brush, uint16_t planenum, bspbrush_t **front, bspbrush_t **back)
Generates two new brushes, leaving the original unchanged.
Definition: bspbrush.cpp:544
bspbrush_t * BrushFromBounds(const vec3_t mins, const vec3_t maxs)
Creates a new axial brush.
Definition: bspbrush.cpp:87