SpatiumLib
Public Member Functions | Static Public Member Functions | Friends | List of all members
spatium::geom3d::OblateSpheroid Class Reference

Oblate spheroid geometry. More...

#include <OblateSpheroid.h>

Inheritance diagram for spatium::geom3d::OblateSpheroid:
Inheritance graph
[legend]
Collaboration diagram for spatium::geom3d::OblateSpheroid:
Collaboration graph
[legend]

Public Member Functions

 OblateSpheroid (const Point3 &origin, double axisXY, double axisZ)
 Constructor. Required: axisXY > axisZ. More...
 
 OblateSpheroid (double axisXY, double axisZ)
 Constructor Required: axisXY > axisZ. More...
 
double flattening () const
 Compute the flattening. More...
 
double eccentricity () const
 Compute the eccentricity. More...
 
Point3 spheroidalToCartesianCoordinates (double longitude, double latitude, double height) const
 Compute Cartesian coordinates from oblate spheroidal coordinates. Cartesian vector (1, 0, 0) points towards origin of spheroidal coordinate system. (TODO Discrepancy) More...
 
Point3 spheroidalToCartesianCoordinates (GeoPoint3 geoPoint) const
 Compute Cartesian coordinates from oblate spheroidal coordinates. Cartesian vector (1, 0, 0) points towards origin of spheroidal coordinate system. (TODO Discrepancy) More...
 
GeoPoint3 cartesianToSpheroidalCoordinates (double x, double y, double z, double precision=0) const
 Compute oblate spheroidal coordinates from Cartesian coordinates. Cartesian vector (-1, 0, 0) points towards origin of spheroidal coordinate system. (TODO Discrepancy) More...
 
GeoPoint3 cartesianToSpheroidalCoordinates (Point3 point, double precision=0) const
 Compute oblate spheroidal coordinates from Cartesian coordinates. Cartesian vector (-1, 0, 0) points towards origin of spheroidal coordinate system. (TODO Discrepancy) More...
 
- Public Member Functions inherited from spatium::geom3d::Spheroid
 Spheroid (const Point3 &origin, double axisXY, double axisZ)
 Constructor. More...
 
 Spheroid (double axisXY, double axisZ)
 Constructor. More...
 
 Spheroid (const Spheroid &other)=default
 Copy constructor. More...
 
Spheroidoperator= (const Spheroid &other)=default
 Assignment operator. More...
 
virtual ~Spheroid ()=default
 Destructor. More...
 
void axisXY (double axisXY)
 Set X and Y axis length. More...
 
double axisXY () const
 Get X and Y axis length. More...
 
- Public Member Functions inherited from spatium::geom3d::Ellipsoid
 Ellipsoid (const Point3 &origin, double axisX, double axisY, double axisZ)
 Constructor. More...
 
 Ellipsoid (double axisX, double axisY, double axisZ)
 Constructor. More...
 
 Ellipsoid (const Ellipsoid &other)=default
 Copy constructor. More...
 
Ellipsoidoperator= (const Ellipsoid &other)=default
 Assignment operator. More...
 
virtual ~Ellipsoid ()=default
 Destructor. More...
 
void origin (const Point3 &origin)
 Set origin of ellipsoid. More...
 
Point3 origin () const
 Get origin of ellipsoid. More...
 
void axisX (double axisX)
 Set the X axis length. More...
 
double axisX () const
 Get the X axis length. More...
 
void axisY (double axisY)
 Set the Y axis length. More...
 
double axisY () const
 Get the Y axis length. More...
 
void axisZ (double axisZ)
 Set the Z axis length. More...
 
double axisZ () const
 Get the Z axis length. More...
 
double distanceTo (const Point3 &point) const override
 Compute Euclidean distance to point. More...
 
Point3 projectPoint (const Point3 &point) const override
 Project point onto ellipsoid. More...
 
bool intersectLine (const Point3 &origin, const Vector3 &direction, Point3 &intersection) const override
 Intersect line with ellipsoid. More...
 
Vector3 surfaceNormal (const Point3 &point) const
 Compute surface normal at given point. More...
 
Point3 pointOnHorizon (const Point3 &point, double direction, bool poleLimit=false)
 Compute point on horizon in a given direction. More...
 
- Public Member Functions inherited from spatium::geom3d::Geometry
 Geometry ()=default
 
virtual ~Geometry ()=default
 

Static Public Member Functions

static OblateSpheroid byFlattening (const Point3 &origin, double axisXY, double inverseFlattening)
 Create oblate spheroid by a given inverse flattening (1/f). More...
 

Friends

std::ostream & operator<< (std::ostream &os, const OblateSpheroid &spheroid)
 Output to ostream. More...
 

Additional Inherited Members

