|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object physics.IMotion
public abstract class IMotion
IMotion.java Created: Saturday September 18 11:45:51 2004
CollisionObject
Constructor Summary | |
---|---|
IMotion()
|
Method Summary | |
---|---|
abstract void |
bounce(CollisionObject col)
Override to create a bounce for this motion when it collides with col |
void |
changeMomentum(double d)
Override to do something useful |
boolean |
getCollided()
Returns true, override to do something useful |
abstract int |
getDX()
Should return the DX value |
abstract int |
getDY()
Should return the DY value |
abstract int |
getSpeed()
Should return the speed of this motion |
double |
getVelocity()
Override to do something useful |
void |
setCoefficient(double c)
Override to do something useful |
void |
setDX(double d)
Override to do something useful |
abstract void |
setDX(int dx)
Should change the DX value |
void |
setDY(double d)
Override to do something useful |
abstract void |
setDY(int dy)
Should change the DY value |
void |
setGravity(int g)
Override to do something useful |
void |
setLocation(double d,
double d2)
Override to do something useful |
abstract void |
setVelocity(int dx,
int dy,
int speed)
Set the velocity of this motion |
abstract void |
start()
Should start the timer of this motion |
abstract void |
stop()
Should stop the timer of this motion |
void |
switchMomentum(double d,
CollisionObject c)
Override to do something useful |
abstract void |
timerReact()
Called when the timer reacts Should be overridden to do something useful |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IMotion()
Method Detail |
---|
public abstract void setVelocity(int dx, int dy, int speed)
dx-
- change in the x directiondy
- - change in the y directionspeed
- - the timer delaypublic abstract int getDX()
public abstract void setDX(int dx)
public abstract void setDY(int dy)
public abstract int getDY()
public abstract int getSpeed()
public abstract void timerReact()
public abstract void start()
public abstract void stop()
public abstract void bounce(CollisionObject col)
col
- a CollisionObject
valuepublic void setCoefficient(double c)
c
- a double
valuepublic double getVelocity()
double
valuepublic void changeMomentum(double d)
d
- a double
valuepublic void switchMomentum(double d, CollisionObject c)
d
- a double
valuec
- a CollisionObject
valuepublic boolean getCollided()
boolean
valuepublic void setDX(double d)
d
- a double
valuepublic void setDY(double d)
d
- a double
valuepublic void setLocation(double d, double d2)
d
- a double
valued2
- a double
valuepublic void setGravity(int g)
g
- an int
value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |