jdsl.geomobj.ref
Class RealLine2D
java.lang.Object
|
+--jdsl.geomobj.ref.AbstractGeomObject2D
|
+--jdsl.geomobj.ref.AbstractLinearCurve2D
|
+--jdsl.geomobj.ref.AbstractRealLinearCurve2D
|
+--jdsl.geomobj.ref.RealLine2D
- All Implemented Interfaces:
- Curve2D, GeomObject, GeomObject2D, Line2D, LinearCurve2D, OpenCurve2D
- public class RealLine2D
- extends AbstractRealLinearCurve2D
- implements Line2D
RealLine2D is a Line2D constructed using either two real points
or a real point and a real direction.
- Version:
- $Id: RealLine2D.java,v 1.1 2000/06/27 15:46:08 lv Exp $
- Author:
- Luca Vismara (lv)
Method Summary |
boolean |
equals(java.lang.Object obj)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
RealLine2D
public RealLine2D(Point2D p,
Direction2D dir)
throws InvalidPointException,
InvalidDirectionException
- Creates a line passing through point p with direction dir.
- Parameters:
p
- a point of the line; must be a real pointdir
- the real direction of the line- Throws:
InvalidPointException
- if p is not a real pointInvalidDirectionException
- if dir is not a real
direction
RealLine2D
public RealLine2D(Point2D p1,
Point2D p2)
throws InvalidPointException
- Creates a line passing through points p1 and p2; the underlying
direction is from p1 to p2.
- Parameters:
p1
- a point of the line; must be a real pointp2
- another point of the line; must be a real point
distinct from p1- Throws:
InvalidPointException
- if p1 and p2 are not real
points, or if p1 and p2 are coincident
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object