- java.lang.Object
-
- spice.basic.Line
-
public class Line extends java.lang.Object
Class Line represents lines in three-dimensional Euclidean space.Lines always have non-zero direction vectors.
Version 1.0.0 01-DEC-2009 (NJB)
-
-
Method Summary
Modifier and Type Method Description Vector3
getDirection()
Return a direction vector for this Line.Vector3
getNearPoint(Vector3 point)
Find the closest point on this line to a specified point.Vector3
getPoint()
Return a point on this Line.Ray
getRay()
Return a ray included by this Line.
-
-
-
Field Detail
-
ray
private Ray ray
-
-
Constructor Detail
-
Line
public Line()
Zero-arguments constructor. This creates a line coincident with the Z axis.
-
Line
public Line(Line line)
Copy constructor.This constructor creates a deep copy.- Parameters:
line
- Line
-
Line
public Line(Ray ray)
Create a Line from a Ray.- Parameters:
ray
- Ray
-
Line
public Line(Vector3 point, Vector3 direction) throws SpiceException
Create a Line from a point and direction.- Parameters:
point
- Vector3direction
- Vector3- Throws:
SpiceException
- exception
-
-
Method Detail
-
getRay
public Ray getRay()
Return a ray included by this Line.- Returns:
- Ray
-
getPoint
public Vector3 getPoint()
Return a point on this Line.- Returns:
- Vector3
-
getDirection
public Vector3 getDirection()
Return a direction vector for this Line.- Returns:
- Vector3
-
getNearPoint
public Vector3 getNearPoint(Vector3 point) throws SpiceException
Find the closest point on this line to a specified point.- Parameters:
point
- Vector3- Returns:
- Vector3
- Throws:
SpiceException
- exception
-
-