SpatiumLib
|
#include <Ellipsoid.h>
Public Member Functions | |
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... | |
Ellipsoid & | operator= (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... | |
![]() | |
Geometry ()=default | |
virtual | ~Geometry ()=default |
Protected Member Functions | |
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 | |
Matrix4x4 | m_ellipsoidalTransformation |
Matrix4x4 | m_ellipsoidalTransformationInverse |
Point3 | m_origin |
double | m_axisX |
double | m_axisY |
double | m_axisZ |
Friends | |
std::ostream & | operator<< (std::ostream &os, const Ellipsoid &ellipsoid) |
Output to ostream. More... | |
Ellipsoid geometry.
An ellipsoid is defined by a point (origin) and three radii; one for each axis.
Parametric description = x^2 / a^2 + y^2 / b^2 + z^2 / c^2 = 1
The ellipsoid is implemented by a sphere with an ellipsoidal transformation applied to it.
|
inline |
Constructor.
|
inline |
Constructor.
|
default |
Copy constructor.
|
virtualdefault |
Destructor.
|
inline |
Set the X axis length.
[in] | axisX | X axis length |
|
inline |
Get the X axis length.
|
inline |
Set the Y axis length.
[in] | axisY | Y axis length |
|
inline |
Get the Y axis length.
|
inline |
Set the Z axis length.
[in] | axisZ | Z axis length |
|
inline |
Get the Z axis length.
|
inlineoverridevirtual |
Compute Euclidean distance to point.
[in] | point | Point |
Implements spatium::geom3d::Geometry.
|
inlineoverridevirtual |
Intersect line with ellipsoid.
[in] | origin | Origin of line |
[in] | direction | Direction of line |
[out] | intersection | Intersection point |
Implements spatium::geom3d::Geometry.
Assignment operator.
|
inline |
Set origin of ellipsoid.
[in] | origin | Origin |
|
inline |
Get origin of ellipsoid.
|
inline |
Compute point on horizon in a given direction.
[in] | point | Point above surface (Cartesian) |
[in] | direction | Direction towards horizon as polar coordinate in radians. 0 = east, 1/2 pi = north, etc. |
[in] | poleLimit | Whether or not to limit the latitude at the poles. It wil not exceed (shrink again) beyond the horizon of the pole. |
Project point onto ellipsoid.
[in] | point | Point |
Implements spatium::geom3d::Geometry.
Compute surface normal at given point.
[in] | point | Point with X, Y & Z coordinates |
|
inlineprotected |
Update the transformation parameters that transform a sphere into this ellipsoid. These parameters are internally used to represent the ellipsoid as a transformed sphere.
|
friend |
Output to ostream.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |