The MeshElement class is used to define a Mesh.
These elements define a mesh's faces, polylines and points using indices that refer into its
The encoding scheme for the mesh element's indices are given by:
For face elements - A sequence of grouped indices from the base mesh. Every sequence of three index groups defines a triangle in the mesh. A grouped index is a single point, vertex normal, UV, and/or RGBA32 index from the base mesh, denoting a point and its local properties. For each property that is defined (i.e., non-null) in the base mesh, the grouped index must contain an index into that property. The order in which the indices appear are given by the following ordering: point, normal, UV, and then RGBA32. Only complete triangles are allowed in the encoding.
For polyline elements - A sequence of point indices from the base mesh. The order in which the points are denoted describe the polygonal line in the mesh. Using (~(uint32_t)0) in a polyline index list is a special token used to break a polyline into a new polyline.
For point elements - A sequence of point indices from the base mesh. Each index defines a geometry point in the mesh.
Note: A point element is not to be confused with a base mesh's point array. The base mesh point array is solely used to index into in order to define actual mesh element geometry.
These indices must match the flags provided to the Mesh. By default Faces use normals, UVs and rgba32s and lines and points use rgba32s.
If normals only exist 'PNPNPN' defines a triangle else 'PPP' for points only or 'PUPUPU' for UVs or 'PNUPNU' for normals and UVs or 'PRPR' for points and rgba32s or 'PNRPNR' etc.
A polyline or points is drawn on base mesh points 'P' or 'PR'.