Packageorg.flintparticles.threeD.initializers
Classpublic class Rotation
InheritanceRotation Inheritance InitializerBase Inheritance Object

The Rotation Initializer sets the rotation of the particle. The rotation is relative to the rotation of the emitter.



Public Properties
 PropertyDefined By
  angle : Number
When reading, returns the average of minAngle and maxAngle.
Rotation
  axis : Vector3D
The axis for the rotation.
Rotation
  maxAngle : Number
The maximum angle for particles initialised by this initializer.
Rotation
  minAngle : Number
The minimum angle for particles initialised by this initializer.
Rotation
 Inheritedpriority : int
Returns a default priority of 0 for this action.
InitializerBase
Protected Properties
 PropertyDefined By
 Inherited_priority : int = 0
InitializerBase
Public Methods
 MethodDefined By
  
Rotation(axis:Vector3D = null, minAngle:Number = 0, maxAngle:Number)
The constructor creates a Rotation initializer for use by an emitter.
Rotation
 Inherited
addedToEmitter(emitter:Emitter):void
This method does nothing.
InitializerBase
  
initialize(emitter:Emitter, particle:Particle):void
[override] This method does nothing.
Rotation
 Inherited
This method does nothing.
InitializerBase
Property Detail
angleproperty
angle:Number

When reading, returns the average of minAngle and maxAngle. When writing this sets both maxAngle and minAngle to the same angle value.


Implementation
    public function get angle():Number
    public function set angle(value:Number):void
axisproperty 
axis:Vector3D

The axis for the rotation.


Implementation
    public function get axis():Vector3D
    public function set axis(value:Vector3D):void
maxAngleproperty 
maxAngle:Number

The maximum angle for particles initialised by this initializer.


Implementation
    public function get maxAngle():Number
    public function set maxAngle(value:Number):void
minAngleproperty 
minAngle:Number

The minimum angle for particles initialised by this initializer.


Implementation
    public function get minAngle():Number
    public function set minAngle(value:Number):void
Constructor Detail
Rotation()Constructor
public function Rotation(axis:Vector3D = null, minAngle:Number = 0, maxAngle:Number)

The constructor creates a Rotation initializer for use by an emitter. To add a Rotation to all particles created by an emitter, use the emitter's addInitializer method.

The rotation of particles initialized by this class will be a random value between the minimum and maximum values set. If no maximum value is set, the minimum value is used with no variation.

Parameters
axis:Vector3D (default = null) — The axis around which the rotation occurs.
 
minAngle:Number (default = 0) — The minimum angle, in radians, for the particle's rotation.
 
maxAngle:Number (default = NaN) — The maximum angle, in radians, for the particle's rotation.

See also

Method Detail
initialize()method
override public function initialize(emitter:Emitter, particle:Particle):void

This method does nothing. All derived classes override this method to initialize each particle created by the emitter.

Parameters

emitter:Emitter
 
particle:Particle