All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----pmr.euclid.Status | +----pmr.euclid.Line3
Line3 represents a 3-dimensional line. It is one of a set of primitives which can be combined to create and manipulate complex 3-dimensional objects. Lines can be transformed with rotation matrices or rotation-translation matrices (Transform3), can be calculated from other primitives or can be used to generate other primitives.
A line is a vector which is located in space. It is described by a unit vector (v) and a point (p) on the line. Any point on the line can be used for p, and p could change during the existence of a calculation without affecting the integrity of the line, e.g. p = {1,1,1}, v = {1,0,0} is the same line as p = {2,1,1}, v = {1,0,0}. However the absolute direction of v IS important, giving the line a direction.
Default is a default Point3 (0.0, 0.0, 0.0) and default Vector3 (0.0, 0.0, 0.0). Operations on this line may lead to Exceptions such as ZeroLengthVector.
public Line3()
public Line3(Point3 p, Vector3 v)
public Line3(Vector3 v, Point3 p)
public Line3(Point3 p1, Point3 p2)
public Line3(Line3 l)
public boolean equals(Line3 l2)
public Line3 subtract()
public Vector3 getVector()
public Point3 getPoint()
public Line3 transform(Transform3 t)
public boolean isParallelTo(Line3 l2)
public boolean isAntiparallelTo(Line3 l2)
public boolean containsPoint(Point3 p)
public Point3 getClosestPointTo(Point3 p2)
public double getDistanceFromPoint(Point3 p)
public Point3 getIntersectionWith(Plane3 pl)
publicString toString()
public static void main(String args[])
All Packages Class Hierarchy This Package Previous Next Index