|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object physics3d.OldGamePhysics
public class OldGamePhysics
OldGamePhysics is an immutable class with static methods that does physics calculations. OldGamePhysics does some things better than GamePhysics but does not have as many features, such as calculating collisions between balls.
Constructor Summary | |
---|---|
OldGamePhysics()
|
Method Summary | |
---|---|
static boolean |
farther(GameObject ball,
GameObject canidate)
Given too game objects, ball and canidate, father will return true only if ball is getting closer to canidate. |
static void |
freeMove(Ball ball,
double time)
Move the given ball for the specified amount of time, under only the influence of gravity and air resistance |
static List<GameObject> |
moveBall(Ball ball)
Move the given ball. |
static PhysicsShape |
nextShape(Ball ball,
List<GameObject> candidates,
double timeleft,
List<GameObject> collisions)
Return the closest PhysicsShape that this ball will collide with in the next timeleft seconds. |
static List<GameObject> |
willCollideWithBound(Ball ball,
Set<GameObject> objects,
double timeleft)
Returns those GameObjects where the ball will collide with their bounds in the next timeleft seconds. |
static PhysicsShape |
world(PhysicsShape p,
GameObject o)
return p in the worldspace of o |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OldGamePhysics()
Method Detail |
---|
public static List<GameObject> moveBall(Ball ball)
public static List<GameObject> willCollideWithBound(Ball ball, Set<GameObject> objects, double timeleft)
public static PhysicsShape nextShape(Ball ball, List<GameObject> candidates, double timeleft, List<GameObject> collisions)
public static void freeMove(Ball ball, double time)
public static PhysicsShape world(PhysicsShape p, GameObject o)
public static boolean farther(GameObject ball, GameObject canidate)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |