|
||||||||||
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 net.nexttext.behaviour.physics.Bounce
public class Bounce
This action performs collision response on two objects by moving them apart and reflects their velocity.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface net.nexttext.behaviour.Action |
---|
Action.ActionResult |
Constructor Summary | |
---|---|
Bounce(float elasticity,
float absorbEnergy)
|
Method Summary | |
---|---|
Action.ActionResult |
behave(TextObject toA,
TextObject toB)
Performs collision response on toA and toB by pushing them apart an reflecting their velocity. |
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 |
---|
public Bounce(float elasticity, float absorbEnergy)
elasticity
- The elasticity of collisionabsorbEnergy
- Objects absorb energy from each other if non zeroMethod Detail |
---|
public Action.ActionResult behave(TextObject toA, TextObject toB)
Objects will not collide if one is a child of the other.
behave
in interface Action
behave
in class AbstractAction
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |