public class Ellipsoid
extends java.lang.Object
Constructor and 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.
|
Modifier and Type | Method and Description |
---|---|
double |
eccentricitySquared()
Computes this ellipsoid's eccentricity squared.
|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
double |
inverseFlattening()
Computes this ellipsoid's inverse flattening, a measure of an ellipsoid's compression.
|
double |
semiMajorAxis()
Computes this ellipsoid's semi-major axis length in meters.
|
double |
semiMinorAxis()
Computes this ellipsoid's semi-minor length axis in meters.
|
Ellipsoid |
set(double semiMajorAxis,
double inverseFlattening)
Sets this ellipsoid to a specified semi-major axis and inverse flattening.
|
Ellipsoid |
set(Ellipsoid ellipsoid)
Sets this ellipsoid to the semi-major axis and inverse flattening of a specified ellipsoid.
|
java.lang.String |
toString() |
public Ellipsoid()
public Ellipsoid(double semiMajorAxis, double inverseFlattening)
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 axispublic Ellipsoid(Ellipsoid ellipsoid)
ellipsoid
- the ellipsoid specifying the valuesjava.lang.IllegalArgumentException
- If the ellipsoid is nullpublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public Ellipsoid set(double semiMajorAxis, double inverseFlattening)
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 axispublic Ellipsoid set(Ellipsoid ellipsoid)
ellipsoid
- the ellipsoid specifying the new valuesjava.lang.IllegalArgumentException
- If the ellipsoid is nullpublic double semiMajorAxis()
public double semiMinorAxis()
public double inverseFlattening()
a / (a - b)
, where a
and b
indicate this ellipsoid's semi-major axis and
semi-minor axis, respectively.public double eccentricitySquared()
2*f - f*f
,
where f
is this ellipsoid's flattening.