jdsl.geomobj.ref
Class GeomConstructor2DImpl
java.lang.Object
|
+--jdsl.geomobj.ref.GeomConstructor2DImpl
- All Implemented Interfaces:
- GeomConstructor2D
- public class GeomConstructor2DImpl
- extends java.lang.Object
- implements GeomConstructor2D
Default implementation of the GeomConstructor2D interface.
- Version:
- $Id: GeomConstructor2DImpl.java,v 1.3 2000/04/05 21:39:32 mdh Exp $
- Author:
- Masi Oka (mao), Galina Shubina (gs), Luca Vismara (lv)
Method Summary |
protected Point2D |
computeSingleIntersection(IntPoint2D p1,
IntPoint2D p2,
IntPoint2D q1,
IntPoint2D q2)
|
protected GeomObject2D |
intersectionGeomObject(IntLine2D l1,
IntLine2D l2)
|
protected GeomObject2D |
intersectionGeomObject(IntLine2D l,
IntRay2D r)
|
protected GeomObject2D |
intersectionGeomObject(IntLine2D l,
IntSegment2D s)
|
protected GeomObject2D |
intersectionGeomObject(IntRay2D r1,
IntRay2D r2)
|
protected GeomObject2D |
intersectionGeomObject(IntRay2D r,
IntSegment2D s)
|
protected GeomObject2D |
intersectionGeomObject(IntSegment2D s1,
IntSegment2D s2)
|
protected GeomObject2D |
intersectionGeomObject(Line2D l1,
Line2D l2)
|
protected GeomObject2D |
intersectionGeomObject(Line2D l,
Ray2D r)
|
protected GeomObject2D |
intersectionGeomObject(Line2D l,
Segment2D s)
|
GeomObject2D |
intersectionGeomObject(LinearCurve2D lc1,
LinearCurve2D lc2)
|
protected GeomObject2D |
intersectionGeomObject(Ray2D r1,
Ray2D r2)
|
protected GeomObject2D |
intersectionGeomObject(Ray2D r,
Segment2D s)
|
protected GeomObject2D |
intersectionGeomObject(Segment2D s1,
Segment2D s2)
|
protected Point2D |
midPoint(IntPoint2D p1,
IntPoint2D p2)
|
Point2D |
midPoint(Point2D p1,
Point2D p2)
|
Line2D |
perpendicularLine(LinearCurve2D lc,
Point2D p)
|
Ray2D |
perpendicularRay(LinearCurve2D lc,
Point2D source)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GeomConstructor2DImpl
public GeomConstructor2DImpl()
midPoint
public Point2D midPoint(Point2D p1,
Point2D p2)
throws InvalidPointException
- Specified by:
midPoint
in interface GeomConstructor2D
- Following copied from interface:
jdsl.geomobj.api.GeomConstructor2D
- 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)
throws InvalidLinearCurveException
- Specified by:
intersectionGeomObject
in interface GeomConstructor2D
- Following copied from interface:
jdsl.geomobj.api.GeomConstructor2D
- 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 InvalidLinearCurveException,
InvalidPointException
- Specified by:
perpendicularLine
in interface GeomConstructor2D
- Following copied from interface:
jdsl.geomobj.api.GeomConstructor2D
- 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 InvalidLinearCurveException,
InvalidPointException
- Specified by:
perpendicularRay
in interface GeomConstructor2D
- Following copied from interface:
jdsl.geomobj.api.GeomConstructor2D
- 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
midPoint
protected Point2D midPoint(IntPoint2D p1,
IntPoint2D p2)
intersectionGeomObject
protected GeomObject2D intersectionGeomObject(Line2D l1,
Line2D l2)
intersectionGeomObject
protected GeomObject2D intersectionGeomObject(Line2D l,
Ray2D r)
intersectionGeomObject
protected GeomObject2D intersectionGeomObject(Line2D l,
Segment2D s)
intersectionGeomObject
protected GeomObject2D intersectionGeomObject(Ray2D r1,
Ray2D r2)
intersectionGeomObject
protected GeomObject2D intersectionGeomObject(Ray2D r,
Segment2D s)
intersectionGeomObject
protected GeomObject2D intersectionGeomObject(Segment2D s1,
Segment2D s2)
intersectionGeomObject
protected GeomObject2D intersectionGeomObject(IntLine2D l1,
IntLine2D l2)
intersectionGeomObject
protected GeomObject2D intersectionGeomObject(IntLine2D l,
IntRay2D r)
intersectionGeomObject
protected GeomObject2D intersectionGeomObject(IntLine2D l,
IntSegment2D s)
intersectionGeomObject
protected GeomObject2D intersectionGeomObject(IntRay2D r1,
IntRay2D r2)
intersectionGeomObject
protected GeomObject2D intersectionGeomObject(IntRay2D r,
IntSegment2D s)
intersectionGeomObject
protected GeomObject2D intersectionGeomObject(IntSegment2D s1,
IntSegment2D s2)
computeSingleIntersection
protected Point2D computeSingleIntersection(IntPoint2D p1,
IntPoint2D p2,
IntPoint2D q1,
IntPoint2D q2)