geometry
Class Line

java.lang.Object
  extended bygeometry.AffineSpace
      extended bygeometry.Line
All Implemented Interfaces:
Geometry

public class Line
extends AffineSpace

A line, as a special affine subspace of n-dimensional space, defined by a point and a vector. Points on the line can be described as a multiple of this vector, thus inducing a local coordinate system on the plane.

Author:
karsten

Field Summary
 
Fields inherited from class geometry.AffineSpace
origin, space
 
Constructor Summary
Line(Point origin, Vector x)
          Constructs a new line from a point and a vector.
 
Method Summary
 Vector getVector()
          Returns the base vector for the local coordinates, as given while constructing the line.
 
Methods inherited from class geometry.AffineSpace
add, add, affineClosure, canBeContainedIn, canContain, canIntersect, contains, contains, copy, dim, getGenerator, getNormal, getOrigin, getRandomRay, intersection, isContainedIn, localization, localization, outerDim, print, project, toShape
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Line

public Line(Point origin,
            Vector x)
Constructs a new line from a point and a vector. The vectors will become the base vector for the local coordinate system.

Parameters:
origin - any point in the plane
x - any direction contained in the plane
Method Detail

getVector

public Vector getVector()
Returns the base vector for the local coordinates, as given while constructing the line.

Returns:
the direction defining the line