#include <c4d_ngonbase.h>
Public Member Functions | |
Bool | CopyTo (NgonBase *dst) |
Bool | Write (HyperFile *hf) |
Bool | Read (HyperFile *hf, Int32 id, Int32 level) |
Int32 | GetCount () |
Pgon * | GetNgons () |
Bool | Resize (Int32 cnt) |
Int32 | FindPolygon (Int32 id) |
Bool | Create (UInt32 *nedges, Int32 ncnt) |
Int32 | BuildNgonFromPolys (Int32 *polys, Int32 *outer, Int32 pcnt, Int32 ocnt, const CPolygon *vadr, const Vector *padr, Int32 *hpolys=nullptr, Int32 *inner=nullptr, Int32 hpcnt=0, Int32 icnt=0) |
Static Public Member Functions | |
static NgonBase * | Alloc () |
static void | Free (NgonBase *&p) |
Private Member Functions | |
NgonBase () | |
~NgonBase () | |
void | FreeData () |
Private Attributes | |
Pgon * | m_pNgons |
Int32 | m_nCount |
Contains functions for handling N-gons.
|
private |
|
private |
|
private |
|
static |
|
static |
Copies the N-gon data to another NgonBase.
[in,out] | dst | Destination N-gon helper. |
Int32 GetCount | ( | ) |
Gets the number of N-gons.
Pgon* GetNgons | ( | ) |
Gets the array of Pgon data.
Resizes the Pgon data array.
[in] | cnt | New N-gon count. |
Searches for polygon index id in all N-gons.
[in] | id | A polygon ID. |
Creates a new N-gon (appended to the N-gon array) from the edge array passed. The marker bits for the segment end and no edges must be correctly set.
[in] | nedges | New edge array. The caller owns the pointed array. |
[in] | ncnt | Edge array nedges size. |
Int32 BuildNgonFromPolys | ( | Int32 * | polys, |
Int32 * | outer, | ||
Int32 | pcnt, | ||
Int32 | ocnt, | ||
const CPolygon * | vadr, | ||
const Vector * | padr, | ||
Int32 * | hpolys = nullptr , |
||
Int32 * | inner = nullptr , |
||
Int32 | hpcnt = 0 , |
||
Int32 | icnt = 0 |
||
) |
Builds an N-gon from a list of polygons and optionally the outer edges.
[in] | polys | An array of polygons that form the N-gon. The caller owns the pointed array. |
[in] | outer | An array of the outline of the N-gon. Use the internal mark (PGONEDGE_ENDSEGMENT) to mark segments in the N-gon outline. The caller owns the pointed array. |
[in] | pcnt | Size of polys array. |
[in] | ocnt | Size of outer array. |
[in] | vadr | Polygon array. The caller owns the pointed array. |
[in] | padr | Point array. The caller owns the pointed array. |
[in] | hpolys | An array of polygons that surround holes in an N-gon. The caller owns the pointed array. |
[in] | inner | An array of point indices that form the outline of holes in an N-gon. The caller owns the pointed array. |
[in] | hpcnt | Number of polygons in hpolys array. |
[in] | icnt | Number of point indices in inner array. |
|
private |
|
private |