Module JNISpice
Package spice.basic

Class Ellipsoid


  • public class Ellipsoid
    extends java.lang.Object
    Class Ellipsoid represents tri-axial ellipsoids in three-dimensional, Euclidean space.

    JNISpice Ellipsoids are centered at the origin and have semi-axes aligned with the x, y, and z coordinate axes. JNISpice Ellipsoids are required to have positive semi-axis lengths.

    To find the closest point on an Ellipsoid to a given point, see class EllipsoidPointNearPoint.

    To find the closest point on an Ellipsoid to a given line, see class EllipsoidLineNearPoint.

    To find the intercept on an Ellipsoid of a given Ray, see class RayEllipsoidIntercept.

    Version 1.0.0 28-NOV-2009 (NJB)

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private double[] radii  
    • Constructor Summary

      Constructors 
      Constructor Description
      Ellipsoid()
      No-arguments constructor.
      Ellipsoid​(double a, double b, double c)
      Construct an ellipsoid from three semi-axis lengths.
      Ellipsoid​(Ellipsoid ell)
      Copy constructor.This constructor creates a deep copy.
    • Method Summary

      Modifier and Type Method Description
      Ellipse getLimb​(Vector3 viewpt)
      Find the limb of this Ellipsoid, as seen from a given viewing location.
      Vector3 getNormal​(Vector3 point)
      Find the unit outward surface normal at a specified point on this Ellipsoid's surface.
      double[] getRadii()
      Get radii of this Ellipsoid.
      java.lang.String toString()
      Display an Ellipsoid as a string; override Object's toString() method.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • radii

        private double[] radii
    • Constructor Detail

      • Ellipsoid

        public Ellipsoid()
        No-arguments constructor. This constructor generates a unit sphere.
      • Ellipsoid

        public Ellipsoid​(Ellipsoid ell)
        Copy constructor.This constructor creates a deep copy.
        Parameters:
        ell - Ellipsoid
      • Ellipsoid

        public Ellipsoid​(double a,
                         double b,
                         double c)
                  throws SpiceException
        Construct an ellipsoid from three semi-axis lengths.
        Parameters:
        a - double
        c - double
        b - double
        Throws:
        SpiceException - exeption
    • Method Detail

      • getRadii

        public double[] getRadii()
        Get radii of this Ellipsoid.
        Returns:
        double[]
      • getNormal

        public Vector3 getNormal​(Vector3 point)
                          throws SpiceException
        Find the unit outward surface normal at a specified point on this Ellipsoid's surface.
        Parameters:
        point - Vector3
        Returns:
        Vector3
        Throws:
        SpiceException - exeption
      • getLimb

        public Ellipse getLimb​(Vector3 viewpt)
                        throws SpiceException
        Find the limb of this Ellipsoid, as seen from a given viewing location.
        Parameters:
        viewpt - Vector3
        Returns:
        Ellipse
        Throws:
        SpiceException - exeption
      • toString

        public java.lang.String toString()
        Display an Ellipsoid as a string; override Object's toString() method.
        Overrides:
        toString in class java.lang.Object
        Returns:
        String