jdsl.geomobj.ref
Class GeomSelector2DImpl

java.lang.Object
  |
  +--jdsl.geomobj.ref.GeomSelector2DImpl
All Implemented Interfaces:
GeomSelector2D

public class GeomSelector2DImpl
extends java.lang.Object
implements GeomSelector2D

Default implementation of the GeomSelector2D interface

Version:
$Id: GeomSelector2DImpl.java,v 1.4 2000/04/03 18:15:49 lv Exp $
Author:
Masi Oka (mao)

Constructor Summary
GeomSelector2DImpl()
           
 
Method Summary
 Point2D closer(Point2D q1, Point2D q2, Point2D p)
           
 Point2D farther(Point2D q1, Point2D q2, Point2D p)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeomSelector2DImpl

public GeomSelector2DImpl()
Method Detail

closer

public Point2D closer(Point2D q1,
                      Point2D q2,
                      Point2D p)
Specified by:
closer in interface GeomSelector2D
Following copied from interface: jdsl.geomobj.api.GeomSelector2D
Parameters:
q1 - a point
q2 - a point
p - a point
Returns:
the closer point to p between q1 and q2 (either q1 or q2 if they are equidistant from p)
Throws:
InvalidPointException - if either q1 or q2 or p is Point2D.INFINITE

farther

public Point2D farther(Point2D q1,
                       Point2D q2,
                       Point2D p)
Specified by:
farther in interface GeomSelector2D
Following copied from interface: jdsl.geomobj.api.GeomSelector2D
Parameters:
q1 - a point
q2 - a point
p - a point
Returns:
the farther point to p between q1 and q2 (either q1 or q2 if they are equidistant from p)
Throws:
InvalidPointException - if either q1 or q2 or p is Point2D.INFINITE