Packagecom.asterisq.constellation.behaviors
Classpublic class AccelerationStatsBehavior
InheritanceAccelerationStatsBehavior Inheritance Behavior Inheritance flash.events.EventDispatcher

Behavior for measuring the acceleration of node renderers.



Public Properties
 PropertyDefined by
  averageAcceleration : Point
[read-only] The average acceleration of all node renderers.
AccelerationStatsBehavior
 Inheritedconstellation : IConstellation
The constellation instance this behavior belongs to.
Behavior
 Inheritedenabled : Boolean
Indicates whether this behavior is currently enabled.
Behavior
  maxAcceleration : Point
[read-only] The acceleration of the node renderer with the greatest acceleration magnitude.
AccelerationStatsBehavior
  minAcceleration : Point
[read-only] The acceleration of the node renderer with the smallest acceleration magnitude.
AccelerationStatsBehavior
 InheritednodeRendererFilterFunction : Function
The function which determines the node renderers affected by this behavior.
Behavior
  totalAcceleration : Point
[read-only] The total acceleration of all node renderers.
AccelerationStatsBehavior
  totalAccelerationMagnitude : Number
[read-only] The total acceleration magnitude of all node renderers.
AccelerationStatsBehavior
Public Methods
 MethodDefined by
  
Creates a new acceleration stats behavior.
AccelerationStatsBehavior
  
Indicates whether this class affects node renderers' acceleration.
AccelerationStatsBehavior
 Inherited
Determines whether this behavior affects the given node renderer.
Behavior
 Inherited
affectsPosition():Boolean
Indicates whether this class affects node renderers' position.
Behavior
 Inherited
affectsVelocity():Boolean
Indicates whether this class affects node renderers' velocity.
Behavior
 Inherited
fromXML(elem:XML):Behavior
[static] Creates an IBehavior instance and initializes it with the given XML data.
Behavior
  
stepEnd():void
Method called at the end of a step.
AccelerationStatsBehavior
  
stepStart():void
Method called at the beginning of a step.
AccelerationStatsBehavior
  
Modifies the given node renderer's acceleration.
AccelerationStatsBehavior
 Inherited
Modifies the given node renderer's position.
Behavior
 Inherited
Modifies the given node renderer's velocity.
Behavior
Protected Methods
 MethodDefined by
 Inherited
loadValuesFromXML(behaviorElem:XML):void
Updates this behavior with values from the given XML element.
Behavior
Property detail
averageAccelerationproperty
averageAcceleration:Point  [read-only]

The average acceleration of all node renderers.

Implementation
    public function get averageAcceleration():Point
maxAccelerationproperty 
maxAcceleration:Point  [read-only]

The acceleration of the node renderer with the greatest acceleration magnitude.

Implementation
    public function get maxAcceleration():Point
minAccelerationproperty 
minAcceleration:Point  [read-only]

The acceleration of the node renderer with the smallest acceleration magnitude.

Implementation
    public function get minAcceleration():Point
totalAccelerationproperty 
totalAcceleration:Point  [read-only]

The total acceleration of all node renderers.

Implementation
    public function get totalAcceleration():Point
totalAccelerationMagnitudeproperty 
totalAccelerationMagnitude:Number  [read-only]

The total acceleration magnitude of all node renderers.

Implementation
    public function get totalAccelerationMagnitude():Number
Constructor detail
AccelerationStatsBehavior()constructor
public function AccelerationStatsBehavior()

Creates a new acceleration stats behavior.

Method detail
affectsAcceleration()method
public override function affectsAcceleration():Boolean

Indicates whether this class affects node renderers' acceleration. This function must return true if this behavior affects acceleration.

Returns
Boolean
stepEnd()method 
public override function stepEnd():void

Method called at the end of a step.

stepStart()method 
public override function stepStart():void

Method called at the beginning of a step.

updateAcceleration()method 
public override function updateAcceleration(nodeRenderer:INodeRenderer):INodeRenderer

Modifies the given node renderer's acceleration. This method will never be called if affectsAcceleration() doesn't return true. This method should be overridden to affect the given node renderer's acceleration.

Parameters
nodeRenderer:INodeRenderer

Returns
INodeRenderer