net.nexttext.behaviour.dform
Class ChaosPull

java.lang.Object
  extended by net.nexttext.behaviour.AbstractAction
      extended by net.nexttext.behaviour.dform.DForm
          extended by net.nexttext.behaviour.dform.ChaosPull
All Implemented Interfaces:
Action, TargetingAction

public class ChaosPull
extends DForm
implements TargetingAction

ChaosPull is similar to Pull except that the control points get into a chaotic state when they reach the target. TODO: add parameters.


Nested Class Summary
 
Nested classes/interfaces inherited from interface net.nexttext.behaviour.Action
Action.ActionResult
 
Constructor Summary
ChaosPull(float x, float y)
          Constructor creates a ChaosPull at x,y with a default strength of 1200.
ChaosPull(float x, float y, float z)
          Constructor creates a ChaosPull at x,y,z with a default strength of 1200.
ChaosPull(float x, float y, float z, int chaosStrength)
          Constructor creates a ChaosPull at x,y,z.
ChaosPull(float x, float y, int chaosStrength)
          Constructor creates a ChaosPull at x,y.
ChaosPull(Locatable target)
          Constructor creates a ChaosPull at the target with a default strength of 1200.
ChaosPull(Locatable target, int chaosStrength)
          Constructor.
 
Method Summary
 Action.ActionResult behave(TextObjectGlyph to)
          DForms generally just make sense on TextObjectGlyphs.
 int getChaosStrength()
           
 void setChaosStrength(int chaosStrength)
          Sets the 'strength' of the chaosPull, stronger chaosPull results in larger deformations and faster pulling.
 void setTarget(float x, float y)
          Set a new target for this action.
 void setTarget(float x, float y, float z)
          Set a new target for this action.
 void setTarget(Locatable target)
          Set a new target for this action.
 void setTarget(processing.core.PVector target)
          Set a new target for this action.
 
Methods inherited from class net.nexttext.behaviour.dform.DForm
behave, getControlPoints
 
Methods inherited from class net.nexttext.behaviour.AbstractAction
behave, behave, complete, getDisplayName, getRequiredProperties, makeBehaviour, properties, setDisplayName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.nexttext.behaviour.Action
behave, behave, behave, complete, getRequiredProperties
 

Constructor Detail

ChaosPull

public ChaosPull(Locatable target,
                 int chaosStrength)
Constructor.

Parameters:
target - location of the attraction point that pulls the vertices
chaosStrength - strength of the attraction

ChaosPull

public ChaosPull(Locatable target)
Constructor creates a ChaosPull at the target with a default strength of 1200.

Parameters:
target -

ChaosPull

public ChaosPull(float x,
                 float y,
                 int chaosStrength)
Constructor creates a ChaosPull at x,y.

Parameters:
x -
y -
chaosStrength -

ChaosPull

public ChaosPull(float x,
                 float y)
Constructor creates a ChaosPull at x,y with a default strength of 1200.

Parameters:
x -
y -

ChaosPull

public ChaosPull(float x,
                 float y,
                 float z)
Constructor creates a ChaosPull at x,y,z with a default strength of 1200.

Parameters:
x -
y -
z -

ChaosPull

public ChaosPull(float x,
                 float y,
                 float z,
                 int chaosStrength)
Constructor creates a ChaosPull at x,y,z.

Parameters:
x -
y -
z -
chaosStrength -
Method Detail

behave

public Action.ActionResult behave(TextObjectGlyph to)
Description copied from class: DForm
DForms generally just make sense on TextObjectGlyphs.

Specified by:
behave in class DForm

getChaosStrength

public int getChaosStrength()

setChaosStrength

public void setChaosStrength(int chaosStrength)
Sets the 'strength' of the chaosPull, stronger chaosPull results in larger deformations and faster pulling.

The default value is 1200.


setTarget

public void setTarget(float x,
                      float y)
Description copied from interface: TargetingAction
Set a new target for this action.

Specified by:
setTarget in interface TargetingAction

setTarget

public void setTarget(float x,
                      float y,
                      float z)
Description copied from interface: TargetingAction
Set a new target for this action.

Specified by:
setTarget in interface TargetingAction

setTarget

public void setTarget(processing.core.PVector target)
Description copied from interface: TargetingAction
Set a new target for this action.

Specified by:
setTarget in interface TargetingAction

setTarget

public void setTarget(Locatable target)
Description copied from interface: TargetingAction
Set a new target for this action.

Specified by:
setTarget in interface TargetingAction