|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.gatech.cs2335.lemmings.physics.PhysicsObject
The PhysicsObject class defines the basic attributes a Physical Object has. Its methods are called by the Physics Engine to update the traits of a moving object.
| Constructor Summary | |
PhysicsObject()
Creates a new PhysicsObject instance. |
|
| Method Summary | |
void |
accelerate(PhysicsVector acceleration)
Method accelerate No different than updateVelocity, created for clarity of code |
int |
getGravityUpdates()
Method getGravityUpdates |
Point |
getPosition()
Method getPosition |
PhysicsVector |
getVelocity()
Method getDirection |
boolean |
isFalling()
Returns true if the lemming is falling and false if it is not. |
void |
setGravityUpdates(int gravityUpdates)
Describe setGravityUpdates method here. |
void |
setPosition(int x,
int y)
Describe setPosition method here. |
void |
setPosition(Point position)
Method setPosition |
void |
setVelocity(PhysicsVector velocity)
Method setDirection |
java.lang.String |
toString()
Describe toString method here. |
void |
updatePosition(int x,
int y,
int z)
Method updatePosition |
void |
updatePosition(Point positionn)
Method updatePosition |
void |
updateVelocity(PhysicsVector vel)
Method updateVelocity |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public PhysicsObject()
PhysicsObject instance.
| Method Detail |
public final void setGravityUpdates(int gravityUpdates)
setGravityUpdates method here.
gravityUpdates - an int valuepublic final void setPosition(Point position)
position - the location of the Physics Object relative to World
public final void setPosition(int x,
int y)
setPosition method here.
x - an int valuey - an int valuepublic final void setVelocity(PhysicsVector velocity)
velocity - , direction/magnitude of the Physics Objectpublic final void updatePosition(Point positionn)
positionn - the difference in position
public final void updatePosition(int x,
int y,
int z)
x - the difference in the x-direction (delta X)y - the difference in the y-direction (delta Y)z - the difference in the z-direction (delta Z)public final void updateVelocity(PhysicsVector vel)
vel - the difference in velocitypublic final int getGravityUpdates()
public final Point getPosition()
public final PhysicsVector getVelocity()
public final void accelerate(PhysicsVector acceleration)
acceleration - the new accelerationpublic final boolean isFalling()
boolean valuepublic java.lang.String toString()
toString method here.
String value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||