jdsl.geomobj.ref
Class RealPoint2D

java.lang.Object
  |
  +--jdsl.geomobj.ref.AbstractGeomObject2D
        |
        +--jdsl.geomobj.ref.RealPoint2D
All Implemented Interfaces:
GeomObject, GeomObject2D, Point2D

public class RealPoint2D
extends AbstractGeomObject2D
implements Point2D

This is the class for a two-dimensional geometric point with real coordinates.

Version:
$Id: RealPoint2D.java,v 1.2 2000/06/08 19:04:31 lv Exp $
Author:
Luca Vismara (lv)

Inner classes inherited from class jdsl.geomobj.api.Point2D
Point2D.InfinitePoint2D
 
Inner classes inherited from class jdsl.geomobj.api.GeomObject2D
GeomObject2D.NoneGeomObject2D
 
Field Summary
protected  double x_
           
protected  double y_
           
 
Fields inherited from class jdsl.geomobj.ref.AbstractGeomObject2D
gt, jn
 
Fields inherited from interface jdsl.geomobj.api.Point2D
INFINITE
 
Fields inherited from interface jdsl.geomobj.api.GeomObject2D
NONE
 
Constructor Summary
RealPoint2D(double x, double y)
           
RealPoint2D(float x, float y)
           
 
Method Summary
 int arithmeticType()
          The arithmetic type of a geometric object is encoded as an integer number.
 boolean equals(java.lang.Object obj)
           
 void setTolerance(double t)
          Sets the tolerance with which two real points are considered equal
 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 jdsl.geomobj.ref.AbstractGeomObject2D
dim
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jdsl.geomobj.api.GeomObject
dim
 

Field Detail

x_

protected double x_

y_

protected double y_
Constructor Detail

RealPoint2D

public RealPoint2D(float x,
                   float y)
Parameters:
x - x-coordinate of the point
y - y-coordinate of the point

RealPoint2D

public RealPoint2D(double x,
                   double y)
Parameters:
x - x-coordinate of the point
y - y-coordinate of the point
Method Detail

setTolerance

public void setTolerance(double t)
Sets the tolerance with which two real points are considered equal

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object
Returns:
whether obj is a RealPoint2D 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