|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Obstacle
An interface to represent obstacles.
| Method Summary | |
|---|---|
boolean |
collision(Ball b)
Determine whether a collision with the ball has occurred. |
double[] |
collisionEffect(Ball b)
Return the effect of a collision with the ball. |
Point |
getIntercept()
Get the intercept position with the ball. |
boolean |
inside(Point p)
Determine whether a point is inside an obstacle. |
void |
write(java.io.FileWriter f)
Write this object to a file. |
| Method Detail |
|---|
double[] collisionEffect(Ball b)
b - the ball
boolean collision(Ball b)
b - the ball
true if there is a collision, false otherwisePoint getIntercept()
collision and collisionEffect.
boolean inside(Point p)
p - the point to test
true if p is inside the obstacle, false otherwise
void write(java.io.FileWriter f)
throws java.io.IOException
f - the file
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||