Package gov.nasa.worldwind.geom
Class Ellipsoid
- java.lang.Object
-
- gov.nasa.worldwind.geom.Ellipsoid
-
public class Ellipsoid extends java.lang.ObjectOblate ellipsoid with semi-major axis and inverse flattening.
-
-
Constructor Summary
Constructors Constructor Description Ellipsoid()Constructs an ellipsoid with semi-major axis and inverse flattening both 1.0.Ellipsoid(double semiMajorAxis, double inverseFlattening)Constructs an ellipsoid with a specified semi-major axis and inverse flattening.Ellipsoid(Ellipsoid ellipsoid)Constructs an ellipsoid with the semi-major axis and inverse flattening of a specified ellipsoid.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doubleeccentricitySquared()Computes this ellipsoid's eccentricity squared.booleanequals(java.lang.Object o)inthashCode()doubleinverseFlattening()Computes this ellipsoid's inverse flattening, a measure of an ellipsoid's compression.doublesemiMajorAxis()Computes this ellipsoid's semi-major axis length in meters.doublesemiMinorAxis()Computes this ellipsoid's semi-minor length axis in meters.Ellipsoidset(double semiMajorAxis, double inverseFlattening)Sets this ellipsoid to a specified semi-major axis and inverse flattening.Ellipsoidset(Ellipsoid ellipsoid)Sets this ellipsoid to the semi-major axis and inverse flattening of a specified ellipsoid.java.lang.StringtoString()
-
-
-
Constructor Detail
-
Ellipsoid
public Ellipsoid()
Constructs an ellipsoid with semi-major axis and inverse flattening both 1.0.
-
Ellipsoid
public Ellipsoid(double semiMajorAxis, double inverseFlattening)Constructs an ellipsoid with a specified semi-major axis and inverse flattening.- Parameters:
semiMajorAxis- one half of the ellipsoid's major axis length in meters, which runs through the center to opposite points on the equatorinverseFlattening- measure of the ellipsoid's compression, indicating how much the semi-minor axis is compressed relative to the semi-major axis
-
Ellipsoid
public Ellipsoid(Ellipsoid ellipsoid)
Constructs an ellipsoid with the semi-major axis and inverse flattening of a specified ellipsoid.- Parameters:
ellipsoid- the ellipsoid specifying the values- Throws:
java.lang.IllegalArgumentException- If the ellipsoid is null
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
@NonNull public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
set
public Ellipsoid set(double semiMajorAxis, double inverseFlattening)
Sets this ellipsoid to a specified semi-major axis and inverse flattening.- Parameters:
semiMajorAxis- the new semi-major axis length in meters, one half of the ellipsoid's major axis, which runs through the center to opposite points on the equatorinverseFlattening- the new inverse flattening, a measure of the ellipsoid's compression, indicating how much the semi-minor axis is compressed relative to the semi-major axis- Returns:
- this ellipsoid with its semi-major axis and inverse flattening set to the specified values
-
set
public Ellipsoid set(Ellipsoid ellipsoid)
Sets this ellipsoid to the semi-major axis and inverse flattening of a specified ellipsoid.- Parameters:
ellipsoid- the ellipsoid specifying the new values- Returns:
- this ellipsoid with its semi-major axis and inverse flattening set to that of the specified ellipsoid
- Throws:
java.lang.IllegalArgumentException- If the ellipsoid is null
-
semiMajorAxis
public double semiMajorAxis()
Computes this ellipsoid's semi-major axis length in meters. The semi-major axis is one half of the ellipsoid's major axis, which runs through the center to opposite points on the equator.- Returns:
- this ellipsoid's semi-major axis length in meters
-
semiMinorAxis
public double semiMinorAxis()
Computes this ellipsoid's semi-minor length axis in meters. The semi-minor axis is one half of the ellipsoid's minor axis, which runs through the center to opposite points on the poles.- Returns:
- this ellipsoid's semi-minor axis length in meters
-
inverseFlattening
public double inverseFlattening()
Computes this ellipsoid's inverse flattening, a measure of an ellipsoid's compression. The returned value is equivalent toa / (a - b), whereaandbindicate this ellipsoid's semi-major axis and semi-minor axis, respectively.- Returns:
- this ellipsoid's inverse flattening
-
eccentricitySquared
public double eccentricitySquared()
Computes this ellipsoid's eccentricity squared. The returned value is equivalent to2*f - f*f, wherefis this ellipsoid's flattening.- Returns:
- this ellipsoid's eccentricity squared
-
-