CC3CommonVertexArrayParticleProtocol Protocol Reference
Conforms to | CC3ParticleProtocol |
Declared in | CC3Particles.h |
Overview
CC3CommonVertexArrayParticleProtocol defines the requirements for particles that are emitted and managed by the CC3CommonVertexArrayParticleEmitter class.
A CC3CommonVertexArrayParticleEmitter maintains the vertices of all particles in common vertex arrays.
Tasks
-
vertexCount
property required method -
vertexRange
property required method -
vertexIndexCount
property required method -
vertexIndexRange
property required method -
hasVertexIndices
property required method
Properties
hasVertexIndices
Returns whether this particle uses indexed vertices.
@property (nonatomic, readonly) BOOL hasVertexIndices
Declared In
CC3Particles.h
vertexCount
Returns the number of vertices in this particle.
@property (nonatomic, readonly) GLuint vertexCount
Declared In
CC3Particles.h
vertexIndexCount
Returns the number of vertex indices required for the mesh of this particle.
@property (nonatomic, readonly) GLuint vertexIndexCount
Discussion
Not all meshes use vertex indices. If indexed drawing is used by this particle, this method returns the number of vertex indices in the particle. If indexed drawing is not used by this particle, this property returns the same value as the vertexCount property, indicating, in effect, the number of indices that would be required if this particle was converted to using indexed drawing.
This behaviour allows a particle that does not use indexed drawing to be added to an emitter that does use indexed drawing. When this happens, the missing vertex indices are automatically synthesized.
Declared In
CC3Particles.h
vertexIndexRange
Returns the range of vertex indices in the underlying mesh that are managed by this particle.
@property (nonatomic, readonly) NSRange vertexIndexRange
Discussion
The location element of the returned range structure contains the index to the first vertex index of this particle, and the length element contains the same value as the vertexIndexCount property.
Not all meshes use vertex indices. If indexed drawing is used by this particle, this method returns the range of vertex indices in the particle. If indexed drawing is not used by this particle, this property returns the same value as the vertexRange property, indicating, in effect, the range of indices that would be required if this particle was converted to using indexed drawing.
This behaviour allows a particle that does not use indexed drawing to be added to an emitter that does use indexed drawing. When this happens, the missing vertex indices are automatically synthesized.
Declared In
CC3Particles.h
vertexRange
Returns the range of vertices in the underlying mesh that are managed by this particle.
@property (nonatomic, readonly) NSRange vertexRange
Discussion
The location element of the returned range structure contains the index to the first vertex of this particle, and the length element contains the same value as the vertexCount property.
Declared In
CC3Particles.h