Synopsis

PDX_MSGT gdx_PolyShellToPrimitives(long option, T_GDX_POLY_SHELL *gdxPolyShell, int *primitiveCount, int **primitiveTypes, int **primitiveLengths, unsigned int **primitiveVertices, MTH_3DVEC **primitiveNormals)

Purpose

Convert GDX_POLY_SHELL entity to prmitives.

Description

Process the polygons defined in the GDX_POLY_SHELL 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)

gdxPolyShell

Locked GDX_POLY_SHELL 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