UFO: Alien Invasion
|
Some checks during compile, warning on -check and changes .map on -fix. More...
#include "check.h"
#include "../common/shared.h"
#include "../common/bspfile.h"
#include "../common/scriplib.h"
#include "../../../shared/entitiesdef.h"
#include "checklib.h"
#include "../bsp.h"
#include "../ufo2map.h"
Go to the source code of this file.
Macros | |
#define | CH_DIST_EPSILON 0.001f |
#define | CH_DIST_EPSILON_SQR 0.000001 |
#define | CH_DIST_EPSILON_COLLINEAR_POINTS 0.02f |
#define | COS_EPSILON 0.9999f |
#define | SIN_EPSILON 0.0001f |
#define | NEARDOWN_COS 0.985 |
#define | VERT_BUF_SIZE_DISJOINT_SIDES 21 |
#define | OVERLAP_AREA_TOL 0.2f |
#define | OVERLAP_WIDTH_TOL 0.1f |
#define | CH_COMP_NDR_EDGE_INTSCT_BUF 21 |
#define | M(x) if (flags & CONTENTS_##x) Check_Printf(VERB_CHECK, false, NUM_SAME, NUM_SAME, " " #x) |
Enumerations | |
enum | pointInBrush_t { PIB_EXCL_SURF, PIB_INCL_SURF_EXCL_EDGE, PIB_INCL_SURF, PIB_ON_SURFACE_ONLY } |
wether the surface of a brush is included when testing if a point is in a brush determines how epsilon is applied. More... | |
Functions | |
static bool | Check_SidePointsDown (const side_t *s) |
faces that are near pointing down may be set nodraw, as views are always slightly down More... | |
static float | Check_PointPlaneDistance (const vec3_t point, const plane_t *plane) |
distance from a point to a plane. More... | |
static bool | FacingAndCoincidentTo (const side_t *side1, const side_t *side2) |
calculates whether side1 faces side2 and touches. More... | |
static bool | ParallelAndCoincidentTo (const side_t *side1, const side_t *side2) |
calculates whether side1 and side2 are on a common plane More... | |
static bool | Check_IsPointInsideBrush (const vec3_t point, const mapbrush_t *brush, const pointInBrush_t mode) |
tests if a point is in a map brush. More... | |
static bool | Check_SurfProp (const int flag, const side_t *s) |
textures take priority over flags. checks if a tex marks a side as having a special property. More... | |
static bool | Check_SurfProps (const int flags, const side_t *s) |
textures take priority over flags. checks if a tex marks a side as having a special property. More... | |
static bool | Check_IsOptimisable (const mapbrush_t *b) |
static bool | Check_BoundingBoxIntersects (const mapbrush_t *a, const mapbrush_t *b) |
static void | Check_NearList (void) |
add a list of near brushes to each mapbrush. near meaning that the bounding boxes are intersecting or within CH_DIST_EPSILON of touching. More... | |
static bool | Check_SideIsInBrush (const side_t *side, const mapbrush_t *brush, pointInBrush_t mode) |
tests the vertices in the winding of side s. More... | |
static bool | Check_SidesTouch (side_t *a, side_t *b) |
test if sides abut or intersect More... | |
static void | Check_FindCompositeSides (void) |
a composite side is a side made of sides from neighbouring brushes. the sides abut. these sides can cooperate to hide a face, this is used for nodraw setting. composite sides may be used for other things in the future. More... | |
static int | Check_EdgePlaneIntersection (const vec3_t vert1, const vec3_t vert2, const plane_t *plane, vec3_t intersection) |
calculate where an edge (defined by the vertices) intersects a plane. http://local.wasp.uwa.edu.au/~pbourke/geometry/planeline/ More... | |
static bool | Check_WindingIntersects (const winding_t *winding, const mapbrush_t *brush) |
tests the lines joining the vertices in the winding More... | |
void | Check_BrushIntersection (void) |
reports intersection between optimisable map brushes More... | |
static bool | Check_EdgeEdgeIntersection (const vec3_t e1p1, const vec3_t e1p2, const vec3_t e2p1, const vec3_t e2p2, vec3_t intersection) |
finds point of intersection of two finite lines, if one exists More... | |
static float | Check_LongestEdge (const winding_t *w) |
static float | Check_SidesOverlap (const side_t *s1, const side_t *s2) |
tests if sides overlap, for z-fighting check More... | |
void | CheckZFighting (void) |
check all brushes for overlapping shared faces More... | |
void | Check_ContainedBrushes (void) |
find duplicated brushes and brushes contained inside brushes More... | |
static int | Check_LevelForNodraws (const side_t *coverer, const side_t *coveree) |
static void | Check_SetNodraw (side_t *s) |
void | CheckNodraws (void) |
check for faces which can safely be set to SURF_NODRAW because they are pressed against the faces of other brushes. Also set faces pointing near straight down nodraw. More... | |
static bool | Check_DuplicateBrushPlanes (const mapbrush_t *b) |
static vec_t | Check_MapBrushVolume (const mapbrush_t *brush) |
void | CheckMapMicro (void) |
report brushes from the map below 1 unit^3 More... | |
void | DisplayContentFlags (const int flags) |
prints a list of the names of the set content flags or "no contentflags" if all bits are 0 More... | |
static int | Check_CalculateLevelFlagFill (int contentFlags) |
calculate the bits that have to be set to fill levelflags such that they are contiguous More... | |
void | CheckFillLevelFlags (void) |
ensures set levelflags are in one contiguous block More... | |
void | CheckLevelFlags (void) |
sets all levelflags, if none are set. More... | |
void | SetImpliedFlags (side_t *side, brush_texture_t *tex, const mapbrush_t *brush) |
Sets surface flags dependent on assigned texture. More... | |
void | CheckFlagsBasedOnTextures (void) |
sets content flags based on textures More... | |
void | CheckTexturesBasedOnFlags (void) |
check that sides have textures and that where content/surface flags are set the texture is correct. More... | |
void | CheckPropagateParserContentFlags (mapbrush_t *b) |
some contentlflags are set as a result of some surface flag. For example, if one face is TRANS* then the brush is TRANSLUCENT. this is required by the .map parser as well as th check/fix code. More... | |
void | CheckMixedFaceContents (void) |
contentflags should be the same on each face of a brush. print warnings if they are not. remove contentflags that are set on less than half of the faces. some content flags are transferred to all faces on parsing, ParseBrush(). More... | |
void | CheckBrushes (void) |
Variables | |
compositeSide_t | compositeSides [MAX_MAP_SIDES/2] |
int | numCompositeSides |
Some checks during compile, warning on -check and changes .map on -fix.
Definition in file check.cpp.
#define CH_COMP_NDR_EDGE_INTSCT_BUF 21 |
Definition at line 975 of file check.cpp.
Referenced by CheckNodraws().
#define CH_DIST_EPSILON 0.001f |
how close faces have to be in order for one to be hidden and set to SURF_NODRAW. Also the margin for abutting brushes to be considered not intersecting
Definition at line 42 of file check.cpp.
Referenced by Check_BoundingBoxIntersects(), Check_EdgeEdgeIntersection(), Check_EdgePlaneIntersection(), Check_IsPointInsideBrush(), Check_PointPlaneDistance(), Check_SidesOverlap(), FacingAndCoincidentTo(), and ParallelAndCoincidentTo().
#define CH_DIST_EPSILON_COLLINEAR_POINTS 0.02f |
#define CH_DIST_EPSILON_SQR 0.000001 |
Definition at line 43 of file check.cpp.
Referenced by CheckNodraws().
#define COS_EPSILON 0.9999f |
if the cosine of an angle is greater than this, then the angle is negligibly different from zero
Definition at line 48 of file check.cpp.
Referenced by Check_EdgeEdgeIntersection(), FacingAndCoincidentTo(), and ParallelAndCoincidentTo().
#define M | ( | x | ) | if (flags & CONTENTS_##x) Check_Printf(VERB_CHECK, false, NUM_SAME, NUM_SAME, " " #x) |
Referenced by DisplayContentFlags().
#define NEARDOWN_COS 0.985 |
faces close to pointing down may be set to nodraw. this is the cosine of the angle of how close it has to be. around 10 degrees
Definition at line 67 of file check.cpp.
Referenced by Check_SidePointsDown().
#define OVERLAP_AREA_TOL 0.2f |
Definition at line 732 of file check.cpp.
Referenced by Check_SidesOverlap().
#define OVERLAP_WIDTH_TOL 0.1f |
Definition at line 733 of file check.cpp.
Referenced by Check_SidesOverlap().
#define SIN_EPSILON 0.0001f |
if the sine of an angle is less than this, then the angle is negligibly different from zero
Definition at line 51 of file check.cpp.
Referenced by Check_EdgePlaneIntersection().
#define VERT_BUF_SIZE_DISJOINT_SIDES 21 |
Definition at line 731 of file check.cpp.
Referenced by Check_SidesOverlap().
enum pointInBrush_t |
wether the surface of a brush is included when testing if a point is in a brush determines how epsilon is applied.
|
static |
Definition at line 279 of file check.cpp.
References CH_DIST_EPSILON, i, AABB::maxs, mapbrush_s::mbBox, and AABB::mins.
Referenced by Check_NearList().
reports intersection between optimisable map brushes
Definition at line 589 of file check.cpp.
References mapbrush_s::brushnum, Check_IsOptimisable(), Check_NearList(), Check_Printf(), Check_WindingIntersects(), mapbrush_s::entitynum, i, mapbrushes, mapbrush_s::nearBrushes, nummapbrushes, mapbrush_s::numNear, mapbrush_s::numsides, mapbrush_s::original_sides, VERB_CHECK, and side_s::winding.
Referenced by main().
calculate the bits that have to be set to fill levelflags such that they are contiguous
Definition at line 1342 of file check.cpp.
References CONTENTS_LEVEL_1, and CONTENTS_LEVEL_8.
Referenced by CheckFillLevelFlags().
find duplicated brushes and brushes contained inside brushes
Definition at line 912 of file check.cpp.
References mapbrush_s::brushnum, Check_IsOptimisable(), Check_NearList(), Check_Printf(), Check_SideIsInBrush(), mapbrush_s::contentFlags, CONTENTS_ORIGIN, mapbrush_s::entitynum, i, mapbrushes, mapbrush_s::nearBrushes, nummapbrushes, mapbrush_s::numNear, mapbrush_s::numsides, mapbrush_s::original_sides, PIB_INCL_SURF, and VERB_CHECK.
Referenced by main().
|
static |
Definition at line 1228 of file check.cpp.
References mapbrush_s::brushnum, Check_Printf(), mapbrush_s::entitynum, i, mapbrush_s::numsides, mapbrush_s::original_sides, and VERB_CHECK.
Referenced by CheckBrushes().
|
static |
finds point of intersection of two finite lines, if one exists
[in] | e1p1 | first point defining line 1 |
[in] | e1p2 | second point defining line 1 |
[in] | e2p1,e2p2 | The points defining line 2 |
[out] | intersection | will be set to the point of intersection, if one exists |
Definition at line 627 of file check.cpp.
References CH_DIST_EPSILON, COS_EPSILON, CrossProduct(), DotProduct, f, VectorAdd, VectorLength(), VectorNormalize(), VectorScale, and VectorSubtract.
Referenced by Check_SidesOverlap(), and CheckNodraws().
|
static |
calculate where an edge (defined by the vertices) intersects a plane. http://local.wasp.uwa.edu.au/~pbourke/geometry/planeline/
[in] | vert1,vert2 | The vertices defining the edge to check. |
[in] | plane | The plane to check against. |
[out] | intersection | the position of the intersection, if the edge is not too close to parallel. |
Definition at line 539 of file check.cpp.
References CH_DIST_EPSILON, DIST_EPSILON, DotProduct, length, plane_s::normal, plane_s::planeVector, SIN_EPSILON, VectorAdd, VectorLength(), VectorMul, and VectorSubtract.
Referenced by Check_WindingIntersects().
a composite side is a side made of sides from neighbouring brushes. the sides abut. these sides can cooperate to hide a face, this is used for nodraw setting. composite sides may be used for other things in the future.
Definition at line 406 of file check.cpp.
References side_s::brush, Check_IsOptimisable(), Check_NearList(), Check_Printf(), Check_SidesTouch(), Check_SurfProp(), i, side_s::isCompositeMember, m, mapbrushes, MAX_MAP_SIDES, Mem_AllocTypeN, compositeSide_s::memberSides, mapbrush_s::nearBrushes, numCompositeSides, nummapbrushes, compositeSide_s::numMembers, mapbrush_s::numNear, mapbrush_s::numsides, mapbrush_s::original_sides, ParallelAndCoincidentTo(), SURF_NODRAW, Sys_Error(), VERB_EXTRA, and side_s::winding.
Referenced by CheckNodraws().
|
static |
Definition at line 253 of file check.cpp.
References Check_SurfProp(), Check_SurfProps(), side_s::contentFlags, CONTENTS_ORIGIN, CONTENTS_TRANSLUCENT, entities, mapbrush_s::entitynum, i, MASK_CLIP, name, mapbrush_s::numsides, mapbrush_s::original_sides, Q_streq, SURF_NODRAW, and ValueForKey().
Referenced by Check_BrushIntersection(), Check_ContainedBrushes(), Check_FindCompositeSides(), CheckNodraws(), and CheckZFighting().
|
inlinestatic |
tests if a point is in a map brush.
[in] | point | The point to check whether it's inside the brush boundaries or not |
[in] | brush | The brush to check against |
[in] | mode | determines how epsilons are applied |
Definition at line 152 of file check.cpp.
References CH_DIST_EPSILON, Check_PointPlaneDistance(), i, mapplanes, mapbrush_s::numsides, mapbrush_s::original_sides, PIB_EXCL_SURF, PIB_INCL_SURF_EXCL_EDGE, PIB_ON_SURFACE_ONLY, and side_s::planenum.
Referenced by Check_SideIsInBrush(), Check_SidesOverlap(), Check_SidesTouch(), Check_WindingIntersects(), and CheckNodraws().
Definition at line 950 of file check.cpp.
References side_s::contentFlags, and CONTENTS_LEVEL_ALL.
Referenced by CheckNodraws().
|
static |
Definition at line 720 of file check.cpp.
References i, winding_s::numpoints, winding_s::p, and VectorDistSqr.
Referenced by Check_SidesOverlap().
|
static |
Definition at line 1253 of file check.cpp.
References plane_s::dist, DotProduct, i, mapplanes, plane_s::normal, mapbrush_s::numsides, mapbrush_s::original_sides, winding_s::p, side_s::planenum, VectorCopy, side_s::winding, and WindingArea().
Referenced by CheckMapMicro().
add a list of near brushes to each mapbrush. near meaning that the bounding boxes are intersecting or within CH_DIST_EPSILON of touching.
Definition at line 294 of file check.cpp.
References Check_BoundingBoxIntersects(), i, mapbrushes, MAX_MAP_BRUSHES, Mem_AllocTypeN, mapbrush_s::nearBrushes, nummapbrushes, mapbrush_s::numNear, and Sys_Error().
Referenced by Check_BrushIntersection(), Check_ContainedBrushes(), Check_FindCompositeSides(), and CheckZFighting().
distance from a point to a plane.
Definition at line 86 of file check.cpp.
References CH_DIST_EPSILON, plane_s::dist, DotProduct, plane_s::normal, and VectorLengthSqr.
Referenced by Check_IsPointInsideBrush(), FacingAndCoincidentTo(), and ParallelAndCoincidentTo().
Definition at line 955 of file check.cpp.
References brushsides, config, index, brush_texture_s::name, Q_strncpyz(), side_brushtextures, SURF_NODRAW, SURF_PHONG, brush_texture_s::surfaceFlags, and side_s::surfaceFlags.
Referenced by CheckNodraws().
|
static |
tests the vertices in the winding of side s.
[in] | side | The side |
[in] | brush | The brush |
[in] | mode | determines how epsilon is applied |
Definition at line 348 of file check.cpp.
References Check_IsPointInsideBrush(), i, winding_s::numpoints, winding_s::p, and side_s::winding.
Referenced by Check_ContainedBrushes(), and CheckNodraws().
|
static |
faces that are near pointing down may be set nodraw, as views are always slightly down
Definition at line 73 of file check.cpp.
References DotProduct, down, mapplanes, NEARDOWN_COS, plane_s::normal, and side_s::planenum.
Referenced by CheckNodraws(), and CheckZFighting().
tests if sides overlap, for z-fighting check
Definition at line 744 of file check.cpp.
References AllocWinding(), side_s::brush, mapbrush_s::brushnum, CH_DIST_EPSILON, Check_EdgeEdgeIntersection(), Check_IsPointInsideBrush(), Check_LongestEdge(), Check_Printf(), Com_Printf(), mapbrush_s::entitynum, i, Mem_Free, winding_s::numpoints, OVERLAP_AREA_TOL, OVERLAP_WIDTH_TOL, winding_s::p, PIB_INCL_SURF, v, VectorCopy, VectorLength(), VectorSubtract, VERB_CHECK, VERT_BUF_SIZE_DISJOINT_SIDES, side_s::winding, and WindingArea().
Referenced by CheckZFighting().
test if sides abut or intersect
Definition at line 382 of file check.cpp.
References side_s::brush, Check_IsPointInsideBrush(), i, winding_s::numpoints, winding_s::p, PIB_INCL_SURF, and side_s::winding.
Referenced by Check_FindCompositeSides().
textures take priority over flags. checks if a tex marks a side as having a special property.
flag | The (surface or content) flag the property to check for. should only have one bit set. |
s | the side to check the texture of |
Definition at line 190 of file check.cpp.
References brushsides, CONTENTS_ACTORCLIP, CONTENTS_LADDER, CONTENTS_LIGHTCLIP, CONTENTS_ORIGIN, CONTENTS_WEAPONCLIP, brush_texture_s::name, Q_streq, side_brushtextures, and SURF_NODRAW.
Referenced by Check_FindCompositeSides(), Check_IsOptimisable(), CheckLevelFlags(), CheckNodraws(), CheckZFighting(), and SetImpliedFlags().
textures take priority over flags. checks if a tex marks a side as having a special property.
flags | the properties to check for. may have several bits set |
s | the side to check the texture of |
Definition at line 222 of file check.cpp.
References brushsides, CONTENTS_ACTORCLIP, CONTENTS_LADDER, CONTENTS_LIGHTCLIP, CONTENTS_ORIGIN, CONTENTS_WEAPONCLIP, MASK_CLIP, brush_texture_s::name, Q_streq, side_brushtextures, and SURF_NODRAW.
Referenced by Check_IsOptimisable().
|
static |
tests the lines joining the vertices in the winding
Definition at line 569 of file check.cpp.
References Check_EdgePlaneIntersection(), Check_IsPointInsideBrush(), mapplanes, winding_s::numpoints, mapbrush_s::numsides, mapbrush_s::original_sides, winding_s::p, PIB_INCL_SURF_EXCL_EDGE, and side_s::planenum.
Referenced by Check_BrushIntersection().
Definition at line 1708 of file check.cpp.
References mapbrush_s::brushnum, Check_DuplicateBrushPlanes(), Check_Printf(), side_s::contentFlags, CONTENTS_ORIGIN, mapbrush_s::entitynum, i, mapbrushes, nummapbrushes, mapbrush_s::numsides, mapbrush_s::original_sides, and VERB_CHECK.
Referenced by main().
ensures set levelflags are in one contiguous block
Definition at line 1364 of file check.cpp.
References mapbrush_s::brushnum, Check_CalculateLevelFlagFill(), Check_Printf(), side_s::contentFlags, DisplayContentFlags(), mapbrush_s::entitynum, i, mapbrushes, nummapbrushes, mapbrush_s::numsides, mapbrush_s::original_sides, and VERB_CHECK.
Referenced by main().
sets content flags based on textures
Definition at line 1532 of file check.cpp.
References brushsides, i, index, mapbrushes, nummapbrushes, mapbrush_s::numsides, mapbrush_s::original_sides, SetImpliedFlags(), and side_brushtextures.
Referenced by main().
sets all levelflags, if none are set.
Definition at line 1385 of file check.cpp.
References mapbrush_s::brushnum, Check_Printf(), Check_SurfProp(), side_s::contentFlags, CONTENTS_LEVEL_ALL, CONTENTS_ORIGIN, mapbrush_s::entitynum, i, mapbrushes, MASK_CLIP, nummapbrushes, mapbrush_s::numsides, mapbrush_s::original_sides, SURF_NODRAW, and VERB_CHECK.
Referenced by main().
report brushes from the map below 1 unit^3
Definition at line 1293 of file check.cpp.
References mapbrush_s::brushnum, Check_MapBrushVolume(), Check_Printf(), config, mapbrush_s::entitynum, i, mapbrushes, nummapbrushes, mapbrush_s::skipWriteBack, and VERB_CHECK.
Referenced by main().
contentflags should be the same on each face of a brush. print warnings if they are not. remove contentflags that are set on less than half of the faces. some content flags are transferred to all faces on parsing, ParseBrush().
Definition at line 1647 of file check.cpp.
References mapbrush_s::brushnum, brushsides, Check_Printf(), CheckPropagateParserContentFlags(), side_s::contentFlags, mapbrush_s::contentFlags, CONTENTS_ACTORCLIP, CONTENTS_ORIGIN, DisplayContentFlags(), mapbrush_s::entitynum, i, index, mapbrushes, brush_texture_s::name, NUM_SAME, nummapbrushes, mapbrush_s::numsides, mapbrush_s::original_sides, Q_streq, Q_strncpyz(), side_brushtextures, and VERB_CHECK.
Referenced by main().
check for faces which can safely be set to SURF_NODRAW because they are pressed against the faces of other brushes. Also set faces pointing near straight down nodraw.
Definition at line 984 of file check.cpp.
References side_s::brush, mapbrush_s::brushnum, CH_COMP_NDR_EDGE_INTSCT_BUF, CH_DIST_EPSILON_SQR, Check_EdgeEdgeIntersection(), Check_FindCompositeSides(), Check_IsOptimisable(), Check_IsPointInsideBrush(), Check_LevelForNodraws(), Check_Printf(), Check_SetNodraw(), Check_SideIsInBrush(), Check_SidePointsDown(), Check_SurfProp(), Com_Printf(), mapbrush_s::entitynum, FacingAndCoincidentTo(), i, m, mapbrushes, compositeSide_s::memberSides, mapbrush_s::nearBrushes, numCompositeSides, nummapbrushes, compositeSide_s::numMembers, mapbrush_s::numNear, winding_s::numpoints, mapbrush_s::numsides, OBJZERO, mapbrush_s::original_sides, winding_s::p, PIB_INCL_SURF, side_s::planenum, SURF_LIGHT, SURF_NODRAW, side_s::surfaceFlags, VectorCopy, VectorDistSqr, VERB_CHECK, VERB_EXTRA, VERB_LESS, and side_s::winding.
Referenced by main().
void CheckPropagateParserContentFlags | ( | mapbrush_t * | b | ) |
some contentlflags are set as a result of some surface flag. For example, if one face is TRANS* then the brush is TRANSLUCENT. this is required by the .map parser as well as th check/fix code.
Definition at line 1619 of file check.cpp.
References mapbrush_s::brushnum, Check_Printf(), side_s::contentFlags, mapbrush_s::contentFlags, CONTENTS_DETAIL, CONTENTS_TRANSLUCENT, DisplayContentFlags(), mapbrush_s::entitynum, m, mapbrush_s::numsides, mapbrush_s::original_sides, and VERB_CHECK.
Referenced by CheckMixedFaceContents(), and ParseBrush().
check that sides have textures and that where content/surface flags are set the texture is correct.
Definition at line 1555 of file check.cpp.
References mapbrush_s::brushnum, brushsides, Check_Printf(), side_s::contentFlags, CONTENTS_ACTORCLIP, CONTENTS_LIGHTCLIP, CONTENTS_ORIGIN, CONTENTS_WEAPONCLIP, mapbrush_s::entitynum, i, index, mapbrushes, brush_texture_s::name, nummapbrushes, mapbrush_s::numsides, mapbrush_s::original_sides, Q_streq, Q_strncpyz(), side_brushtextures, SURF_HINT, SURF_NODRAW, SURF_PHONG, brush_texture_s::surfaceFlags, side_s::surfaceFlags, and VERB_CHECK.
Referenced by main().
check all brushes for overlapping shared faces
Definition at line 843 of file check.cpp.
References mapbrush_s::brushnum, Check_IsOptimisable(), Check_NearList(), Check_Printf(), Check_SidePointsDown(), Check_SidesOverlap(), Check_SurfProp(), Com_Printf(), mapbrush_s::contentFlags, CONTENTS_LEVEL_ALL, mapbrush_s::entitynum, f, i, mapbrushes, mapbrush_s::nearBrushes, nummapbrushes, mapbrush_s::numNear, mapbrush_s::numsides, mapbrush_s::original_sides, ParallelAndCoincidentTo(), side_s::planenum, SURF_NODRAW, and VERB_CHECK.
Referenced by main().
prints a list of the names of the set content flags or "no contentflags" if all bits are 0
Definition at line 1309 of file check.cpp.
References Check_Printf(), M, NUM_SAME, and VERB_CHECK.
Referenced by CheckFillLevelFlags(), CheckMixedFaceContents(), and CheckPropagateParserContentFlags().
calculates whether side1 faces side2 and touches.
The surface unit normals must be antiparallel (i.e. they face each other), and the distance to the origin must be such that they occupy the same region of space, to within a distance of epsilon. These are based on consideration of the planes of the faces only - they could be offset by a long way.
Definition at line 106 of file check.cpp.
References CH_DIST_EPSILON, Check_PointPlaneDistance(), COS_EPSILON, DotProduct, mapplanes, plane_s::normal, side_s::planenum, and plane_s::planeVector.
Referenced by CheckNodraws().
calculates whether side1 and side2 are on a common plane
normals must be parallel, planes must touch
Definition at line 131 of file check.cpp.
References CH_DIST_EPSILON, Check_PointPlaneDistance(), COS_EPSILON, DotProduct, mapplanes, plane_s::normal, side_s::planenum, and plane_s::planeVector.
Referenced by Check_FindCompositeSides(), and CheckZFighting().
void SetImpliedFlags | ( | side_t * | side, |
brush_texture_t * | tex, | ||
const mapbrush_t * | brush | ||
) |
Sets surface flags dependent on assigned texture.
Definition at line 1448 of file check.cpp.
References mapbrush_s::brushnum, Check_Printf(), Check_SurfProp(), config, side_s::contentFlags, CONTENTS_ACTORCLIP, CONTENTS_LADDER, CONTENTS_LIGHTCLIP, CONTENTS_ORIGIN, CONTENTS_PASSABLE, CONTENTS_WATER, CONTENTS_WEAPONCLIP, mapbrush_s::entitynum, brush_texture_s::name, Q_streq, SURF_HINT, SURF_NODRAW, SURF_PHONG, SURF_SKIP, SURF_SLICK, SURF_WARP, brush_texture_s::surfaceFlags, side_s::surfaceFlags, and VERB_CHECK.
Referenced by CheckFlagsBasedOnTextures(), and ParseBrush().
compositeSide_t compositeSides[MAX_MAP_SIDES/2] |
an array of composite mapbrush sides.
Definition at line 37 of file check.cpp.
Referenced by Check_Free().
int numCompositeSides |
Definition at line 38 of file check.cpp.
Referenced by Check_FindCompositeSides(), Check_Free(), and CheckNodraws().