org.geotools.geometry.iso.util.elem2D
Class Circle2D
java.lang.Object
org.geotools.geometry.iso.util.elem2D.Circle2D
public class Circle2D
- extends java.lang.Object
- Author:
- Jackson Roehrig & Sanjay Jena
Circle2D A circle, representated by a X- and Y- Coordinate and a radius r. This
class provides a constructor building a unique circle from 3 points.
This class was translated from CPP into Java The original source code can be
found at http://astronomy.swin.edu.au/~pbourke/geometry/circlefrom3/
Constructor Summary |
Circle2D(double centerX,
double centerY,
double radius)
|
Circle2D(java.awt.geom.Point2D pt1,
java.awt.geom.Point2D pt2,
java.awt.geom.Point2D pt3)
Constructs a circle from three points |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Circle2D
public Circle2D(double centerX,
double centerY,
double radius)
Circle2D
public Circle2D(java.awt.geom.Point2D pt1,
java.awt.geom.Point2D pt2,
java.awt.geom.Point2D pt3)
- Constructs a circle from three points
- Parameters:
First
- nodeSecond
- nodeThirs
- node
getX
public double getX()
- Returns:
getY
public double getY()
- Returns:
getRadius
public double getRadius()
- Returns:
getCenter
public java.awt.geom.Point2D getCenter()
- Returns:
setRadius
public void setRadius(double radius)
- Parameters:
radius
- The radius to set.
setX
public void setX(double x)
- Parameters:
x
- The x to set.
setY
public void setY(double y)
- Parameters:
y
- The y to set.
setValues
public void setValues(double x,
double y,
double radius)
contains
public boolean contains(java.awt.geom.Point2D dp)
- Verifies weather the circle contains a node or not.
Point laying at the border of the circle are not contained by the circle.
- Parameters:
dp
-
- Returns:
getRectangle
public java.awt.geom.Rectangle2D getRectangle()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 1996-2010 Geotools. All Rights Reserved.