 |
PK_MESH_facet_index_t |
|
struct PK_MESH_facet_index_s
{
PK_LOGICAL_t is_relative_index; --- Indicates whether
--- 'facet_indices' are
--- relative to this block.
int n_vertex_positions; --- Number of vertices in
--- block.
PK_VECTOR_t *vertex_positions; --- Positions of vertices.
PK_VECTOR1_t *vertex_normals; --- Normals of vertices
--- (may be NULL).
int n_facet_indices; --- Number of facet indices
--- in block.
int *facet_indices; --- Indices of vertices of
--- facets. Indices should
--- be in groups of three.
};
typedef struct PK_MESH_facet_index_s PK_MESH_facet_index_t;
This structure contains the data for a block of facets described in an
indexed form.
Used in:
PK_MESH_facet_t
This is the datatype for a facet index block of mesh data. The
facet indexed format describes each facet as a triple of vertex indices,
relative to the 'vertex_positions' array ordering.
If 'is_relative_index' is PK_LOGICAL_true, then the facet_indices must be
set in the same block.
See here for more information.
Description of fields:
'is_relative_index' Indicates whether the indices 'facet_indices' are
relative or absolute. When set to PK_LOGICAL_true,
it is not possible to define 'facet_indices' that
refer to 'vertex_positions' defined in previous
blocks. An absolute index is relative to the first
vertex added to the mesh in the first facet block
returned by the application callback function.
'n_vertex_positions' The number of vertices in the array
'vertex_positions'. If 'vertex_normals' is not NULL
then it is also the number of vertex normals.
'vertex_positions' The positions of the vertices of the mesh in this
block. There can be duplicates if the vertex has
multiple normals.
'vertex_normals' If not NULL, the normals of the vertices of the mesh
in this block.
'n_facet_indices' The number of facet indices in the array
'facet_indices'. Must be a multiple of three.
'facet_indices' The indices of the vertices of a facet in the
'vertex_positions' array. Each group of three
indices defines one facet.