|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface BallManager
A BallManager manages the Balls in a World. It can add or remove Balls from its World, and it can return various lists of Balls in its World, e.g. the Balls in its World that intersect a given Ball.
| Method Summary | |
|---|---|
void |
addBall(Ball ballToAdd)
Adds the given Ball to this World. |
List<Ball> |
allBallsInWorld()
Returns a List |
Ball |
intersectingBall(Ball ballToCheckForIntersections)
Returns a Ball that intersects the given Ball, or null if no Ball intersects the given Ball. |
List<Ball> |
intersectingBalls(Ball ballToCheckForIntersections)
Returns a List |
Ball |
nearestBall(Point2D p)
Returns the Ball in this World that is nearest the given point. |
void |
removeBall(Ball ballToRemove)
Removes the given Ball from this World. |
| Method Detail |
|---|
void addBall(Ball ballToAdd)
ballToAdd - the Ball to add to this World.void removeBall(Ball ballToRemove)
ballToRemove - the Ball to remove from this World.Ball nearestBall(Point2D p)
p - the point for which to find the nearest Ball.
Ball intersectingBall(Ball ballToCheckForIntersections)
ballToCheckForIntersections - Ball to check for intersection with other Balls.
List<Ball> intersectingBalls(Ball ballToCheckForIntersections)
Each call to this method returns a fresh List
ballToCheckForIntersections - Ball to check for intersection with other Balls.
List<Ball> allBallsInWorld()
Each call to this method returns a fresh List
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||