Adds a polygon normal vector to the body data object.
GSErrCode ACAPI_Body_AddPolyNormal ( void* bodyData, const API_Vector3D& normal, Int32& index );
Parameters
- bodyData
- [in] The body data object to add the normal vector to.
- normal
- [in] The normal vector to add.
- index
- [out] The index of the created normal vector, 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 vector length is 0;
normal
For other common API errors see the API Errors document.
Remarks
This function is used to add a normal vector to a body data object.
A normal vector can be used for multiple polygons and can be passed with positive and negative direction too.
The normal vector is perpendicular to the polygon plane and points the direction you want to see the polygon from. (In case of a complete body, the normal vectors point ot of the body)
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_AddEdge, ACAPI_Body_AddPolygon,
ACAPI_Body_Create, ACAPI_Body_Finish, ACAPI_Body_Dispose,
Body Manager, API Functions