| Package | com.asterisq.constellation.behaviors |
| Class | public class NodeAttractionRepulsionBehavior |
| Inheritance | NodeAttractionRepulsionBehavior EdgeWeightStatsBehavior Behavior flash.events.EventDispatcher |
| Property | Defined by | ||
|---|---|---|---|
| constellation : IConstellation
The constellation instance this behavior belongs to.
| NodeAttractionRepulsionBehavior | ||
![]() | enabled : Boolean
Indicates whether this behavior is currently enabled.
| Behavior | |
![]() | highWeight : Number
The highest edge renderer weighting value.
| EdgeWeightStatsBehavior | |
![]() | lowWeight : Number
The lowest edge renderer weighting value.
| EdgeWeightStatsBehavior | |
![]() | nodeRendererFilterFunction : Function
The function which determines the node renderers affected by this behavior.
| Behavior | |
![]() | totalWeight : Number
The sum of all edge renderer weighting values.
| EdgeWeightStatsBehavior | |
| Method | Defined by | ||
|---|---|---|---|
|
NodeAttractionRepulsionBehavior(attractionFactor:Number = 0.2, repulsionFactor:Number = 0.2, nodeRepulsionDistance:Number = 100, baseEdgeLength:Number = 100, edgeLengthVariability:Number = 0.3)
| NodeAttractionRepulsionBehavior | ||
|
affectsAcceleration():Boolean
Indicates whether this class affects node renderers' acceleration.
| NodeAttractionRepulsionBehavior | ||
![]() |
affectsNodeRenderer(nr:INodeRenderer):Boolean
Determines whether this behavior affects the given node renderer.
| Behavior | |
![]() |
affectsPosition():Boolean
Indicates whether this class affects node renderers' position.
| Behavior | |
![]() |
affectsVelocity():Boolean
Indicates whether this class affects node renderers' velocity.
| 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.
| Behavior | |
|
stepStart():void
| NodeAttractionRepulsionBehavior | ||
|
Adds attraction and repulsion forces to the node renderer.
| NodeAttractionRepulsionBehavior | ||
![]() |
Modifies the given node renderer's position.
| Behavior | |
![]() |
Modifies the given node renderer's velocity.
| Behavior | |
| Method | Defined by | ||
|---|---|---|---|
|
loadValuesFromXML(behaviorElem:XML):void
Updates this behavior with values from the given XML element.
| NodeAttractionRepulsionBehavior | ||
| constellation | property |
constellation:IConstellation [read-write]The constellation instance this behavior belongs to.
Implementation public function get constellation():IConstellation
public function set constellation(value:IConstellation):void
| NodeAttractionRepulsionBehavior | () | constructor |
public function NodeAttractionRepulsionBehavior(attractionFactor:Number = 0.2, repulsionFactor:Number = 0.2, nodeRepulsionDistance:Number = 100, baseEdgeLength:Number = 100, edgeLengthVariability:Number = 0.3)Parameters
attractionFactor:Number (default = 0.2) |
|
repulsionFactor:Number (default = 0.2) |
|
nodeRepulsionDistance:Number (default = 100) |
|
baseEdgeLength:Number (default = 100) |
|
edgeLengthVariability:Number (default = 0.3) |
| affectsAcceleration | () | method |
public override function affectsAcceleration():BooleanIndicates whether this class affects node renderers' acceleration. This function must return true if this behavior affects acceleration.
ReturnsBoolean |
| loadValuesFromXML | () | method |
protected override function loadValuesFromXML(behaviorElem:XML):voidUpdates this behavior with values from the given XML element. This method should be overridden to update this Behavior.
ParametersbehaviorElem:XML |
| stepStart | () | method |
public override function stepStart():void
| updateAcceleration | () | method |
public override function updateAcceleration(nodeRenderer:INodeRenderer):INodeRendererAdds attraction and repulsion forces to the node renderer.
ParametersnodeRenderer:INodeRenderer |
INodeRenderer |