|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Shape
This interface represents the properties that a shape should have in order for it to be moved around and to figure out if and when another object is going to bump into it. The data types used in this interface are based on the Geometry class, for example Vect, Angle, LineSegment, and Circle.
| Method Summary | |
|---|---|
boolean |
containsPoint(Vect pt)
|
java.util.List<Circle> |
getCircles()
This method should return a list of Circle objects used to compose this shape. |
java.util.List<LineSegment> |
getLineSegments()
This method should return a list of LineSegment objects used to compose this shape. |
Vect |
maxXY()
|
Vect |
minXY()
|
Shape |
rotate(Angle theta,
Vect centerOfRotation)
This method rotates a shape around an arbitrary point and returns the new shape |
Shape |
translate(Vect v)
This method translates a shape by an arbitrary vector and returns the new shape |
| Method Detail |
|---|
boolean containsPoint(Vect pt)
java.util.List<Circle> getCircles()
java.util.List<LineSegment> getLineSegments()
Shape rotate(Angle theta,
Vect centerOfRotation)
theta - angle to rotatecenterOfRotation - point to rotate around
Shape translate(Vect v)
v - vector to translate shape by
Vect minXY()
Vect maxXY()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||