jdsl.geomobj.api
Interface GeomConstructor2D
- All Known Implementing Classes:
- GeomConstructor2DImpl
- public interface GeomConstructor2D
A collection of methods that construct geometric objects. The
parameters of all the methods are interfaces.
- Version:
- $Id: GeomConstructor2D.java,v 1.2 2000/03/20 23:18:23 lv Exp $
- Author:
- Luca Vismara (lv)
midPoint
public Point2D midPoint(Point2D p1,
Point2D p2)
throws InvalidPointException
- Parameters:
p1 - a pointp2 - a point- Returns:
- the point equidistant from p1 and p2
- Throws:
InvalidPointException - if either p1 or p2 is
Point2D.INFINITE
intersectionGeomObject
public GeomObject2D intersectionGeomObject(LinearCurve2D lc1,
LinearCurve2D lc2)
- Parameters:
lc1 - a linear curvelc2 - a linear curve- Returns:
- the intersection of lc1 and lc2, either a point or a linear
curve or GeomObject2D.NONE
perpendicularLine
public Line2D perpendicularLine(LinearCurve2D lc,
Point2D p)
throws InvalidPointException
- Parameters:
lc - a linear curvep - a point- Returns:
- the line perpendicular to lc and passing through p
- Throws:
InvalidPointException - if p is Point2D.INFINITE
perpendicularRay
public Ray2D perpendicularRay(LinearCurve2D lc,
Point2D source)
throws InvalidPointException
- Parameters:
lc - a linear curvesource - the source of the ray- Returns:
- the ray perpendicular to lc and emanating from source
- Throws:
InvalidPointException - if source is Point2D.INFINITE