Packagecom.asterisq.constellation.behaviors
Classpublic class VelocityStatsBehavior
InheritanceVelocityStatsBehavior Inheritance Behavior Inheritance flash.events.EventDispatcher

Behavior for measuring node renderer velocities.



Public Properties
 PropertyDefined by
  averageVelocity : Point
[read-only] The average velocity of all node renderers.
VelocityStatsBehavior
 Inheritedconstellation : IConstellation
The constellation instance this behavior belongs to.
Behavior
 Inheritedenabled : Boolean
Indicates whether this behavior is currently enabled.
Behavior
  maxVelocity : Point
[read-only] The velocity of the node renderer with the greatest velocity magnitude.
VelocityStatsBehavior
  minVelocity : Point
[read-only] The velocity of the node renderer with the smallest velocity magnitude.
VelocityStatsBehavior
 InheritednodeRendererFilterFunction : Function
The function which determines the node renderers affected by this behavior.
Behavior
  totalVelocity : Point
[read-only] The total velocity of all node renderers.
VelocityStatsBehavior
  totalVelocityMagnitude : Number
[read-only] The total of all node renderers' velocity magnitudes.
VelocityStatsBehavior
Public Methods
 MethodDefined by
  
Creates a new velocity stats behavior.
VelocityStatsBehavior
 Inherited
Indicates whether this class affects node renderers' acceleration.
Behavior
 Inherited
Determines whether this behavior affects the given node renderer.
Behavior
 Inherited
affectsPosition():Boolean
Indicates whether this class affects node renderers' position.
Behavior
  
affectsVelocity():Boolean
Indicates whether this class affects node renderers' velocity.
VelocityStatsBehavior
 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.
VelocityStatsBehavior
  
stepStart():void
Method called at the beginning of a step.
VelocityStatsBehavior
 Inherited
Modifies the given node renderer's acceleration.
Behavior
 Inherited
Modifies the given node renderer's position.
Behavior
  
Modifies the given node renderer's velocity.
VelocityStatsBehavior
Protected Methods
 MethodDefined by
 Inherited
loadValuesFromXML(behaviorElem:XML):void
Updates this behavior with values from the given XML element.
Behavior
Property detail
averageVelocityproperty
averageVelocity:Point  [read-only]

The average velocity of all node renderers.

Implementation
    public function get averageVelocity():Point
maxVelocityproperty 
maxVelocity:Point  [read-only]

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

Implementation
    public function get maxVelocity():Point
minVelocityproperty 
minVelocity:Point  [read-only]

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

Implementation
    public function get minVelocity():Point
totalVelocityproperty 
totalVelocity:Point  [read-only]

The total velocity of all node renderers.

Implementation
    public function get totalVelocity():Point
totalVelocityMagnitudeproperty 
totalVelocityMagnitude:Number  [read-only]

The total of all node renderers' velocity magnitudes.

Implementation
    public function get totalVelocityMagnitude():Number
Constructor detail
VelocityStatsBehavior()constructor
public function VelocityStatsBehavior()

Creates a new velocity stats behavior.

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

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

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.

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

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

Parameters
nodeRenderer:INodeRenderer

Returns
INodeRenderer