Initializes a new body data object for editing.

    GSErrCode  ACAPI_Body_Create (
        const Modeler::MeshBody*           body,
        const API_OverriddenAttribute*     bodyMaterialMapTable,
        void**                             bodyData



[in] The body object to start the editing with. nullptr can be passed to create a new body.
bodyMaterialMapTable Featuring API 17
[in] The initial material override structure list of the polygons of the body. nullptr can be passed in case of a new body.
bodyData Changed in API 22
[out] The body data object, that shall be passed to further editing functions.


Return Values

The function has completed with success.
The passed parameter is nullptr; bodyData

For other common API errors see the API Errors document.



This function is used to create a body data object for further editing.

Input parameters can be nullptr, but can be passed from the API_ElementMemo of a morph element.



API_ElementMemo memo = {};

// create a new body data object
void* bodyData = nullptr;
err = ACAPI_Body_Create (nullptr, nullptr, &bodyData);

/* add vertices, edges and polygons here... */

// insert the resulting body, pens and materials to the memo
err = ACAPI_Body_Finish (bodyData, &memo.morphBody, &memo.morphMaterialMapTable);

// dispose the body data object
err = ACAPI_Body_Dispose (&bodyData);

/* create the new morph object from the memo... */



Version: API 16 or later
Header: ACAPinc.h


See Also

ACAPI_Body_Finish, ACAPI_Body_Dispose,
ACAPI_Body_AddVertex, ACAPI_Body_AddEdge, ACAPI_Body_AddPolyNormal, ACAPI_Body_AddPolygon,
Body Manager, API Functions