API Reference

Class List

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.

Summary

Properties

aabbThe axis-aligned bounding box for the object space vertices of this mesh.
indexBufferAn array of index buffers.
primitiveArray of primitive objects defining how vertex (and index) data in the mesh should be interpreted by the graphics device.
vertexBufferThe vertex buffer holding the vertex data of the mesh.

Details

Constructor

Mesh()

Create a new mesh.

Properties

pc.BoundingBoxaabb

The axis-aligned bounding box for the object space vertices of this mesh.

pc.IndexBuffer[]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.

Object[]primitive

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.

pc.VertexBuffervertexBuffer

The vertex buffer holding the vertex data of the mesh.