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)

Inner classes inherited from class jdsl.geomobj.api.GeomObject2D
GeomObject2D.NoneGeomObject2D
 
Fields inherited from class jdsl.geomobj.ref.AbstractRealLinearCurve2D
dir_, p1_, p2_
 
Fields inherited from class jdsl.geomobj.ref.AbstractLinearCurve2D
bottom_, INFINITE, left_, NEGATIVE, POSITIVE, right_, slope_, top_, ZERO
 
Fields inherited from class jdsl.geomobj.ref.AbstractGeomObject2D
gt, jn
 
Fields inherited from interface jdsl.geomobj.api.GeomObject2D
NONE
 
Constructor Summary
RealLine2D(Point2D p, Direction2D dir)
          Creates a line passing through point p with direction dir.
RealLine2D(Point2D p1, Point2D p2)
          Creates a line passing through points p1 and p2; the underlying direction is from p1 to p2.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 
Methods inherited from class jdsl.geomobj.ref.AbstractRealLinearCurve2D
arithmeticType, direction, points
 
Methods inherited from class jdsl.geomobj.ref.AbstractLinearCurve2D
isDecreasing, isHorizontal, isIncreasing, isVertical, toString
 
Methods inherited from class jdsl.geomobj.ref.AbstractGeomObject2D
dim
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jdsl.geomobj.api.LinearCurve2D
direction, isDecreasing, isHorizontal, isIncreasing, isVertical
 
Methods inherited from interface jdsl.geomobj.api.OpenCurve2D
points
 
Methods inherited from interface jdsl.geomobj.api.GeomObject
arithmeticType, dim
 

Constructor Detail

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 point
dir - the real direction of the line
Throws:
InvalidPointException - if p is not a real point
InvalidDirectionException - 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 point
p2 - 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
Method Detail

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object