Class: Mesh

pc.Mesh

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.

Constructor

new Mesh()

Create a new mesh.
Properties:
Name Type Description
vertexBuffer pc.VertexBuffer The vertex buffer holding the vertex data of the mesh.
indexBuffer Array.<pc.IndexBuffer> 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.
primitive Array.<Object> 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 pc.GraphicsDevice#draw. The primitive is ordered based on render style like the indexBuffer property.
aabb pc.BoundingBox The axis-aligned bounding box for the object space vertices of this mesh.
Source: