UFO: Alien Invasion
Toggle main menu visibility
Loading...
Searching...
No Matches
bspbrush.h
Go to the documentation of this file.
1
4
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
;
37
AABB
brBox
;
38
int
side
;
39
int
testside
;
40
struct
mapbrush_s*
original
;
41
int
numsides
;
42
side_t
sides
[
STANDARD_NUMBER_OF_BRUSHSIDES
];
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);
STANDARD_NUMBER_OF_BRUSHSIDES
#define STANDARD_NUMBER_OF_BRUSHSIDES
Definition
bspbrush.h:34
CopyBrush
bspbrush_t * CopyBrush(const bspbrush_t *brush)
Duplicates the brush, the sides, and the windings.
Definition
bspbrush.cpp:207
BrushFromBounds
bspbrush_t * BrushFromBounds(const vec3_t mins, const vec3_t maxs)
Creates a new axial brush.
Definition
bspbrush.cpp:87
FreeBrushList
void FreeBrushList(bspbrush_t *brushes)
Definition
bspbrush.cpp:193
FreeBrush
void FreeBrush(bspbrush_t *brushes)
Definition
bspbrush.cpp:179
AllocBrush
bspbrush_t * AllocBrush(int numsides)
Definition
bspbrush.cpp:166
SelectSplitSide
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
SplitBrush
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
BrushListCalcContents
uint32_t BrushListCalcContents(bspbrush_t *brushlist)
Collects the contentsflags of the brushes in the given list.
Definition
bspbrush.cpp:300
CountBrushList
int CountBrushList(bspbrush_t *brushes)
Returns the amount of brushes in the given brushlist.
Definition
bspbrush.cpp:152
BrushlistCalcStats
void BrushlistCalcStats(bspbrush_t *brushlist, AABB &blBox)
Counts the faces and calculate the aabb.
Definition
bspbrush.cpp:759
SplitBrushList
void SplitBrushList(bspbrush_t *brushes, uint16_t planenum, bspbrush_t **front, bspbrush_t **back)
Definition
bspbrush.cpp:700
AABB
Definition
aabb.h:42
mathlib.h
bspbrush_t
Definition
bspbrush.h:35
bspbrush_t::original
struct mapbrush_s * original
Definition
bspbrush.h:40
bspbrush_t::brBox
AABB brBox
Definition
bspbrush.h:37
bspbrush_t::next
struct bspbrush_s * next
Definition
bspbrush.h:36
bspbrush_t::testside
int testside
Definition
bspbrush.h:39
bspbrush_t::side
int side
Definition
bspbrush.h:38
bspbrush_t::numsides
int numsides
Definition
bspbrush.h:41
bspbrush_t::sides
side_t sides[STANDARD_NUMBER_OF_BRUSHSIDES]
Definition
bspbrush.h:42
side_t
Definition
map.h:60
vec3_t
vec_t vec3_t[3]
Definition
ufotypes.h:39
src
tools
ufo2map
bspbrush.h
Generated on __DATE__ __TIME__ for UFO: Alien Invasion by
1.17.0