Decomposes a polygon of the 3D model into convex polygons.
GSErrCode ACAPI_3D_DecomposePgon ( Int32 ipgon, Int32*** cpoly );
- [in] Index of a polygon in the 3D model.
- [out] Points to an array which contains the vertices of subpolygons.
- The function has completed with success.
- The passed parameter is
- The 3D model is not available in the current context, or
- The polygon type cannot be queried directly; no active body
- The polygon index is out of range
- Not enough memory
For other common API errors see the API Errors document.
This function is used to decompose a polygon into convex polygons. The polygon is defined by
The decomposed polygon is returned in the
cpoly Int32 array, which contains the following values:
[-n], [-m1], i1, i2, ... i(m1), [-m2], j1, j2, ... j(m2)...
- negative values mean some kind of measurement
- positive values mean vertex indices
The number of subpolygons
The number of vertices of the following subpolygon
The actual VERT indices of the subpolygons.
Do not forget to dispose the returned handle if it is not needed any more.
- Version: API 1.3 or later
- Header: ACAPinc.h