| 
 | Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.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 | centerthe center of the circle | 
|  double | radiusthe 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 collinear
public 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.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparable| 
 | © Copyright 2000-2025, yWorks GmbH. All rights reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||