#include <lib_ngon.h>
Public Member Functions | |
Vector | CalcNormal (const Vector *padr, const CPolygon *polys) const |
void | GetMpRad (const Vector *padr, const CPolygon *polys, Vector &mp, Vector &rad) const |
Int32 | GetCount () const |
PgonEdge * | GetEdge (Int32 i) |
Int32 | ID (Int32 i) const |
Int32 | State (Int32 i) const |
Int32 | Edge (Int32 i) const |
Int32 | EdgeIndex (Int32 i) const |
Int32 | IsFirst (Int32 i) const |
Int32 | IsSegmentEnd (Int32 i) const |
Int32 | GetIdentity () const |
Int32 | GetSegmentCount () const |
Int32 | GetSegmentLen (Int32 startedge) const |
void | GetEdge (Int32 i, const CPolygon *vadr, Int32 &p1, Int32 &p2) |
Int32 | FindPolygon (Int32 id) const |
UChar | GetEdgeState (Int32 id) const |
Int32 | GetPointCount () const |
Int32 | GetPolygonCount () const |
void | UpdateStates () |
Private Attributes | |
PgonEdge * | m_Edge |
Int32 | m_Count |
UInt32 | m_CRC |
Calculates the normal for the N-gon.
[in] | padr | The point array. The caller owns the pointed array. |
[in] | polys | The polygons array. The caller owns the pointed array. |
Get the bounds of the N-gon.
[in] | padr | The point array. The caller owns the pointed array. |
[in] | polys | The polygons array. The caller owns the pointed array. |
[out] | mp | Assigned the calculated mid-point. |
[out] | rad | Assigned the calculated bounding box vector. |
Int32 GetCount | ( | ) | const |
Retrieves the number of elements in the array (all PgonEdge edges in all segments).
Gets access directly to a PgonEdge. Normally the helper functions below should be used.
[in] | i | An edge index. |
Retrieves the PgonEdge::ID() of the edge at index i.
[in] | i | An edge index. |
Retrieves the PgonEdge::State() of the edge at index i.
[in] | i | An edge index. |
Retrieves the PgonEdge::Edge() of the edge at index i.
[in] | i | An edge index. |
Retrieves the PgonEdge::EdgeIndex() of the edge at index i.
[in] | i | An edge index. |
Retrieves the PgonEdge::IsFirst() state of the edge at index i.
[in] | i | An edge index. |
Retrieves the PgonEdge::IsSegmentEnd() state of the edge at index i.
[in] | i | An edge index. |
Int32 GetIdentity | ( | ) | const |
Retrieves the first polygon ID in the array, useful as a marker (identity) for the N-gon giving a polygon ID that is within the N-gon.
Int32 GetSegmentCount | ( | ) | const |
Retrieves the number of segments in the N-gon.
Retrieves the number of elements in the segment starting from the index startedge. This includes any PgonEdge edges that are internal (NOEDGE).
[in] | startedge | An edge index. |
Maps to the function PgonEdge::GetEdge() of the edge at index i.
[in] | i | An edge index. |
[in] | vadr | The polygon array. The caller owns the pointed array. |
[out] | p1 | Assigned the first point index. |
[out] | p2 | Assigned the second point index. |
Does a search to see if the polygon index id exists within the N-gon; the look up uses tables so it is pretty fast.
[in] | id | A polygon ID to search for. |
Retrieves the edges (bits) for polygon id that form any edge/s around the N-gon.
[in] | id | Combined edge bits for all edges with polygon ID matching id: PGONEDGE |
Int32 GetPointCount | ( | ) | const |
Retrieves the number of points that form the N-gon.
Int32 GetPolygonCount | ( | ) | const |
Retrieves the number of polygons that form the N-gon.
void UpdateStates | ( | ) |
If any changes are done to the PgonEdges this must be called when completed to update the REPEAT markers of the PgonEdges.
Also note that any changes must correct set/change any of the marker bits (such as the segment end, or no edges markers).
|
private |
|
private |
|
private |