Packagecom.asterisq.constellation.behaviors
Classpublic class RingBehavior
InheritanceRingBehavior Inheritance Behavior Inheritance flash.events.EventDispatcher

Behavior which causes node renderer forces to be constrained to a ring.



Public Properties
 PropertyDefined by
  constellation : IConstellation
The constellation instance this behavior belongs to.
RingBehavior
 Inheritedenabled : Boolean
Indicates whether this behavior is currently enabled.
Behavior
 InheritednodeRendererFilterFunction : Function
The function which determines the node renderers affected by this behavior.
Behavior
Public Methods
 MethodDefined by
  
RingBehavior(attractionFactor:Number = 0.2, ringRadius:Number = 100)
Creates a new behavior.
RingBehavior
  
Indicates whether this class affects node renderers' acceleration.
RingBehavior
 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
 Inherited
stepEnd():void
Method called at the end of a step.
Behavior
 Inherited
stepStart():void
Method called at the beginning of a step.
Behavior
  
Modifies the given node renderer's acceleration.
RingBehavior
 Inherited
Modifies the given node renderer's position.
Behavior
 Inherited
Modifies the given node renderer's velocity.
Behavior
Protected Methods
 MethodDefined by
  
loadValuesFromXML(behaviorElem:XML):void
Updates this behavior with values from the given XML element.
RingBehavior
Property detail
constellationproperty
constellation:IConstellation  [read-write]

The constellation instance this behavior belongs to.

Implementation
    public function get constellation():IConstellation
    public function set constellation(value:IConstellation):void
Constructor detail
RingBehavior()constructor
public function RingBehavior(attractionFactor:Number = 0.2, ringRadius:Number = 100)

Creates a new behavior.

Parameters
attractionFactor:Number (default = 0.2)
 
ringRadius:Number (default = 100)
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
loadValuesFromXML()method 
protected override function loadValuesFromXML(behaviorElem:XML):void

Updates this behavior with values from the given XML element. This method should be overridden to update this Behavior.

Parameters
behaviorElem:XML
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