Synopsis
PDX_MSGT gdx_TessellatedShapeToPrimitives(long option, T_GDX_TESSELLATED_SHAPE *gdxTessellatedShape, int *primitiveCount, int **primitiveTypes, int **primitiveLengths, unsigned int **primitiveVertices, MTH_3DVEC **primitiveNormals)
Purpose
Convert GDX_TESSELLATED_SHAPE entity to prmitives.
Description
Process the polygons defined in the GDX_TESSELLATED_SHAPE entity and determine if primitives of type @d GDX_PRIM_FAN and/or @d GDX_PRIM_STRIP can be created. This function only works with 3 point polygons, other polygons will be ignored. Normals will be calculated for every vertex and averaged when vertices are shared between triangles. Memory is allocated for each array so the application is responsible for freeing the arrays if not NULL.
Input
option
Options (not used)
gdxTessellatedShape
Locked GDX_TESSELLATED_SHAPE entity
Output
primitiveCount
primitiveTypes
Array of primitive types dimensioned to
primitiveLengths
Array of vertex counts dimensioned to
primitiveVertices
Array of vertices indexed sequentially for each primitive length
primitiveNormals
Array of normals indexed sequentially for each primitive length
Return
Error code or GDX_NOERR