polylib.h File Reference

#include "../map.h"
Include dependency graph for polylib.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define MAX_POINTS_ON_WINDING   64

Functions

winding_tAllocWinding (int points)
 Allocate a new winding (polygon).
vec_t WindingArea (const winding_t *w)
void WindingCenter (const winding_t *w, vec3_t center)
void ClipWindingEpsilon (const winding_t *in, const vec3_t normal, const vec_t dist, const vec_t epsilon, winding_t **front, winding_t **back)
winding_tChopWinding (winding_t *in, vec3_t normal, vec_t dist)
winding_tCopyWinding (const winding_t *w)
 Copy a winding with all its points allocated.
winding_tReverseWinding (const winding_t *w)
winding_tBaseWindingForPlane (const vec3_t normal, const vec_t dist)
void RemoveColinearPoints (winding_t *w)
void FreeWinding (winding_t *w)
void WindingBounds (const winding_t *w, vec3_t mins, vec3_t maxs)
void ChopWindingInPlace (winding_t **w, const vec3_t normal, const vec_t dist, const vec_t epsilon)

Detailed Description

Definition in file polylib.h.


Define Documentation

#define MAX_POINTS_ON_WINDING   64

Definition at line 30 of file polylib.h.

Referenced by ChopWindingInPlace(), ClipWindingEpsilon(), and RemoveColinearPoints().


Function Documentation

winding_t* AllocWinding ( int  points  ) 

Allocate a new winding (polygon).

Parameters:
[in] points Amount of points for this winding
See also:
FreeWinding

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().

winding_t* BaseWindingForPlane ( const vec3_t  normal,
const vec_t  dist 
)
winding_t* ChopWinding ( winding_t in,
vec3_t  normal,
vec_t  dist 
)
Returns:
the fragment of in that is on the front side of the cliping plane.
Note:
The original is freed.

Definition at line 421 of file polylib.c.

References ClipWindingEpsilon(), f, FreeWinding(), and ON_EPSILON.

void ChopWindingInPlace ( winding_t **  w,
const vec3_t  normal,
const vec_t  dist,
const vec_t  epsilon 
)
void ClipWindingEpsilon ( const winding_t in,
const vec3_t  normal,
const vec_t  dist,
const vec_t  epsilon,
winding_t **  front,
winding_t **  back 
)
winding_t* CopyWinding ( const winding_t w  ) 

Copy a winding with all its points allocated.

Parameters:
[in] w The winding to copy
Returns:
the new winding

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  ) 
void RemoveColinearPoints ( winding_t w  ) 
winding_t* ReverseWinding ( const winding_t w  ) 

Definition at line 215 of file polylib.c.

References AllocWinding(), i, winding_s::numpoints, winding_s::p, and VectorCopy.

Referenced by FaceFromPortal().

vec_t WindingArea ( const winding_t w  ) 
void WindingBounds ( const winding_t w,
vec3_t  mins,
vec3_t  maxs 
)

Definition at line 106 of file polylib.c.

References i, winding_s::numpoints, and winding_s::p.

Referenced by SubdividePatch().

void WindingCenter ( const winding_t w,
vec3_t  center 
)

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().


Generated by  doxygen 1.6.2