#include "shared.h"
#include "polylib.h"
Go to the source code of this file.
Defines | |
#define | BOGUS_RANGE 8192 |
Functions | |
winding_t * | AllocWinding (int points) |
Allocate a new winding (polygon). | |
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. | |
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) |
Variables | |
static int | c_active_windings |
static int | c_peak_windings |
Definition in file polylib.c.
#define BOGUS_RANGE 8192 |
Definition at line 33 of file polylib.c.
Referenced by BaseWindingForPlane().
winding_t* AllocWinding | ( | int | points | ) |
Allocate a new winding (polygon).
[in] | points | Amount of points for this winding |
Definition at line 40 of file polylib.c.
References c_active_windings, c_peak_windings, Mem_Alloc, and threadstate.
Referenced by BaseWindingForPlane(), Check_SidesOverlap(), ChopWindingInPlace(), ClipWindingEpsilon(), CopyWinding(), ReverseWinding(), TryMergeWinding(), and WindingFromFace().
Definition at line 137 of file polylib.c.
References AllocWinding(), BOGUS_RANGE, CrossProduct(), DotProduct, i, winding_s::numpoints, winding_s::p, Sys_Error(), vec3_origin, VectorAdd, VectorCopy, VectorMA(), VectorNormalize(), VectorScale, and VectorSubtract.
Referenced by BaseWindingForNode(), CreateBrushWindings(), MakeBrushWindings(), MakeHeadnodePortals(), SplitBrush(), and WriteBSPBrushMap().
Definition at line 421 of file polylib.c.
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 325 of file polylib.c.
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 227 of file polylib.c.
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 207 of file polylib.c.
References AllocWinding(), and winding_s::numpoints.
Referenced by ClipWindingEpsilon(), CopyBrush(), FaceFromPortal(), MakeBspBrushList(), and SplitBrush().
void FreeWinding | ( | winding_t * | w | ) |
Definition at line 53 of file polylib.c.
References c_active_windings, Mem_Free, Sys_Error(), and threadstate.
Referenced by ChopWinding(), ChopWindingInPlace(), FreeBrush(), FreeFace(), FreePortal(), MakeNodePortal(), SplitNodePortals(), and WriteBSPBrushMap().
void RemoveColinearPoints | ( | winding_t * | w | ) |
Definition at line 64 of file polylib.c.
References DotProduct, i, MAX_POINTS_ON_WINDING, winding_s::numpoints, winding_s::p, VectorCopy, VectorNormalize(), and VectorSubtract.
Referenced by WindingFromFace().
Definition at line 215 of file polylib.c.
References AllocWinding(), i, winding_s::numpoints, winding_s::p, and VectorCopy.
Referenced by FaceFromPortal().
Definition at line 90 of file polylib.c.
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 106 of file polylib.c.
References i, winding_s::numpoints, and winding_s::p.
Referenced by SubdividePatch().
Definition at line 124 of file polylib.c.
References i, winding_s::numpoints, winding_s::p, scale, vec3_origin, VectorAdd, VectorCopy, and VectorScale.
Referenced by BuildPatch(), and FinishSubdividePatch().
int c_active_windings [static] |
Definition at line 30 of file polylib.c.
Referenced by AllocWinding(), and FreeWinding().
int c_peak_windings [static] |
Definition at line 31 of file polylib.c.
Referenced by AllocWinding().