Inherits from CC3VertexArray : CC3Identifiable : NSObject
Declared in CC3VertexArrays.h

Overview

A CC3VertexArray that manages the per-vertex color aspect of an array of vertices.

Properties

color

The color of the vertices of this mesh.

@property (nonatomic, assign) CCColorRef color

Discussion

Querying this property returns the RGB components of the first vertex.

When setting this property, the RGB values of each vertex are set to the specified color, without affecting the opacity value of each individual vertex. If the content of this vertex array has been copied to a GL buffer, that buffer is automatically updated.

Declared In

CC3VertexArrays.h

opacity

The opacity of the vertices in this mesh.

@property (nonatomic, assign) CCOpacity opacity

Discussion

Querying this property returns the alpha component of the first vertex.

When setting this property, the alpha values of each vertex is set to the specified opacity, without affecting the RGB color value of each individual vertex. If the content of this vertex array has been copied to a GL buffer, that buffer is automatically updated.

Declared In

CC3VertexArrays.h

Instance Methods

color4BAt:

Returns the color element at the specified index in the underlying vertex content.

- (ccColor4B)color4BAt:(GLuint)index

Discussion

If the underlying vertex content is not of type GLubyte, the color components are converted to GLubyte before the color value is returned.

The index refers to vertices, not bytes. The implementation takes into consideration the vertexStride and elementOffset properties to access the correct element.

If the releaseRedundantContent method has been invoked and the underlying vertex content has been released, this method will raise an assertion exception.

Declared In

CC3VertexArrays.h

color4FAt:

Returns the color element at the specified index in the underlying vertex content.

- (ccColor4F)color4FAt:(GLuint)index

Discussion

If the underlying vertex content is not of type GLfloat, the color components are converted to GLfloat before the color value is returned.

The index refers to vertices, not bytes. The implementation takes into consideration the vertexStride and elementOffset properties to access the correct element.

If the releaseRedundantContent method has been invoked and the underlying vertex content has been released, this method will raise an assertion exception.

Declared In

CC3VertexArrays.h

initFromCPODData:fromSPODMesh:

Initializes this instance from the specified CPODData and SPODMesh structures.

- (id)initFromCPODData:(PODClassPtr)aCPODData fromSPODMesh:(PODStructPtr)aSPODMesh

Declared In

CC3VertexArraysPODExtensions.h

setColor4B:at:

Sets the color element at the specified index in the underlying vertex content to the specified color value.

- (void)setColor4B:(ccColor4B)aColor at:(GLuint)index

Discussion

If the underlying vertex content is not of type GLubyte, the color components are converted to the appropriate type (typically GLfloat) before being set in the vertex content.

The index refers to vertices, not bytes. The implementation takes into consideration the vertexStride and elementOffset properties to access the correct element.

If the releaseRedundantContent method has been invoked and the underlying vertex content has been released, this method will raise an assertion exception.

Declared In

CC3VertexArrays.h

setColor4F:at:

Sets the color element at the specified index in the underlying vertex content to the specified color value.

- (void)setColor4F:(ccColor4F)aColor at:(GLuint)index

Discussion

If the underlying vertex content is not of type GLfloat, the color components are converted to the appropriate type (typically GLubyte) before being set in the vertex content.

The index refers to vertices, not bytes. The implementation takes into consideration the vertexStride and elementOffset properties to access the correct element.

If the releaseRedundantContent method has been invoked and the underlying vertex content has been released, this method will raise an assertion exception.

Declared In

CC3VertexArrays.h