|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.nexttext.behaviour.AbstractAction net.nexttext.behaviour.physics.PhysicsAction
public abstract class PhysicsAction
Every Action in this package should be a descendant of this class.
PhysicsAction introduces a new set of physics properties, and provide the usual accessors for them.
Properties to add in the future include elasticity and mass. A method to get absolute velocity may also be useful.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface net.nexttext.behaviour.Action |
---|
Action.ActionResult |
Constructor Summary | |
---|---|
PhysicsAction()
|
Method Summary | |
---|---|
void |
applyAcceleration(TextObject to,
processing.core.PVector acceleration)
Applies an acceleration to a TextObject. |
void |
applyAngularAcceleration(TextObject to,
float angAcc)
Applies an angular acceleration to a TextObject. |
void |
applyAngularForce(TextObject to,
float angularForce)
Applies an angular force (torque) to a TextObject. |
void |
applyForce(TextObject to,
processing.core.PVector force)
Applies a force to a TextObject. |
NumberProperty |
getAngularVelocity(TextObject to)
|
NumberProperty |
getMass(TextObject to)
|
java.util.Map<java.lang.String,Property> |
getRequiredProperties()
Returns a Map containing a set of Vector3Properties required by all PhysicActions |
PVectorProperty |
getVelocity(TextObject to)
|
Methods inherited from class net.nexttext.behaviour.AbstractAction |
---|
behave, 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 |
---|
public PhysicsAction()
Method Detail |
---|
public java.util.Map<java.lang.String,Property> getRequiredProperties()
getRequiredProperties
in interface Action
getRequiredProperties
in class AbstractAction
public NumberProperty getMass(TextObject to)
public PVectorProperty getVelocity(TextObject to)
public NumberProperty getAngularVelocity(TextObject to)
public void applyForce(TextObject to, processing.core.PVector force)
The mass of the object will affect the resulting acceleration.
public void applyAcceleration(TextObject to, processing.core.PVector acceleration)
This acceleration is independent of the mass of the object.
public void applyAngularForce(TextObject to, float angularForce)
The mass of the object will affect the resulting angular acceleration.
public void applyAngularAcceleration(TextObject to, float angAcc)
This acceleration is independent of the mass of the object.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |