|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--y.geom.YCircle
This class represents a circle in the plane. A circle is defined by its center point and its radius.
Field Summary | |
YPoint |
center
the center of the circle |
double |
radius
the radius of the circle |
Constructor Summary | |
YCircle(double radius)
Instantiates a circle with center location (0,0) and given radius. |
|
YCircle(YPoint center,
double radius)
Returns a circle defined by its center and the radius. |
|
YCircle(YPoint prevPoint,
YPoint succPoint,
double radius)
Instantiates a circle defined by two points on its boundary and the radius. |
|
YCircle(YPoint p,
YPoint q,
YPoint r)
Instantiates a circle defined by three points on its boundary. |
Method Summary | |
int |
compareTo(Object o)
|
boolean |
equals(Object o)
|
YPoint |
getCenter()
Returns the center of the circle. |
YPoint[] |
getCut(AffineLine line)
Determines the intersection between this circle and a line. |
double |
getRadius()
Returns the radius of the circle. |
YPoint[] |
getRectCut(YPoint corner,
YDimension size)
Returns the intersection points of the circle with a rectangle. |
YPoint[] |
getXCut(double y)
Determine the intersection between the circle and a parallel to the X-Axis. |
YPoint[] |
getYCut(double x)
Determine the intersection between the circle and a parallel to the Y-Axis. |
int |
hashCode()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public final YPoint center
public final double radius
Constructor Detail |
public YCircle(double radius)
(0,0)
and given radius.
public YCircle(YPoint prevPoint, YPoint succPoint, double radius)
public YCircle(YPoint p, YPoint q, YPoint r)
IllegalArgumentException
- if the points are colinearpublic YCircle(YPoint center, double radius)
Method Detail |
public YPoint getCenter()
public final double getRadius()
public YPoint[] getXCut(double y)
y
- y coordinate of the parallel.public YPoint[] getYCut(double x)
x
- x coordinate of the parallel.public YPoint[] getCut(AffineLine line)
public YPoint[] getRectCut(YPoint corner, YDimension size)
corner
- the upper left corner of the rectanglesize
- the size of the rectangle
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public int compareTo(Object o)
compareTo
in interface Comparable
|
© Copyright 2000-2003, yWorks GmbH. All rights reserved. 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |