Public Member Functions | Properties

CC3UniformEvolutionParticle Class Reference

CC3UniformEvolutionParticle is a type of CC3MortalPointParticle that moves in a straight line in a single direction at a steady speed, and which can optionally have color and size that linearly move from an intitial color and size to a final color and size. More...

#import <CC3PointParticles.h>

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

List of all members.

Public Member Functions

(void) - updateLife:

Properties

ccColor4F colorVelocity
GLfloat sizeVelocity

Detailed Description

CC3UniformEvolutionParticle is a type of CC3MortalPointParticle that moves in a straight line in a single direction at a steady speed, and which can optionally have color and size that linearly move from an intitial color and size to a final color and size.

The direction and speed are specified by the velocity property. The rate of change of the particle's color and size are specified by the colorVelocity and sizeVelocity properties respectively.

To produce uniform evolution, the updateLife: method multiplies each of these three velocities by the interval since the previous update, and adds each result, accordingly, to the location, color and size properties of this particle. Color and size are only updated if this particle supports that content.


Member Function Documentation

- (void) updateLife: (ccTime)  dt

Invoked automatically from the udpate: method, while the particle is alive.

The direction and speed are specified by the velocity property. The rate of change of the particle's color and size are specified by the colorVelocity and sizeVelocity properties respectively.

To produce uniform evolution, this method multiplies each of these three velocities by the interval since the previous update, and adds each result, accordingly, to the location, color and size properties of this particle. Color and size are only updated if this particle supports that content.

Subclasses that override this method should invoke this superclass implementation.

Implements CC3UniformMotionParticle.


Property Documentation

- (ccColor4F) colorVelocity [read, write, assign]

Indicates the rate that this particle changes color.

If this particle has size content, the updateLife: method multiplies this velocity by the interval since the previous update, and adds the result to the color of this particle.

- (GLfloat) sizeVelocity [read, write, assign]

Indicates the rate that this particle changes size.

If this particle has size content, the updateLife: method multiplies this velocity by the interval since the previous update, and adds the result to the size of this particle.


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