- java.lang.Object
-
- spice.basic.Ray
-
public class Ray extends java.lang.Object
Class Ray represents rays in three-dimensional Euclidean space.Rays always have unit-length direction vectors.
Version 1.0.0 03-DEC-2009 (NJB)
-
-
Method Summary
Modifier and Type Method Description Vector3
getDirection()
Return a direction vector for this Ray..Vector3
getVertex()
Return the vertex for this Ray..java.lang.String
toString()
Convert this Ray to a String.
-
-
-
Constructor Detail
-
Ray
public Ray()
Zero-arguments constructor.
-
Ray
public Ray(Ray r)
Copy constructor.This constructor creates a deep copy.- Parameters:
r
- Ray
-
Ray
public Ray(Vector3 vertex, Vector3 direction) throws SpiceException
Create a Ray from a vertex and direction.The stored direction vector is a unit-length copy of the corresponding input vector.
- Parameters:
vertex
- Vector3direction
- Vector3- Throws:
SpiceException
- exception
-
-
Method Detail
-
getVertex
public Vector3 getVertex()
Return the vertex for this Ray..- Returns:
- Vector3
-
getDirection
public Vector3 getDirection()
Return a direction vector for this Ray..- Returns:
- Vector3
-
toString
public java.lang.String toString()
Convert this Ray to a String.- Overrides:
toString
in classjava.lang.Object
- Returns:
- String
-
-