jdsl.geomobj.ref
Class IntCircle2D
java.lang.Object
|
+--jdsl.geomobj.ref.AbstractGeomObject2D
|
+--jdsl.geomobj.ref.AbstractCircle2D
|
+--jdsl.geomobj.ref.IntCircle2D
- All Implemented Interfaces:
- Circle2D, ClosedCurve2D, Curve2D, GeomObject, GeomObject2D
- public class IntCircle2D
- extends AbstractCircle2D
- implements Circle2D
This is the class for a two-dimensional circle constructed using
three integer points.
- Version:
- $Id: IntCircle2D.java,v 1.5 2001/05/16 13:44:56 lv Exp $
- Author:
- Masi Oka (mao), Luca Vismara (lv)
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
p1_
protected IntPoint2D p1_
p2_
protected IntPoint2D p2_
p3_
protected IntPoint2D p3_
IntCircle2D
public IntCircle2D(Point2D p1,
Point2D p2,
Point2D p3)
throws InvalidPointException
- Parameters:
p1
- a point of the circle; must be an integer pointp2
- a second point of the circle; must be an integer
point distinct from p1p3
- a third point of the circle; must be an integer
point distinct from p1 and p2- Throws:
InvalidPointException
- if p1, p2, and p3 are not
integer points, or if p1, p2, and p3 are not distinct, or if p1,
p2, and p3 are collinear
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
arithmeticType
public int arithmeticType()
- Description copied from interface:
GeomObject
- The arithmetic type of a geometric object is encoded as an
integer number. Current legal values are:
0 = an integer geometric object
1 = a rational geometric object
- Specified by:
arithmeticType
in interface GeomObject
- Following copied from interface:
jdsl.geomobj.api.GeomObject
- Returns:
- the arithmetic type of this
points
public Point2D[] points()
- Specified by:
points
in interface ClosedCurve2D
- Following copied from interface:
jdsl.geomobj.api.ClosedCurve2D
- Returns:
- an array of points defining this; the points are in
clockwise order
computeCenter
protected void computeCenter()
- Overrides:
computeCenter
in class AbstractCircle2D
computeSqRadius
protected void computeSqRadius()
- Overrides:
computeSqRadius
in class AbstractCircle2D