Adds a vertex to the body data object.
GSErrCode ACAPI_Body_AddEdge (
void* bodyData,
const UInt32 vertex1,
const UInt32 vertex2,
Int32& index
);
Parameters
- bodyData
- [in] The body data object to add the edge to.
- vertex1
- [in] Index of the first vertex of the edge.
- vertex2
- [in] Index of the second vertex of the edge.
- index
- [out] The index of the created edge, can be used later to create polygons.
Return Values
NoError- The function has completed with success.
APIERR_BADPARS- The passed parameter is
nullptr;bodyData - The index is out of range;
vertex1, vertex2
For other common API errors see the API Errors document.
Remarks
This function is used to add an edge to a body data object.
The vertex1 and vertex2 parameters shall be valid vertex indices provided by the ACAPI_Body_AddVertex function.
The edge can be used with at most 2 polygons, and in that case it has to be passed with opposite directions.
The returned index can be used to create polygons with the ACAPI_Body_AddPolygon function.
Example
See the example of the ACAPI_Body_AddPolygon function.
Requirements
- Version: API 16 or later
- Header: ACAPinc.h
See Also
ACAPI_Body_AddVertex, ACAPI_Body_AddPolyNormal, ACAPI_Body_AddPolygon,
ACAPI_Body_Create, ACAPI_Body_Finish, ACAPI_Body_Dispose,
Body Manager, API Functions