Data Structures | |
struct | winding_s |
Macros | |
#define | ON_EPSILON 0.05 |
Typedefs | |
typedef struct winding_s | winding_t |
Functions | |
winding_t * | BaseWindingForPlane (const struct plane_s *p) |
Create a very large four-point winding with all point on the plane. More... | |
winding_t * | ClipWinding (winding_t *in, struct plane_s *split, qboolean keepon) |
Clip the winding to the plain. More... | |
winding_t * | CopyWinding (const winding_t *w) |
Create a new winding with the same points as the given winding. More... | |
winding_t * | CopyWindingReverse (const winding_t *w) |
Create a new winding with the reverse points of the given winding. More... | |
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. More... | |
void | FreeWinding (winding_t *w) |
Free the winding. More... | |
winding_t * | NewWinding (int points) |
Create a new, empty winding with space for the specified number of points. More... | |
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. More... | |
#define ON_EPSILON 0.05 |
Create a very large four-point winding with all point on the plane.
The winding will be a box with aligned with the axes of the plane. The order of yhe points is clockwise when viewed from the front side of the plane.
In terms of s and t, the axes of the plane will be such that t (up) is the projection of either the z-axis or the x-axis (whichever is "closer"), and s is to the right (n = s cross t).
p | The plane on which to create the winding. |
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.
in | The winding to be clipped. |
split | The plane by which the winding will be clipped. |
keepon | If true, an exactly on-plane winding will be saved, otherwise it will be clipped away. |
Create a new winding with the same points as the given winding.
w | The winding to copy. |
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.
w | The winding to copy. |
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.
in | The winding to be divided. |
split | The plane by which the winding will be divided. |
front | Set 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. |
back | Set 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.
w | The winding to be freed. |
Create a new, empty winding with space for the specified number of points.
points | The number of points for which to leave space. |
Create a new "winding" that holds the unit vectors of the edges of the given winding.
w | The winding to convert. |
unit | If true, normalize the vectors. |