Modeling

Detailed Description

Groups

 MODELING_COMMIT
 
 MODELING_ERROR
 
 MODELING_GETNGON_FLAG
 
 MODELING_SETNGON_FLAG
 
 MODELING_SETPOINT_FLAG
 
 TRANSMAP_FLAG
 
 TRANSMAP_PLYFLAG
 
 TRANSMAP_PNTFLAG
 

Classes

struct  PointMove
 
struct  TransIndexMapData
 
struct  TransMapData
 
struct  TransMapNewData
 
struct  TransPointInterData
 
struct  TransPointDeltaData
 
class  TranslationMaps
 
class  Modeling
 

Macros

#define NOTINDEX
 
#define LIBRARY_MODELLING
 

Typedefs

typedef Bool(* TriangulateHook) (BaseObject *pObj, Int32 lNgonID, Ngon *ngon, const Vector *pvPoints, Int32 lPointCount, CPolygon *&pPolys, Int32 &lPolyCount, Bool &bTriang, void *pData)
 

Macro Definition Documentation

◆ NOTINDEX

#define NOTINDEX

Invalid index.

◆ LIBRARY_MODELLING

#define LIBRARY_MODELLING

Modeling library ID.

Typedef Documentation

◆ TriangulateHook

typedef Bool(* TriangulateHook) (BaseObject *pObj, Int32 lNgonID, Ngon *ngon, const Vector *pvPoints, Int32 lPointCount, CPolygon *&pPolys, Int32 &lPolyCount, Bool &bTriang, void *pData)

Called to triangulate the N-gon in ngon, returning the result in pPolys.
Here is part of a trivial example of a triangulation algorithm that preserves quads:

#define AllocPolys(_p) lPolyCount = (_p); pPolys = (CPolygon*)NewMemClear((_p) * sizeof(CPolygon)); if (!pPolys) return false;
Bool MyTriangulate(BaseObject *pObj, Int32 lNgonID, Ngon *ngon, Vector *pvPoints, Int32 lPointCount, CPolygon *&pPolys, Int32 &lPolyCount, Bool &bTriang, void *pData)
{
if (ngon->count == 3)
{
AllocPolys(1);
pPolys[0] = CPolygon(0, 1, 2, 2);
bTriang = true;
return true;
}
else if (ngon->count == 4)
{
AllocPolys(1);
pPolys[0] = CPolygon(0, 1, 2, 3);
bTriang = true;
return true;
}
else
{
...
}
}
Definition: c4d_baseobject.h:248
Definition: lib_ngon.h:27
Int32 count
Point count.
Definition: lib_ngon.h:104
maxon::Bool Bool
Definition: ge_sys_math.h:51
maxon::Int32 Int32
Definition: ge_sys_math.h:56
Represents a polygon that can be either a triangle or a quadrangle.
Definition: c4d_baseobject.h:44
Parameters
[in]pObjAn initialized object.
[in]lNgonIDThe N-gon ID of ngon.
[in]ngonThe N-gon to triangulate.
[in]pvPointsThe points of pObj.
[in]lPointCountThe array size of pvPoints.
[out]pPolysAlways nullptr in the call. Assign the resulting triangulated polygon array here.
It should be an array of CPolygon, allocated with NewMemClear(). The caller takes over the ownership of the pointed array.
[out]lPolyCountAssign the size of pPolys here.
[in]bTriangAssign true if ngon was triangulated, otherwise false.
[in]pDataThe private hook data, passed from Modeling::SetTriangulateHook().
Returns
true if successful, otherwise false.