|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.planeth.gtroids.physics.helper.CircumferentialVelHelper
Encapsulates the logic to handle the circumferencial vel
of an object after a collision with the border.
It simulates some kind of kinetic energy.
The rotation affects the resulting vel.
The vel affects the resulting rotation.
| Constructor Summary | |
CircumferentialVelHelper(double circumferentialVel,
Vector2D vel,
int direction,
double leverage)
Constructor for CircumferentialVelHelper. |
|
| Method Summary | |
void |
calculate()
Calculates the new vel and circumferecialVel (after the collision) |
double |
getCircumferentialVel()
Returns the circumferencialVel. |
int |
getDirection()
Returns the direction, where the circumferencial is active |
Vector2D |
getVel()
Returns the vel. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public CircumferentialVelHelper(double circumferentialVel,
Vector2D vel,
int direction,
double leverage)
circumferentialVel - the circumferencialVel before the collisionvel - the velocity before the collisiondirection - the direction, where the circumferencial is activeleverage - the leverage which affects the moving forces| Method Detail |
public void calculate()
public double getCircumferentialVel()
public Vector2D getVel()
public int getDirection()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||