An IndexPrim indexes vertices from Meta_VertexAttrib siblings.
Conventionally, these nodes are called IPn (e.g IP1 for the first primitive in the mesh). However, they are appended to the internal mesh index buffer in the order they are encountered in the tree, regardless of name.
Primitives are constructed by indexing the appropriate number of vertices from the VertexAttrib data. These indexes refer to individual vertices rather than a vertex component, so if a VertexAttrib contains position data 0,0,0,1,1,1, index 0 refers to point 0,0,0 and index 1 refers to 1,1,1.
The following Prim values are supported by the renderer:
trilist - Describes primitive constructed of triangles. Each triangle is indexed using 3 integer values (e.g. 0,1,2,0,3,1 makes two connected triangles that share two vertices)
linelist - Describes primitive constructed with lines. Each line segment is indexed using 2 integer values (e.g. 0,1,1,2 makes two connected line segments)
pointlist - Describes primitive constructed with points. Each point is a single integer index.
The collision system only supports meshes that provide triangles - lines and points will not be pickable with the cursor.
bool - When enabled, this primitive is drawn by the mesh
string - Primitive type - see above description
vector - The indexes that make up the primitives