v2.0.2
Properties | List of all members
<CC3UniformlyRotatingParticleProtocol> Protocol Reference

#import <CC3ParticleSamples.h>

Inheritance diagram for <CC3UniformlyRotatingParticleProtocol>:
Inheritance graph
[legend]

Properties

CC3Vector rotation
 
GLfloat rotationAngle
 
GLfloat rotationAngleVelocity
 
CC3Vector rotationAxis
 
CC3Vector rotationVelocity
 

Detailed Description

CC3UniformlyRotatingParticleProtocol defines behaviour required for particles that are configured to rotate at a constant rate.

Rotation velocity can be specified in terms of Euler angles or rotation of an angle around a defined axis. These rotational velocity properties are mutually exclusive, and if more than one of these properties have been set, the value and type of rotation of the most recently specified property is used to rotate the particle.

This protocol can be used with mesh particles. Point particles cannot be rotated.

Property Documentation

- (CC3Vector) rotation
readwritenonatomicassign

The current rotational orientation of the particle in 3D space, relative to the emitter.

This value contains three Euler angles, defining a rotation of this particle around the X, Y and Z axes. Each angle is specified in degrees.

Rotation is performed in Y-X-Z order, which is the OpenGL default. Depending on the nature of the particle you are trying to control, you can think of this order as yaw, then pitch, then roll, or heading, then inclination, then tilt,

When setting this value, each component is converted to modulo +/-360 degrees.

Rotational transformation can also be specified using the rotationAxis and rotationAngle properties. Subsequently, this property can be read to return the corresponding Euler angles.

- (GLfloat) rotationAngle
readwritenonatomicassign

The current angular rotation around the axis specified in the rotationAxis property.

When setting this value, it is converted to modulo +/-360 degrees. When reading this value after making changes using rotateByAngle:aroundAxis:, or using another rotation property, the value of this property will be clamped to +/-180 degrees.

For example, if current rotation is 170 degrees around the rotationAxis, invoking the rotateByAngle:aroundAxis: method using the same rotation axis and 20 degrees, reading this property will return -170 degrees, not 190 degrees.

Rotational transformation can also be specified using the rotation property (Euler angles). Subsequently, this property can be read to return the corresponding angle of rotation.

- (GLfloat) rotationAngleVelocity
readwritenonatomicassign

The rate that this particle changes rotation, around the axis specified in the rotationAxis property, specified in degrees per second.

This value may be either positive or negative, to indicate the direction of rotation.

- (CC3Vector) rotationAxis
readwritenonatomicassign

The axis of rotation of the particle in 3D space, relative to the emitter, expressed as a directional vector.

This axis can be used in conjunction with the rotationAngle property to describe the rotation as a single angular rotation around an arbitrary axis.

Under the identity rotation (no rotation), the rotationAngle is zero and the rotationAxis is undefined. Under that condition, this property will return the zero vector kCC3VectorZero.

Rotational transformation can also be specified using the rotation property (Euler angles). Subsequently, this property can be read to return the corresponding axis of rotation.

- (CC3Vector) rotationVelocity
readwritenonatomicassign

The rate that this particle changes rotation, specified as three Euler angles in degrees per second.

Each component Euler angle may be either positive or negative, to indicate the direction of rotation.


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