const SG_ALL_TRIANGLES* sgC3DObject::GetTriangles() const
Description:
Returns the pointer to the structure of a 3D object triangles description.
Arguments:
No arguments.
Returned value:
Returns the pointer to the structure of a 3D object triangles description.
The description of this structure:
typedef struct
{
int nTr;
SG_POINT* allVertex;
SG_VECTOR* allNormals;
double* allUV;
} SG_ALL_TRIANGLES;
nTr - the number of triangles describing a 3D object
allVertex - array of point triples each is a triangle vertex
allNormals - array of normals in the corresponding points of the allVertex array
allUV - array of the U and V texture coordinates in every triangle vertex.
If the object is not triangulated, NULL is returned. To triangulate the object, you need to use the sgC3DObject::Triangulate function
See also:
SG_POINT Triangulate SG_TRIANGULATION_TYPE