Properties

CC3VertexArrayMeshModel Class Reference

A CC3VertexArrayMeshModel is a mesh model whose mesh data is kept in a set of CC3VertexArrays instances. More...

#import <CC3VertexArrayMeshModel.h>

Inheritance diagram for CC3VertexArrayMeshModel:
CC3MeshModel CC3Identifiable CC3PODMeshModel

List of all members.

Properties

BOOL interleaveVertices
CC3VertexColorsvertexColors
CC3VertexIndicesvertexIndices
CC3VertexLocationsvertexLocations
CC3VertexNormalsvertexNormals
CC3VertexTextureCoordinatesvertexTextureCoordinates

Detailed Description

Each of the contained CC3VertexArray instances manages the data for one aspect of the vertices (locations, normals, colors, texture mapping...).

Vertex data can be interleaved into a single underlying memory buffer that is shared between the contained CC3VertexArrays, or it can be separated into distinct memory buffers for each vertex aspect.

The only vertex array that is required is the vertexLocations property. The others are optional, depending on the nature of the mesh. If the vertexIndices property is provided, it will be used during drawing. Otherwise, the vertices will be drawn in linear order as they appear in the vertexLocations property.

CC3VertexArrayMeshModel manages data for one contiguous set of vertices that can be drawn with a single call to the GL engine, or a single set of draw-strip calls to the GL engine, using the same materail properties. To assemble a large, complex mesh containing several distinct vertex groups, assign each vertex group to its own CC3VertexArrayMeshModel instance, wrap each mesh model instance in a CC3MeshNode instance, and create an structural assembly of the nodes. See the class notes for CC3MeshNode for more information on assembling mesh nodes.


Property Documentation

- (BOOL) interleaveVertices [read, write, assign]

Indicates whether the vertex data is interleaved, or separated by aspect.

The initial value is NO, indicating that the vertex data is not interleaved.

If the vertex data is interleaved, each of the CC3VertexArray instances will reference the same underlying memory buffer through their individual elements property.

- (CC3VertexColors *) vertexColors [read, write, retain]

The vertex array instance managing the per-vertex color data for the vertices.

Setting this property is optional. Many meshes do not require per-vertex coloring.

- (CC3VertexIndices *) vertexIndices [read, write, retain]

The vertex array instance managing the index data for the vertices.

Setting this property is optional. If vertex index data is not provided, the vertices will be drawn in linear order as they appear in the vertexLocations property.

- (CC3VertexLocations *) vertexLocations [read, write, retain]

The vertex array instance managing the positional data for the vertices.

- (CC3VertexNormals *) vertexNormals [read, write, retain]

The vertex array instance managing the normal data for the vertices.

Setting this property is optional. Not all meshes require normals.

- (CC3VertexTextureCoordinates *) vertexTextureCoordinates [read, write, retain]

The vertex array instance managing the texture mapping data for the vertices.

Setting this property is optional. Not all meshes use textures.


The documentation for this class was generated from the following file: