Public Member Functions | Static Public Member Functions | Protected Attributes | Properties

CC3PointParticle Class Reference

CC3PointParticle is a standard base implementation of the CC3PointParticleProtocol. More...

#import <CC3PointParticles.h>

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

List of all members.

Public Member Functions

(id) - initFromEmitter:
(void) - update:

Static Public Member Functions

(id) + particleFromEmitter:

Protected Attributes

NSUInteger particleIndex

Properties

NSUInteger index DEPRECATED_ATTRIBUTE
CC3PointParticleEmitteremitter
BOOL hasNormal
BOOL hasSize
CC3Vector normal
GLfloat size

Detailed Description

CC3PointParticle is a standard base implementation of the CC3PointParticleProtocol.

CC3PointParticle provides accessors for the particle normal and size.


Member Function Documentation

- (id) initFromEmitter: (CC3ParticleEmitter *)  anEmitter
Deprecated:
Use the init method instead, and set emitter property directly.
+ (id) particleFromEmitter: (CC3ParticleEmitter *)  anEmitter
Deprecated:
Use the particle method instead, and set emitter property directly.
- (void) update: (ccTime)  DEPRECATED_ATTRIBUTE
Deprecated:
Replaced by the updateBeforeTransform: method.

Member Data Documentation

- (NSUInteger) particleIndex [protected]

The index of this particle within the collection of particles managed by the emitter.

You should not assume that this property will be consistent during the lifetime of the particle. It can and will change spontaneously as other particles expire and the emitter manages its collection of particles.

This property is set by the particle emitter as it manages its collection of particles. The application must treat this property as read-only, and must never set this property directly.

At any time, this value is unique across all current living particles managed by the emitter.

Reimplemented from <CC3PointParticleProtocol>.


Property Documentation

- (NSUInteger index) DEPRECATED_ATTRIBUTE [read, write, assign]
Deprecated:
Replaced by the particleIndex property.
- (CC3PointParticleEmitter*) emitter [read, write, assign]

The emitter that emitted this particle.

For CC3PointParticle, the emitter must be of type CC3PointParticleEmitter.

Implements CC3ParticleBase.

- (BOOL) hasNormal [read, assign]

Indicates whether this particle has vertex normal content, as determined by the vertexContentTypes property of the emitter.

Within an emitter, either all particles have normal content, or none do.

When this property returns YES, each particle will have a normal vector and will interact with light sources. When this property returns NO, each particle will ignore lighting conditions.

- (BOOL) hasSize [read, assign]

Indicates whether this particle has vertex size content, as determined by the vertexContentTypes property of the emitter.

Within an emitter, either all particles have size content, or none do.

When this property returns YES, each particle can be set to a different size. When this property returns NO, all particles will have the size specified by the particleSize property of the emitter.

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

If this particle has vertex normal content, (which can be checked with the hasNormal property), this property indicates the vertex normal that the particle uses to interact with light sources.

This property is automatically and dynamically adjusted by the emitter, based on the particle's orientation with respect to the camera. Unless you have specific reason to change this property, and know what you are doing, you should leave the value of this property alone.

If this particle does not have vertex normal content, this property will always return kCC3VectorZero. In this condition, it is safe to set this property, but changes will have no effect.

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

If this particle has individual size content, (which can be checked with the hasSize property), this property indicates the size at which this particle will appear.

If this particle has individual size content, you can set this property at any time to define the size of the particle.

If this particle does not have individual size content, this property will always return the value of the particleSize property of the emitter. In this condition, it is safe to set this property, but changes will have no effect.


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