CPoly Class Reference
Collaboration diagram for CPoly:
[legend]List of all members.
Detailed Description
The polygon class defines a polygon using a DLL of edges in CW order. Polygons should be convex and defined CW to use all of the features.
Definition at line 31 of file CPoly.h.
Member Function Documentation
|
Links an edge to the tail. - See also:
- add_tail()
|
|
Links an edge to the head. - See also:
- add_tail()
|
|
Links an edge to the tail. - See also:
- add_head()
|
|
Unlinks an edge from the DLL. Note that this does not free any memory. - See also:
- remove()
|
void CPoly::remove |
( |
CEdge * |
edge |
) |
|
|
|
Removes an edge. This unlinks the edge and then frees it's memory. () |
|
Clear the DLL of edges. This will free all memory. |
|
Initializes the polygon. This will calculate the plane and edge normals. This should be done when the polygon creation has finished. If the number of edges < 3 this function will bail. |
|
Calculates a bounding sphere. The polygon is entirely contained within the bounding sphere. - Returns:
- The bounding sphere.
|
int CPoly::onFront |
( |
CPlane * |
plane |
) |
|
|
|
Returns true if the polygon is in front of the plane, considering epsilon. |
int CPoly::onBack |
( |
CPlane * |
plane |
) |
|
|
|
Returns true if the polygon is behind of the plane, considering epsilon. |
|
Clip the polygon by plane, returning the remaining polygon (all that is in front of the plane). FIXME: changing this to clip everything BEHIND the plane will probably affect brush code. Will have to fix it. :) |
|
Clip the polygon by plane, returning both the parts that are in front and behind the plane. |
|
Clip the polygon by another polygon that is coplanar, possibly overlapping. out = this - poly. in = this - out. For instance:
++++ ++++
++---- => outside = ++ inside = ++ poly = ----
++---- ++ ++ ----
---- ----
|
|
Unlinks this polygon from a DLL. |
The documentation for this class was generated from the following file:
Generated on Tue Feb 8 21:59:43 2005 for MarSTDv2004 by
1.4.1