QuakeForge  0.7.2.210-815cf
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Qfbsp_winding

Functions

winding_tBaseWindingForPlane (const plane_t *p)
 
winding_tClipWinding (winding_t *in, plane_t *split, qboolean keepon)
 Clip the winding to the plain. More...
 
winding_tCopyWinding (const winding_t *w)
 Create a new winding with the same points as the given winding. More...
 
winding_tCopyWindingReverse (const winding_t *w)
 Create a new winding with the reverse points of the given winding. More...
 
void DivideWinding (winding_t *in, plane_t *split, winding_t **front, winding_t **back)
 Divide a winding by a plane, producing one or two windings. More...
 
void FreeWinding (winding_t *w)
 Free the winding. More...
 
winding_tNewWinding (int points)
 Create a new, empty winding with space for the specified number of points. More...
 
winding_tWindingVectors (const winding_t *w, int unit)
 Create a new "winding" that holds the unit vectors of the edges of the given winding. More...
 

Variables

int c_activewindings
 
int c_peakwindings
 

Detailed Description

Function Documentation

winding_t* BaseWindingForPlane ( const plane_t p)
winding_t* ClipWinding ( winding_t in,
struct plane_s split,
qboolean  keepon 
)

Clip the winding to the plain.

The new winding will be the part of the input winding that is on the front side of the plane.

The direction of the winding is preserved.

Note
It is the caller's responsibiltiy to free the new winding.
The input winding will be freed.
Parameters
inThe winding to be clipped.
splitThe plane by which the winding will be clipped.
keeponIf true, an exactly on-plane winding will be saved, otherwise it will be clipped away.
Returns
The new winding representing the part of the input winding on the font side of the plane, or NULL if the winding has been clipped away.
winding_t* CopyWinding ( const winding_t w)

Create a new winding with the same points as the given winding.

Parameters
wThe winding to copy.
Returns
The new winding.
Note
It is the caller's responsibiltiy to free the new winding.
winding_t* CopyWindingReverse ( const winding_t w)

Create a new winding with the reverse points of the given winding.

This is useful when a winding for the back side of a plane is required.

Parameters
wThe winding to copy.
Returns
The new winding.
Note
It is the caller's responsibiltiy to free the new winding.
void DivideWinding ( winding_t in,
struct plane_s split,
winding_t **  front,
winding_t **  back 
)

Divide a winding by a plane, producing one or two windings.

Note
The original winding is not damaged or freed.
If one of front or back is NULL, the other will point to the input winding.
If neither front nor back are NULL, then both will be new windings and the caller will be responsible for freeing them.
Parameters
inThe winding to be divided.
splitThe plane by which the winding will be divided.
frontSet to the part of the input winding that is in front of the plane, or NULL if no part of the winding is in front of the plane.
backSet to the part of the input winding that is behind the plane, or NULL if no part of the winding is behind the plane.
void FreeWinding ( winding_t w)

Free the winding.

Parameters
wThe winding to be freed.
winding_t* NewWinding ( int  points)

Create a new, empty winding with space for the specified number of points.

Parameters
pointsThe number of points for which to leave space.
Returns
The new winding.
Note
It is the caller's responsibiltiy to free the new winding.
winding_t* WindingVectors ( const winding_t w,
int  unit 
)

Create a new "winding" that holds the unit vectors of the edges of the given winding.

Parameters
wThe winding to convert.
unitIf true, normalize the vectors.
Returns
The "winding" holding the (unit) vectors.
Note
It is the caller's responsibiltiy to free the new winding.

Variable Documentation

int c_activewindings
int c_peakwindings