|
UFO: Alien Invasion
|

Go to the source code of this file.
Macros | |
| #define | TESTING_MOCK_SPLIT 1 |
Functions | |
| static void | BoundBrush (bspbrush_t *brush) |
| Sets the mins/maxs based on the windings. | |
| static void | CreateBrushWindings (bspbrush_t *brush) |
| makes basewindigs for sides and mins/maxs for the brush | |
| bspbrush_t * | BrushFromBounds (const vec3_t mins, const vec3_t maxs) |
| Creates a new axial brush. | |
| static vec_t | BrushVolume (const bspbrush_t *brush) |
| Returns the volume of the given brush. | |
| int | CountBrushList (bspbrush_t *brushes) |
| Returns the amount of brushes in the given brushlist. | |
| bspbrush_t * | AllocBrush (int numsides) |
| void | FreeBrush (bspbrush_t *brushes) |
| void | FreeBrushList (bspbrush_t *brushes) |
| bspbrush_t * | CopyBrush (const bspbrush_t *brush) |
| Duplicates the brush, the sides, and the windings. | |
| static int | TestBrushToPlanenum (bspbrush_t *brush, uint16_t planenum, int *numsplits, bool *hintsplit, int *epsilonbrush) |
| uint32_t | BrushListCalcContents (bspbrush_t *brushlist) |
| Collects the contentsflags of the brushes in the given list. | |
| static int | BrushMostlyOnSide (const bspbrush_t *brush, const plane_t *plane) |
| Checks on which side a of plane the brush is. | |
| static bool | DoesPlaneSplitBrush (const bspbrush_t *brush, int planenum) |
| Checks if the plane splits the brush. | |
| static bool | CheckPlaneAgainstVolume (int pnum, const bspbrush_t *volume) |
| 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. | |
| void | SplitBrush (const bspbrush_t *brush, uint16_t planenum, bspbrush_t **front, bspbrush_t **back) |
| Generates two new brushes, leaving the original unchanged. | |
| void | SplitBrushList (bspbrush_t *brushes, uint16_t planenum, bspbrush_t **front, bspbrush_t **back) |
| void | BrushlistCalcStats (bspbrush_t *brushlist, AABB &blBox) |
| Counts the faces and calculate the aabb. | |
Variables | |
| int | c_nodes |
| int | c_nonvis |
| static int | c_active_brushes |
| #define TESTING_MOCK_SPLIT 1 |
Definition at line 352 of file bspbrush.cpp.
| bspbrush_t * AllocBrush | ( | int | numsides | ) |
Definition at line 166 of file bspbrush.cpp.
References c_active_brushes, Mem_Alloc, STANDARD_NUMBER_OF_BRUSHSIDES, and threadstate.
Referenced by BrushFromBounds(), CopyBrush(), MakeBspBrushList(), and SplitBrush().
|
static |
Sets the mins/maxs based on the windings.
Definition at line 36 of file bspbrush.cpp.
References AABB::add(), bspbrush_t::brBox, i, winding_t::numpoints, bspbrush_t::numsides, winding_t::p, AABB::setNegativeVolume(), bspbrush_t::sides, and side_t::winding.
Referenced by CreateBrushWindings(), and SplitBrush().
| bspbrush_t * BrushFromBounds | ( | const vec3_t | mins, |
| const vec3_t | maxs ) |
Creates a new axial brush.
Definition at line 87 of file bspbrush.cpp.
References AllocBrush(), CreateBrushWindings(), FindOrCreateFloatPlane(), i, bspbrush_t::numsides, side_t::planenum, bspbrush_t::sides, and VectorClear.
Referenced by BuildTree().
| uint32_t BrushListCalcContents | ( | bspbrush_t * | brushlist | ) |
Collects the contentsflags of the brushes in the given list.
Definition at line 300 of file bspbrush.cpp.
References CONTENTS_PASSABLE, CONTENTS_SOLID, i, bspbrush_t::next, bspbrush_t::numsides, bspbrush_t::original, bspbrush_t::sides, side_t::texinfo, and TEXINFO_NODE.
Referenced by LeafNode().
| void BrushlistCalcStats | ( | bspbrush_t * | brushlist, |
| AABB & | blBox ) |
Counts the faces and calculate the aabb.
Definition at line 759 of file bspbrush.cpp.
References AABB::add(), side_t::bevel, bspbrush_t::brBox, BrushVolume(), c_faces, Com_Printf(), config, i, bspbrush_t::next, bspbrush_t::numsides, bspbrush_t::original, bspbrush_t::sides, side_t::texinfo, TEXINFO_NODE, VERB_EXTRA, Verb_Printf(), side_t::visible, and side_t::winding.
Referenced by BuildTree().
|
static |
Checks on which side a of plane the brush is.
Definition at line 328 of file bspbrush.cpp.
References plane_t::dist, DotProduct, i, plane_t::normal, winding_t::numpoints, bspbrush_t::numsides, winding_t::p, PSIDE_BACK, PSIDE_FRONT, bspbrush_t::sides, and side_t::winding.
Referenced by SplitBrush().
|
static |
Returns the volume of the given brush.
Definition at line 112 of file bspbrush.cpp.
References plane_t::dist, DotProduct, i, mapplanes, plane_t::normal, bspbrush_t::numsides, winding_t::p, side_t::planenum, bspbrush_t::sides, VectorCopy, side_t::winding, and WindingArea().
Referenced by BrushlistCalcStats(), and SplitBrush().
|
static |
Definition at line 384 of file bspbrush.cpp.
References DoesPlaneSplitBrush().
Referenced by SelectSplitSide().
| bspbrush_t * CopyBrush | ( | const bspbrush_t * | brush | ) |
Duplicates the brush, the sides, and the windings.
Definition at line 207 of file bspbrush.cpp.
References AllocBrush(), CopyWinding(), i, bspbrush_t::numsides, bspbrush_t::sides, STANDARD_NUMBER_OF_BRUSHSIDES, and side_t::winding.
Referenced by SplitBrush(), and SplitBrushList().
| int CountBrushList | ( | bspbrush_t * | brushes | ) |
Returns the amount of brushes in the given brushlist.
Definition at line 152 of file bspbrush.cpp.
References bspbrush_t::next.
Referenced by ChopBrushes().
|
static |
makes basewindigs for sides and mins/maxs for the brush
Definition at line 53 of file bspbrush.cpp.
References BaseWindingForPlane(), side_t::bevel, BoundBrush(), ChopWindingInPlace(), plane_t::dist, FixWinding(), i, mapplanes, plane_t::normal, bspbrush_t::numsides, side_t::planenum, bspbrush_t::sides, VERB_EXTRA, Verb_Printf(), and side_t::winding.
Referenced by BrushFromBounds().
|
static |
Checks if the plane splits the brush.
Definition at line 357 of file bspbrush.cpp.
References plane_t::dist, DotProduct, i, mapplanes, plane_t::normal, winding_t::numpoints, bspbrush_t::numsides, winding_t::p, bspbrush_t::sides, and side_t::winding.
Referenced by CheckPlaneAgainstVolume().
| void FreeBrush | ( | bspbrush_t * | brushes | ) |
Definition at line 179 of file bspbrush.cpp.
References c_active_brushes, FreeWinding(), i, Mem_Free, bspbrush_t::numsides, bspbrush_t::sides, threadstate, and side_t::winding.
Referenced by ClipBrushToBox(), CullList(), FreeBrushList(), FreeTree_r(), SplitBrush(), and SubtractBrush().
| void FreeBrushList | ( | bspbrush_t * | brushes | ) |
Definition at line 193 of file bspbrush.cpp.
References FreeBrush(), and bspbrush_t::next.
Referenced by BuildTree_r(), ChopBrushes(), FreeTree_r(), and SubtractBrush().
| 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.
the search order goes: visible-structural, visible-detail, nonvisible-structural, nonvisible-detail. If any valid plane is available in a pass, no further passes will be tried.
Definition at line 416 of file bspbrush.cpp.
References AXIAL, side_t::bevel, c_nonvis, CheckPlaneAgainstVolume(), CONTENTS_DETAIL, i, mapplanes, bspbrush_t::next, bspbrush_t::numsides, bspbrush_t::original, side_t::planenum, PSIDE_BACK, PSIDE_BOTH, PSIDE_FACING, PSIDE_FRONT, bspbrush_t::side, bspbrush_t::sides, SURF_HINT, SURF_SKIP, side_t::surfaceFlags, Sys_Error(), TestBrushToPlanenum(), side_t::tested, bspbrush_t::testside, side_t::texinfo, TEXINFO_NODE, threadstate, side_t::visible, and side_t::winding.
Referenced by BuildTree_r().
| void SplitBrush | ( | const bspbrush_t * | brush, |
| uint16_t | planenum, | ||
| bspbrush_t ** | front, | ||
| bspbrush_t ** | back ) |
Generates two new brushes, leaving the original unchanged.
Definition at line 544 of file bspbrush.cpp.
References AllocBrush(), BaseWindingForPlane(), BoundBrush(), bspbrush_t::brBox, BrushMostlyOnSide(), BrushVolume(), ChopWindingInPlace(), ClipWindingEpsilon(), Com_Printf(), CopyBrush(), CopyWinding(), plane_t::dist, DotProduct, FreeBrush(), i, mapplanes, MAX_WORLD_WIDTH, AABB::maxs, plane_t::normal, winding_t::numpoints, bspbrush_t::numsides, bspbrush_t::original, winding_t::p, side_t::planenum, PSIDE_BACK, PSIDE_FRONT, bspbrush_t::sides, side_t::tested, side_t::texinfo, TEXINFO_NODE, VERB_EXTRA, Verb_Printf(), side_t::visible, side_t::winding, WindingIsHuge(), and WindingIsTiny().
Referenced by BuildTree_r(), ClipBrushToBox(), SplitBrushList(), and SubtractBrush().
| void SplitBrushList | ( | bspbrush_t * | brushes, |
| uint16_t | planenum, | ||
| bspbrush_t ** | front, | ||
| bspbrush_t ** | back ) |
Definition at line 700 of file bspbrush.cpp.
References CopyBrush(), i, bspbrush_t::next, bspbrush_t::numsides, bspbrush_t::original, side_t::planenum, PSIDE_BACK, PSIDE_BOTH, PSIDE_FACING, PSIDE_FRONT, bspbrush_t::side, bspbrush_t::sides, SplitBrush(), side_t::texinfo, TEXINFO_NODE, VERB_DUMP, and Verb_Printf().
Referenced by BuildTree_r().
|
static |
Definition at line 224 of file bspbrush.cpp.
References bspbrush_t::brBox, dBspPlane_t::dist, plane_t::dist, DotProduct, i, mapplanes, AABB::maxs, AABB::mins, dBspPlane_t::normal, plane_t::normal, winding_t::numpoints, bspbrush_t::numsides, winding_t::p, side_t::planenum, PSIDE_BACK, PSIDE_BOTH, PSIDE_FACING, PSIDE_FRONT, bspbrush_t::sides, SURF_HINT, side_t::surfaceFlags, side_t::texinfo, TEXINFO_NODE, TR_BoxOnPlaneSide(), dBspPlane_t::type, plane_t::type, VectorCopy, side_t::visible, and side_t::winding.
Referenced by SelectSplitSide().
|
static |
Definition at line 30 of file bspbrush.cpp.
Referenced by AllocBrush(), and FreeBrush().
|
extern |
Definition at line 27 of file tree.cpp.
Referenced by BuildTree(), BuildTree_r(), and FreeTree_r().
|
extern |
Definition at line 28 of file tree.cpp.
Referenced by BuildTree(), and SelectSplitSide().