jdsl.geomobj.ref
Class IntPoint2D
java.lang.Object
|
+--jdsl.geomobj.ref.AbstractGeomObject2D
|
+--jdsl.geomobj.ref.IntPoint2D
- All Implemented Interfaces:
- GeomObject, GeomObject2D, Point2D
- public class IntPoint2D
- extends AbstractGeomObject2D
- implements Point2D
This is the class for a two-dimensional geometric point with
integer coordinates.
- Version:
- $Id: IntPoint2D.java,v 1.5 2000/03/28 17:58:55 lv Exp $
- Author:
- Masi Oka (mao), Luca Vismara (lv)
Field Summary |
protected long |
x_
|
protected long |
y_
|
Method Summary |
int |
arithmeticType()
The arithmetic type of a geometric object is encoded as an
integer number. |
boolean |
equals(java.lang.Object obj)
|
long |
intx()
The direct use of this method is dicouraged; computations should
be performed through methods of GeomTester2D. |
long |
inty()
The direct use of this method is dicouraged; computations should
be performed through methods of GeomTester2D. |
java.lang.String |
toString()
|
double |
x()
This approximate method is provided for visualization purposes
only; computations should be performed through methods of
GeomTester2D. |
double |
y()
This approximate method is provided for visualization purposes
only; computations should be performed through methods of
GeomTester2D. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
x_
protected long x_
y_
protected long y_
IntPoint2D
public IntPoint2D(int x,
int y)
- Parameters:
x
- x-coordinate of the pointy
- y-coordinate of the point
IntPoint2D
public IntPoint2D(long x,
long y)
- Parameters:
x
- x-coordinate of the pointy
- y-coordinate of the point
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
- Returns:
- whether obj is an IntPoint2D equal to this
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
x
public double x()
- Description copied from interface:
Point2D
- This approximate method is provided for visualization purposes
only; computations should be performed through methods of
GeomTester2D.
- Specified by:
x
in interface Point2D
- Following copied from interface:
jdsl.geomobj.api.Point2D
- Returns:
- a double approximation of the x coordinate of this
y
public double y()
- Description copied from interface:
Point2D
- This approximate method is provided for visualization purposes
only; computations should be performed through methods of
GeomTester2D.
- Specified by:
y
in interface Point2D
- Following copied from interface:
jdsl.geomobj.api.Point2D
- Returns:
- a double approximation of the y coordinate of this
intx
public long intx()
- The direct use of this method is dicouraged; computations should
be performed through methods of GeomTester2D.
inty
public long inty()
- The direct use of this method is dicouraged; computations should
be performed through methods of GeomTester2D.