91 for (i = 0; i < 3; i++)
97 for (
int j = 0; j < b->
numsides; j++) {
117 for (
int j = 0; j < 2; j++) {
187 if (((contents >> 8) & 0xFF) == level)
192 if (contents & 0xFF00)
204 for (walk = list; walk; walk = next) {
206 walk->
next =
nullptr;
227 for (; list; list = next) {
233 list->
next = newlist;
271 for (i = startbrush; i < endbrush; i++) {
301 for (i = 0; i < 2; i++) {
303 vec3_t normal = {0, 0, 0};
313 for (i = startbrush; i < endbrush; i++) {
334 for (j = 0; j < numsides; j++)
349 for (j = 0; j < numsides; j++) {
365 newbrush->
next = brushlist;
366 brushlist = newbrush;
395 for (tail = head; tail->
next; tail = tail->
next);
397 for (b1 = head; b1; b1 = next) {
399 for (b2 = b1->
next; b2; b2 = b2->
next) {
403 sub = sub2 =
nullptr;
434 if (c1 > 1 && c2 > 1) {
465 if (keepBrushes != originalBrushes) {
static bspbrush_t * AddBrushListToTail(bspbrush_t *list, bspbrush_t *tail)
#define CONTENTS_WEAPONCLIP
void setNegativeVolume()
Sets mins and maxs to their starting points before using addPoint.
winding_t * CopyWinding(const winding_t *w)
Copy a winding with all its points allocated.
uint16_t FindOrCreateFloatPlane(vec3_t normal, vec_t dist)
static bspbrush_t * SubtractBrush(bspbrush_t *a, const bspbrush_t *b)
static bool IsInLevel(const int contents, const int level)
checks if the level# matches the contentsmask. The level# is mapped to the appropriate levelflags...
static bspbrush_t * ClipBrushToBox(bspbrush_t *brush, const AABB &clipBox)
Any planes shared with the box edge will be set to no texinfo.
void FreeBrushList(bspbrush_t *brushes)
static bool BrushesDisjoint(bspbrush_t *a, bspbrush_t *b)
void set(const AABB &other)
Copies the values from the given aabb.
bspbrush_t * ChopBrushes(bspbrush_t *head)
Carves any intersecting solid brushes into the minimum number of non-intersecting brushes...
static uint16_t maxplanenums[2]
mapbrush_t mapbrushes[MAX_MAP_BRUSHES]
bspbrush_t * AllocBrush(int numsides)
void add(const vec3_t point)
If the point is outside the box, expand the box to accommodate it.
bool contains(const vec3_t point) const
static bool BrushGE(bspbrush_t *b1, bspbrush_t *b2)
Returns true if b1 is allowed to bite b2.
void FreeBrush(bspbrush_t *brushes)
struct side_s * original_sides
int MapBrushesBounds(const int startbrush, const int endbrush, const int level, const AABB &clipBox, AABB &bBox)
sets mins and maxs to the smallest sizes that can contain all brushes from startbrush to endbrush tha...
side_t sides[STANDARD_NUMBER_OF_BRUSHSIDES]
int CountBrushList(bspbrush_t *brushes)
Returns the amount of brushes in the given brushlist.
void SplitBrush(const bspbrush_t *brush, uint16_t planenum, bspbrush_t **front, bspbrush_t **back)
Generates two new brushes, leaving the original unchanged.
#define CONTENTS_ACTORCLIP
struct mapbrush_s * original
static bspbrush_t * CullList(bspbrush_t *list, bspbrush_t *skip)
Builds a new list that doesn't hold the given brush.
bspbrush_t * MakeBspBrushList(int startbrush, int endbrush, int level, const AABB &clip)
#define CONTENTS_LIGHTCLIP
static uint16_t minplanenums[2]