![]() |
Public API Reference |
#include <polyedge.h>
Public Methods | |
csPoly2DEdges (int start_size=10) | |
Make a new empty polygon. More... | |
csPoly2DEdges (csPoly2DEdges ©) | |
Copy constructor. More... | |
virtual | ~csPoly2DEdges () |
Destructor. More... | |
void | MakeEmpty () |
Initialize the polygon to empty. More... | |
int | GetEdgeCount () |
Get the number of edges. More... | |
csSegment2 * | GetEdges () |
Get the array with all edges. More... | |
csSegment2 * | GetEdge (int i) |
Get the specified edge. More... | |
csSegment2 & | operator[] (int i) |
Get the specified edge. More... | |
csSegment2 * | GetFirst () |
Get the first edge. More... | |
csSegment2 * | GetLast () |
Get the last edge. More... | |
bool | In (const csVector2 &v) |
Test if this vector is inside the polygon. More... | |
void | MakeRoom (int new_max) |
Make room for at least the specified number of edges. More... | |
void | SetEdgeCount (int n) |
Set the number of edges. More... | |
int | AddEdge (const csSegment2 &e) |
Add a edge (2D) to the polygon. More... | |
int | AddEdge (const csVector2 &v1, const csVector2 &v2) |
Add a edge (2D) to the polygon. More... | |
void | Intersect (const csPlane2 &plane, csPoly2DEdges &left, csPoly2DEdges &right, bool &onplane) const |
Intersect this polygon with a given plane and return the two resulting polygons in left and right. More... | |
Static Public Methods | |
bool | In (csSegment2 *poly, int num_edge, const csVector2 &v) |
Test if a vector is inside the given polygon. More... | |
Protected Attributes | |
csSegment2 * | edges |
The edges. More... |
Definition at line 35 of file polyedge.h.
|
Make a new empty polygon.
|
|
Copy constructor.
|
|
Destructor.
|
|
Add a edge (2D) to the polygon. Return index of added edge. |
|
Add a edge (2D) to the polygon. Return index of added edge. Definition at line 126 of file polyedge.h. References csSegment2::End, and csSegment2::Start. |
|
Get the specified edge.
Definition at line 75 of file polyedge.h. |
|
Get the number of edges.
Definition at line 65 of file polyedge.h. |
|
Get the array with all edges.
Definition at line 70 of file polyedge.h. |
|
Get the first edge.
Definition at line 93 of file polyedge.h. |
|
Get the last edge.
Definition at line 99 of file polyedge.h. |
|
Test if a vector is inside the given polygon.
|
|
Test if this vector is inside the polygon.
|
|
Intersect this polygon with a given plane and return the two resulting polygons in left and right. This version is robust. If one of the edges of this polygon happens to be on the same plane as 'plane' then this edge will be ignored and 'onplane' will be set to true.
Note that this routine may result in unconnected polygons. i.e. edges that are not adjacent. |
|
Initialize the polygon to empty.
|
|
Make room for at least the specified number of edges.
Referenced by SetEdgeCount. |
|
Get the specified edge.
Definition at line 84 of file polyedge.h. |
|
Set the number of edges.
Definition at line 120 of file polyedge.h. References MakeRoom. |
|
The edges.
Definition at line 39 of file polyedge.h. |