Public Member Functions | Properties

CC3UniformMotionParticle Class Reference

CC3UniformMotionParticle is a type of CC3MortalPointParticle that moves in a straight line in a single direction at a steady speed. More...

#import <CC3PointParticles.h>

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

List of all members.

Public Member Functions

(void) - updateLife:

Properties

CC3Vector velocity

Detailed Description

CC3UniformMotionParticle is a type of CC3MortalPointParticle that moves in a straight line in a single direction at a steady speed.

The direction and speed are specified by the velocity property. To produce uniform motion, on each update, the updateLife: method multiplies this velocity by the interval since the previous update, and the resulting distance vector is added to the location of this particle


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. To produce uniform motion, this method multiplies this velocity by the interval since the previous update, and the resulting distance vector is added to the location of this particle

Subclasses that override this method should invoke this superclass implementation.

Implements CC3MortalPointParticle.

Implemented in CC3UniformEvolutionParticle.


Property Documentation

- (CC3Vector) velocity [read, write, assign]

Indicates the velocity of this particle.

This vector combines both speed and direction, with the speed determined by the length of the vector.

The updateLife: method multiplies this velocity by the interval since the previous update, and adds the resulting distance vector to the location of this particle.


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