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.
primitive[].baseThe offset of the first index or vertex to dispatch in the draw call.
primitive[].countThe number of indices or vertices to dispatch in the draw call.
primitive[].indexedTrue to interpret the primitive as indexed, thereby using the currently set index buffer and false otherwise.
primitive[].typeThe type of primitive to render.
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

Numberprimitive[].base

The offset of the first index or vertex to dispatch in the draw call.

Numberprimitive[].count

The number of indices or vertices to dispatch in the draw call.

Booleanprimitive[].indexed

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.

pc.VertexBuffervertexBuffer

The vertex buffer holding the vertex data of the mesh.