jdsl.geomobj.ref
Class RatRatGeomTests2D

java.lang.Object
  |
  +--jdsl.geomobj.ref.RatRatGeomTests2D
All Implemented Interfaces:
TwoArgsGeomTests2D

public class RatRatGeomTests2D
extends java.lang.Object
implements TwoArgsGeomTests2D

Default implementation of interface TwoArgsGeomTests2D with rational arguments.

Version:
$Id: RatRatGeomTests2D.java,v 1.2 2000/04/03 18:15:46 lv Exp $
Author:
Luca Vismara (lv)

Constructor Summary
RatRatGeomTests2D()
           
 
Method Summary
 int aboveBelow(Point2D q, Point2D p)
           
 int compareSlopes(LinearCurve2D lc1, LinearCurve2D lc2)
           
 int insideOutside(Point2D q, Circle2D c)
           
 int leftRight(Point2D q, Point2D p)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RatRatGeomTests2D

public RatRatGeomTests2D()
Method Detail

aboveBelow

public int aboveBelow(Point2D q,
                      Point2D p)
Specified by:
aboveBelow in interface TwoArgsGeomTests2D
Following copied from interface: jdsl.geomobj.api.TwoArgsGeomTests2D
Parameters:
q - a point
p - a point
Returns:
whether q is GeomTester2D.ABOVE, GeomTester2D.Y_ALIGNED, or GeomTester2D.BELOW p
Throws:
InvalidPointException - if either p or q is Point2D.INFINITE

leftRight

public int leftRight(Point2D q,
                     Point2D p)
Specified by:
leftRight in interface TwoArgsGeomTests2D
Following copied from interface: jdsl.geomobj.api.TwoArgsGeomTests2D
Parameters:
q - a point
p - a point
Returns:
whether q is to the GeomTester2D.LEFT, GeomTester2D.X_ALIGNED, or to the GeomTester2D.RIGHT of p
Throws:
InvalidPointException - if either p or q is Point2D.INFINITE

compareSlopes

public int compareSlopes(LinearCurve2D lc1,
                         LinearCurve2D lc2)
Specified by:
compareSlopes in interface TwoArgsGeomTests2D
Following copied from interface: jdsl.geomobj.api.TwoArgsGeomTests2D
Parameters:
lc1 - a linear curve
lc2 - a linear curve
Returns:
whether lc1 has a GeomTester2D.LESSER, GeomTester2D.EQUAL, or GeomTester2D.GREATER slope than lc2

insideOutside

public int insideOutside(Point2D q,
                         Circle2D c)
Specified by:
insideOutside in interface TwoArgsGeomTests2D
Following copied from interface: jdsl.geomobj.api.TwoArgsGeomTests2D
Parameters:
q - a point
c - a circle
Returns:
whether q is GeomTester2D.INSIDE, GeomTester2D.ON, or GeomTester2D.OUTSIDE c
Throws:
InvalidPointException - if q is Point2D.INFINITE