Module JNISpice
Package spice.basic

Class 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)

    • Constructor Summary

      Constructors 
      Constructor Description
      Ray()
      Zero-arguments constructor.
      Ray​(Ray r)
      Copy constructor.This constructor creates a deep copy.
      Ray​(Vector3 vertex, Vector3 direction)
      Create a Ray from a vertex and direction.
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 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 - Vector3
        direction - 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 class java.lang.Object
        Returns:
        String