- Protected Member Functions inherited from spatium::geom3d::Ellipsoid
void updateTransformation ()
 Update the transformation parameters that transform a sphere into this ellipsoid. These parameters are internally used to represent the ellipsoid as a transformed sphere. More...
 
- Protected Attributes inherited from spatium::geom3d::Ellipsoid
Matrix4x4 m_ellipsoidalTransformation
 
Matrix4x4 m_ellipsoidalTransformationInverse
 
Point3 m_origin
 
double m_axisX
 
double m_axisY
 
double m_axisZ
 

Detailed Description

Oblate spheroid geometry.

An oblate spheroid is a flattened spheroid. The equatorial axis length is greater than the polar axis length. Such a spheroid is perfect for approximating the shape of the earh.

Constructor & Destructor Documentation

◆ OblateSpheroid() [1/2]

spatium::geom3d::OblateSpheroid::OblateSpheroid ( const Point3 origin,
double  axisXY,
double  axisZ 
)
inline

Constructor. Required: axisXY > axisZ.

Parameters
[in]originOrigin
[in]axisXYX and Y axis length
[in]axisZZ axis length

◆ OblateSpheroid() [2/2]

spatium::geom3d::OblateSpheroid::OblateSpheroid ( double  axisXY,
double  axisZ 
)
inline

Constructor Required: axisXY > axisZ.

Parameters
[in]axisXYX and Y axis length
[in]axisZZ axis length

Member Function Documentation

◆ byFlattening()

static OblateSpheroid spatium::geom3d::OblateSpheroid::byFlattening ( const Point3 origin,
double  axisXY,
double  inverseFlattening 
)
inlinestatic

Create oblate spheroid by a given inverse flattening (1/f).

Parameters
[in]originOrigin of spheroid
[in]axisXYX and Y axis length (equatorial)
[in]inverseFlattening1/f
Returns
Oblate spheroid

◆ cartesianToSpheroidalCoordinates() [1/2]

GeoPoint3 spatium::geom3d::OblateSpheroid::cartesianToSpheroidalCoordinates ( double  x,
double  y,
double  z,
double  precision = 0 
) const
inline

Compute oblate spheroidal coordinates from Cartesian coordinates. Cartesian vector (-1, 0, 0) points towards origin of spheroidal coordinate system. (TODO Discrepancy)

Parameters
[in]xX coordinate
[in]yY coordinate
[in]zZ coordinate
[in]precisionPrecision to aquire in latitude and height. Omitted if precision == 0
Returns
Point with spheroidal coordinates: latitude, longitude and height above surface. Latitude and longtiude are in radians.

◆ cartesianToSpheroidalCoordinates() [2/2]

GeoPoint3 spatium::geom3d::OblateSpheroid::cartesianToSpheroidalCoordinates ( Point3  point,
double  precision = 0 
) const
inline

Compute oblate spheroidal coordinates from Cartesian coordinates. Cartesian vector (-1, 0, 0) points towards origin of spheroidal coordinate system. (TODO Discrepancy)

Parameters
[in]pointCartesian point
[in]precisionPrecision to aquire in latitude and height. Omitted if precision == 0
Returns
Point with spheroidal coordinates: latitude, longitude and height above surface. Latitude and longtiude are in radians.

◆ eccentricity()

double spatium::geom3d::OblateSpheroid::eccentricity ( ) const
inline

Compute the eccentricity.

Returns
Eccentricity

◆ flattening()

double spatium::geom3d::OblateSpheroid::flattening ( ) const
inline

Compute the flattening.

Returns
Flattening

◆ spheroidalToCartesianCoordinates() [1/2]

Point3 spatium::geom3d::OblateSpheroid::spheroidalToCartesianCoordinates ( double  longitude,
double  latitude,
double  height 
) const
inline

Compute Cartesian coordinates from oblate spheroidal coordinates. Cartesian vector (1, 0, 0) points towards origin of spheroidal coordinate system. (TODO Discrepancy)

Parameters
[in]longitudeLongitude in radians
[in]latitudeLatitude in radians
[in]heightHeight above surface
Returns
Point with cartesian X, Y and Z coordinates

◆ spheroidalToCartesianCoordinates() [2/2]

Point3 spatium::geom3d::OblateSpheroid::spheroidalToCartesianCoordinates ( GeoPoint3  geoPoint) const
inline

Compute Cartesian coordinates from oblate spheroidal coordinates. Cartesian vector (1, 0, 0) points towards origin of spheroidal coordinate system. (TODO Discrepancy)

Parameters
[in]geoPointGeographical point
Returns
Point with Cartesian X, Y and Z coordinates

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const OblateSpheroid spheroid 
)
friend

Output to ostream.


The documentation for this class was generated from the following file: