Packagecom.asterisq.constellation.behaviors
Classpublic class BoundedKinematicsBehavior
InheritanceBoundedKinematicsBehavior Inheritance Behavior Inheritance flash.events.EventDispatcher

Behavior similar to the BasicKinematicsBehavior except the bounded version prevents nodes from exiting the borders of the visualization.



Public Properties
 PropertyDefined by
  bounds : Rectangle
BoundedKinematicsBehavior
 Inheritedconstellation : IConstellation
The constellation instance this behavior belongs to.
Behavior
 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
  
BoundedKinematicsBehavior(bounds:Rectangle = null)
Creates a new behavior.
BoundedKinematicsBehavior
 Inherited
Indicates whether this class affects node renderers' acceleration.
Behavior
 Inherited
Determines whether this behavior affects the given node renderer.
Behavior
  
affectsPosition():Boolean
Indicates whether this class affects node renderers' position.
BoundedKinematicsBehavior
  
affectsVelocity():Boolean
Indicates whether this class affects node renderers' velocity.
BoundedKinematicsBehavior
 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
 Inherited
Modifies the given node renderer's acceleration.
Behavior
  
Modifies the given node renderer's position.
BoundedKinematicsBehavior
  
Modifies the given node renderer's velocity.
BoundedKinematicsBehavior
Protected Methods
 MethodDefined by
 Inherited
loadValuesFromXML(behaviorElem:XML):void
Updates this behavior with values from the given XML element.
Behavior
Property detail
boundsproperty
bounds:Rectangle  [read-write]Implementation
    public function get bounds():Rectangle
    public function set bounds(value:Rectangle):void
Constructor detail
BoundedKinematicsBehavior()constructor
public function BoundedKinematicsBehavior(bounds:Rectangle = null)

Creates a new behavior.

Parameters
bounds:Rectangle (default = null)
Method detail
affectsPosition()method
public override function affectsPosition():Boolean

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

Returns
Boolean
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
updatePosition()method 
public override function updatePosition(nodeRenderer:INodeRenderer):INodeRenderer

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

Parameters
nodeRenderer:INodeRenderer

Returns
INodeRenderer
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