|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.geom.YCircle
public class 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(java.lang.Object o)
|
boolean |
equals(java.lang.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)
java.lang.IllegalArgumentException
- if the points are collinearpublic 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(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |