|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.gatech.cs2335.lemmings.physics.PhysicsEngine
The Physics Engine. This takes care of calculating movement due to gravity or velocity in addition to taking care of World Collision Detection. Revision History: v1.7 (2004-04-13) - Added code for climbers, gliders, and floaters v1.6a (2004-04-13) - VLAD: I updated the ray-tracing code for the J direction, so that when the lemming or whatever hits the ground, the first component is not -1, but rather just the negative of the real value. The real value cannot be negative, so that's fine. That fixes the bug, where the lemming dies but doesn't really reach ground visually. v1.5a(2004-04-12) - Negative Gravity now works v1.5 (2004-04-12) - Rewrote most of Physics Engine, PMD should shut the hell up now. Added Particle calculations, fixed rayTracing when falling up, calculations now work for crazy Gravity settings up to around 11, above that and strange things happen. Velocities will work at any value, so long as gravity is not too wild a number. Currently, a negative gravity causes problems. v1.1 (2004-04-01) - Updated stuff so the lemmings' animation is handled correctly upon reversing direction.
| Constructor Summary | |
PhysicsEngine()
|
|
| Method Summary | |
void |
calculateNextPoint(java.util.List poList)
Iterate through the list of Physics Objects and calculate their next Positions |
void |
calculateNextPoint(PhysicsObject po)
Calculates the next point for the Physics Object |
java.awt.image.BufferedImage |
getCurrentMap()
get CurrentMap |
static PhysicsEngine |
getInstance()
Method getInstance |
static java.awt.image.BufferedImage |
getUnbreakableMap()
Method getUnbreakableMap |
void |
setCurrentMap(java.awt.image.BufferedImage aMap)
Set the current gameplay level |
static void |
setUnbreakableMap(java.awt.image.BufferedImage unbreakableMap)
Method setUnbreakableMap |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PhysicsEngine()
| Method Detail |
public static PhysicsEngine getInstance()
public java.awt.image.BufferedImage getCurrentMap()
public static java.awt.image.BufferedImage getUnbreakableMap()
public void setCurrentMap(java.awt.image.BufferedImage aMap)
aMap - the new game levelpublic static void setUnbreakableMap(java.awt.image.BufferedImage unbreakableMap)
unbreakableMap - unbreakable image.public void calculateNextPoint(PhysicsObject po)
po - the Physics object to calculate the next point forpublic void calculateNextPoint(java.util.List poList)
poList - the list of Physics objects to iterate through
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||