JNISpice
version 2.0.0

spice.basic
Class Line

java.lang.Object
  extended by 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)


Constructor Summary
Line()
          Zero-arguments constructor.
Line(Line line)
          Copy constructor.
Line(Ray ray)
          Create a Line from a Ray.
Line(Vector3 point, Vector3 direction)
          Create a Line from a point and direction.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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.


Line

public Line(Ray ray)
Create a Line from a Ray.


Line

public Line(Vector3 point,
            Vector3 direction)
     throws SpiceException
Create a Line from a point and direction.

Throws:
SpiceException
Method Detail

getRay

public Ray getRay()
Return a ray included by this Line.


getPoint

public Vector3 getPoint()
Return a point on this Line.


getDirection

public Vector3 getDirection()
Return a direction vector for this Line.


getNearPoint

public Vector3 getNearPoint(Vector3 point)
                     throws SpiceException
Find the closest point on this line to a specified point.

Throws:
SpiceException

JNISpice
version 2.0.0

JNISpice Alpha Test Version 2.0.0 28-JAN-2017 (NJB)