net.nexttext.behaviour.physics
Class Spin

java.lang.Object
  extended by net.nexttext.behaviour.AbstractAction
      extended by net.nexttext.behaviour.physics.PhysicsAction
          extended by net.nexttext.behaviour.physics.Spin
All Implemented Interfaces:
Action

public class Spin
extends PhysicsAction

This action gives the object a one-time angular spin.


Nested Class Summary
 
Nested classes/interfaces inherited from interface net.nexttext.behaviour.Action
Action.ActionResult
 
Constructor Summary
Spin()
          Default constructor.
Spin(float force)
          Default constructor.
 
Method Summary
 Action.ActionResult behave(TextObject to)
          Apply behaviour to text object.
 void init(float force)
          Initialize properties.
 
Methods inherited from class net.nexttext.behaviour.physics.PhysicsAction
applyAcceleration, applyAngularAcceleration, applyAngularForce, applyForce, getAngularVelocity, getMass, getRequiredProperties, getVelocity
 
Methods inherited from class net.nexttext.behaviour.AbstractAction
behave, behave, complete, getDisplayName, makeBehaviour, properties, setDisplayName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Spin

public Spin()
Default constructor. Angular force is equal to 0.1 rad.


Spin

public Spin(float force)
Default constructor. Angular force is equal to 0.1.

Parameters:
force - angular force in rad
Method Detail

init

public void init(float force)
Initialize properties.

Parameters:
force -

behave

public Action.ActionResult behave(TextObject to)
Apply behaviour to text object.

Specified by:
behave in interface Action
Overrides:
behave in class AbstractAction
Parameters:
to - text object