- java.lang.Object
-
- spice.basic.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
-
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.
-
-
-
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
- doublec
- doubleb
- 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 classjava.lang.Object
- Returns:
- String
-
-