#include <lib_ngon.h>
Public Member Functions | |
Ngon () | |
~Ngon () | |
Ngon (const CPolygon &ply) | |
Ngon (const Ngon &src) | |
Ngon & | operator= (const Ngon &src) |
Bool | Alloc (Int32 cnt, Int32 scnt) |
void | Free () |
Bool | CopyFrom (const Ngon *src) |
Bool | CopyFrom (Int32 cnt, Int32 scnt, Int32 *pts, Int32 *segs) |
void | Release () |
Float | CalcArea (Int32 seg, const Vector *p, Matrix &m) |
Public Attributes | |
Int32 * | points |
Int32 * | segments |
Int32 | count |
Int32 | segcount |
Ngon | ( | ) |
Constructor.
~Ngon | ( | ) |
Destructor.
Copy constructor from another N-gon in src.
[in] | src | Another N-gon. |
Assignment operator.
[in] | src | Another N-gon. |
Allocates data for cnt points and scnt segments.
[in] | cnt | The point count. |
[in] | scnt | The segment count. |
void Free | ( | ) |
Frees the internal data.
Copies data from src.
[in] | src | The source N-gon. |
Copies data from the passed arrays.
[in] | cnt | The point count. |
[in] | scnt | The segment count. |
[in] | pts | The points array. The caller owns the pointed array. |
[in] | segs | The segments array. The caller owns the pointed array. |
void Release | ( | ) |
Releases the internal arrays, i.e. so that they are not freed by the destructor.
Calculates the N-gon area.
[in] | seg | The segment. |
[in] | p | The points array. |
[in] | m | The projection matrix. |
Int32* points |
Point array.
Int32* segments |
Segments array.
Int32 count |
Point count.