A graphical primitive. The mesh is defined by a pc.VertexBuffer and an optional pc.IndexBuffer. It also contains a primitive definition which controls the type of the primitive and the portion of the vertex or index buffer to use.
|aabb||The axis-aligned bounding box for the object space vertices of this mesh.|
|indexBuffer||An array of index buffers.|
|primitive||Array of primitive objects defining how vertex (and index) data in the mesh should be interpreted by the graphics device.|
|primitive.base||The offset of the first index or vertex to dispatch in the draw call.|
|primitive.count||The number of indices or vertices to dispatch in the draw call.|
|primitive.indexed||True to interpret the primitive as indexed, thereby using the currently set index buffer and false otherwise.|
|primitive.type||The type of primitive to render.|
|vertexBuffer||The vertex buffer holding the vertex data of the mesh.|
Create a new mesh.
An array of index buffers. For unindexed meshes, this array can be empty. The first index buffer in the array is used by pc.MeshInstances with a renderStyle property set to pc.RENDERSTYLE_SOLID. The second index buffer in the array is used if renderStyle is set to pc.RENDERSTYLE_WIREFRAME.
Array of primitive objects defining how vertex (and index) data in the mesh should be interpreted by the graphics device. For details on the primitive object, see
True to interpret the primitive as indexed, thereby using the currently set index buffer and false otherwise. pc.GraphicsDevice#draw. The primitive is ordered based on render style like the indexBuffer property.
The type of primitive to render. Can be: