Public Member Functions | Properties

CC3VertexColors Class Reference

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

#import <CC3VertexArrays.h>

Inheritance diagram for CC3VertexColors:
Inheritance graph
[legend]
Collaboration diagram for CC3VertexColors:
Collaboration graph
[legend]

List of all members.

Public Member Functions

(ccColor4B) - color4BAt:
(ccColor4F) - color4FAt:
(void) - setColor4B:at:
(void) - setColor4F:at:

Properties

ccColor3B color
GLubyte opacity

Detailed Description

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


Member Function Documentation

- (ccColor4B) color4BAt: (GLuint)  index

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

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 releaseRedundantData method has been invoked and the underlying vertex content has been released, this method will raise an assertion exception.

- (ccColor4F) color4FAt: (GLuint)  index

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

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 releaseRedundantData method has been invoked and the underlying vertex content has been released, this method will raise an assertion exception.

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

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

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 releaseRedundantData method has been invoked and the underlying vertex content has been released, this method will raise an assertion exception.

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

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

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 releaseRedundantData method has been invoked and the underlying vertex content has been released, this method will raise an assertion exception.


Property Documentation

- (ccColor3B) color [read, write, assign]

Implementation of the CCRGBAProtocol color property.

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.

- (GLubyte) opacity [read, write, assign]

Implementation of the CCRGBAProtocol opacity property.

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.


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