|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgizmoball.shape.Circle09
public class Circle09
This class represents a circle object with positive radius, implementing the Shape interface
| Constructor Summary | |
|---|---|
Circle09(Circle c)
Constructs an Circle09 object from a Circle object with positive radius |
|
Circle09(double cx,
double cy,
double r)
Constructs a circle given center coordinates and positive radius |
|
Circle09(java.awt.geom.Point2D center,
double r)
Constructs circle given center Point2D and positive radius |
|
Circle09(Vect center,
double r)
Constructs a circle given center vector and positive radius |
|
| Method Summary | |
|---|---|
boolean |
containsPoint(Vect pt)
|
Vect |
getCenter()
|
java.util.List<Circle> |
getCircles()
returns a list of circles in the object, consisting of the one circle object itself |
java.util.List<LineSegment> |
getLineSegments()
returns a list of edges in the object, consisting of the empty list |
double |
getRadius()
|
Vect |
maxXY()
Returns the maximum coordinates for a bounding rectangle around the circle |
Vect |
minXY()
Returns the minimum coordinates for a bounding rectangle around the circle |
Circle09 |
rotate(Angle theta,
Vect centerOfRotation)
rotates the circle by angle theta about a point and returns the new circle |
Circle09 |
translate(Vect v)
translates the circle by vector v and returns the new circle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Circle09(double cx,
double cy,
double r)
cx - x-coordinate of centercy - y-coordinate of centerr - radius
public Circle09(Vect center,
double r)
center - vector center of circler - radius
public Circle09(java.awt.geom.Point2D center,
double r)
center - Point2D at center of circler - radiuspublic Circle09(Circle c)
c - | Method Detail |
|---|
public Vect minXY()
minXY in interface Shapepublic Vect maxXY()
maxXY in interface Shapepublic double getRadius()
public Vect getCenter()
public boolean containsPoint(Vect pt)
containsPoint in interface Shapepublic java.util.List<Circle> getCircles()
getCircles in interface Shapepublic java.util.List<LineSegment> getLineSegments()
getLineSegments in interface Shape
public Circle09 rotate(Angle theta,
Vect centerOfRotation)
rotate in interface Shapetheta - angle to rotatecenterOfRotation - point to rotate around
public Circle09 translate(Vect v)
translate in interface Shapev - vector to translate shape by
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||