UFO: Alien Invasion
|
Go to the source code of this file.
Macros | |
#define | BOGUS_RANGE 8192 |
#define | EDGE_LENGTH 0.2 |
#define | SNAP_EPSILON 0.01 |
Functions | |
winding_t * | AllocWinding (int points) |
Allocate a new winding (polygon) More... | |
void | FreeWinding (winding_t *w) |
void | RemoveColinearPoints (winding_t *w) |
vec_t | WindingArea (const winding_t *w) |
void | WindingBounds (const winding_t *w, vec3_t mins, vec3_t maxs) |
void | WindingCenter (const winding_t *w, vec3_t center) |
winding_t * | BaseWindingForPlane (const vec3_t normal, const vec_t dist) |
winding_t * | CopyWinding (const winding_t *w) |
Copy a winding with all its points allocated. More... | |
winding_t * | ReverseWinding (const winding_t *w) |
void | ClipWindingEpsilon (const winding_t *in, const vec3_t normal, const vec_t dist, const vec_t epsilon, winding_t **front, winding_t **back) |
void | ChopWindingInPlace (winding_t **inout, const vec3_t normal, const vec_t dist, const vec_t epsilon) |
winding_t * | ChopWinding (winding_t *in, vec3_t normal, vec_t dist) |
bool | WindingIsTiny (winding_t *w) |
Returns true if the winding would be crunched out of existance by the vertex snapping. More... | |
bool | WindingIsHuge (const winding_t *w) |
Returns true if the winding still has one of the points from basewinding for plane. More... | |
static void | SnapWeldVector (const vec3_t a, const vec3_t b, vec3_t out) |
welds two vec3_t's into a third, taking into account nearest-to-integer instead of averaging More... | |
bool | FixWinding (winding_t *w) |
removes degenerate edges from a winding More... | |
Definition in file polylib.cpp.
#define BOGUS_RANGE 8192 |
Definition at line 31 of file polylib.cpp.
Referenced by BaseWindingForPlane().
#define EDGE_LENGTH 0.2 |
Definition at line 402 of file polylib.cpp.
Referenced by WindingIsTiny().
#define SNAP_EPSILON 0.01 |
Definition at line 437 of file polylib.cpp.
Referenced by SnapWeldVector().
Allocate a new winding (polygon)
[in] | points | Amount of points for this winding |
Definition at line 38 of file polylib.cpp.
References Mem_Alloc.
Referenced by BaseWindingForPlane(), Check_SidesOverlap(), ChopWindingInPlace(), ClipWindingEpsilon(), CopyWinding(), ReverseWinding(), TryMergeWinding(), and WindingFromFace().
Definition at line 116 of file polylib.cpp.
References AllocWinding(), BOGUS_RANGE, CrossProduct(), DotProduct, i, winding_s::numpoints, winding_s::p, Sys_Error(), v, vec3_origin, VectorAdd, VectorCopy, VectorMA(), VectorNormalize(), VectorScale, and VectorSubtract.
Referenced by BaseWindingForNode(), CreateBrushWindings(), MakeBrushWindings(), MakeHeadnodePortals(), and SplitBrush().
Definition at line 391 of file polylib.cpp.
References ClipWindingEpsilon(), f, FreeWinding(), and ON_EPSILON.
void ChopWindingInPlace | ( | winding_t ** | inout, |
const vec3_t | normal, | ||
const vec_t | dist, | ||
const vec_t | epsilon | ||
) |
Definition at line 299 of file polylib.cpp.
References AllocWinding(), DotProduct, f, FreeWinding(), i, MAX_POINTS_ON_WINDING, winding_s::numpoints, winding_s::p, SIDE_BACK, SIDE_FRONT, SIDE_ON, Sys_Error(), VectorClear, and VectorCopy.
Referenced by BaseWindingForNode(), CreateBrushWindings(), MakeBrushWindings(), MakeHeadnodePortals(), MakeNodePortal(), and SplitBrush().
void ClipWindingEpsilon | ( | const winding_t * | in, |
const vec3_t | normal, | ||
const vec_t | dist, | ||
const vec_t | epsilon, | ||
winding_t ** | front, | ||
winding_t ** | back | ||
) |
Definition at line 204 of file polylib.cpp.
References AllocWinding(), CopyWinding(), DotProduct, f, i, MAX_POINTS_ON_WINDING, winding_s::numpoints, winding_s::p, SIDE_BACK, SIDE_FRONT, SIDE_ON, Sys_Error(), VectorClear, and VectorCopy.
Referenced by ChopWinding(), SplitBrush(), SplitNodePortals(), SubdivideFace(), and SubdividePatch().
Copy a winding with all its points allocated.
[in] | w | The winding to copy |
Definition at line 185 of file polylib.cpp.
References AllocWinding(), and winding_s::numpoints.
Referenced by ClipWindingEpsilon(), CopyBrush(), FaceFromPortal(), MakeBspBrushList(), and SplitBrush().
bool FixWinding | ( | winding_t * | w | ) |
removes degenerate edges from a winding
Definition at line 478 of file polylib.cpp.
References i, winding_s::numpoints, ON_EPSILON, winding_s::p, SnapWeldVector(), VectorCopy, VectorLength(), and VectorSubtract.
Referenced by CreateBrushWindings().
Definition at line 46 of file polylib.cpp.
References Mem_Free, and Sys_Error().
Referenced by ChopWinding(), ChopWindingInPlace(), FreeBrush(), FreeFace(), FreePortal(), MakeNodePortal(), and SplitNodePortals().
Definition at line 55 of file polylib.cpp.
References DotProduct, i, MAX_POINTS_ON_WINDING, winding_s::numpoints, winding_s::p, VectorCopy, VectorNormalize(), and VectorSubtract.
Referenced by WindingFromFace().
Definition at line 193 of file polylib.cpp.
References AllocWinding(), i, winding_s::numpoints, winding_s::p, and VectorCopy.
Referenced by FaceFromPortal().
welds two vec3_t's into a third, taking into account nearest-to-integer instead of averaging
Definition at line 443 of file polylib.cpp.
References i, and SNAP_EPSILON.
Referenced by FixWinding().
Definition at line 81 of file polylib.cpp.
References CrossProduct(), i, winding_s::numpoints, winding_s::p, VectorLength(), and VectorSubtract.
Referenced by BrushVolume(), BuildPatch(), Check_MapBrushVolume(), Check_SidesOverlap(), and FinishSubdividePatch().
Definition at line 97 of file polylib.cpp.
References AddPointToBounds(), ClearBounds(), i, winding_s::numpoints, and winding_s::p.
Referenced by SubdividePatch().
Definition at line 106 of file polylib.cpp.
References i, winding_s::numpoints, winding_s::p, scale, vec3_origin, VectorAdd, VectorCopy, and VectorScale.
Referenced by BuildPatch(), and FinishSubdividePatch().
bool WindingIsHuge | ( | const winding_t * | w | ) |
Returns true if the winding still has one of the points from basewinding for plane.
Definition at line 427 of file polylib.cpp.
References i, MAX_WORLD_WIDTH, winding_s::numpoints, and winding_s::p.
Referenced by SplitBrush().
bool WindingIsTiny | ( | winding_t * | w | ) |
Returns true if the winding would be crunched out of existance by the vertex snapping.
Definition at line 407 of file polylib.cpp.
References EDGE_LENGTH, i, len, winding_s::numpoints, winding_s::p, VectorLength(), and VectorSubtract.
Referenced by MakeNodePortal(), SplitBrush(), and SplitNodePortals().