jdsl.geomobj.api
Interface TwoArgsGeomTests2D
- All Known Subinterfaces:
- GeomTester2D
- All Known Implementing Classes:
- RatIntGeomTests2D, IntRatGeomTests2D, RatRatGeomTests2D, IntIntGeomTests2D
- public interface TwoArgsGeomTests2D
A collection of geometric tests taking two arguments. The
parameters of the methods are interfaces.
- Version:
- $Id: TwoArgsGeomTests2D.java,v 1.2 2000/04/03 18:00:51 lv Exp $
- Author:
- Luca Vismara (lv)
aboveBelow
public int aboveBelow(Point2D q,
Point2D p)
throws InvalidPointException
- Parameters:
q
- a pointp
- 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)
throws InvalidPointException
- Parameters:
q
- a pointp
- 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)
- Parameters:
lc1
- a linear curvelc2
- 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)
throws InvalidPointException
- Parameters:
q
- a pointc
- a circle- Returns:
- whether q is GeomTester2D.INSIDE, GeomTester2D.ON, or
GeomTester2D.OUTSIDE c
- Throws:
InvalidPointException
- if q is Point2D.INFINITE