This page has been translated automatically.
Programming
Fundamentials
Setting Up Development Environment
UnigineScript
High-Level Systems
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Bounds-Related Classes
Containers
Controls-Related Classes
Core Library
Engine-Related Classes
GUI-Related Classes
Node-Related Classes
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
Rendering-Related Classes
Utility Classes
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

Ellipsoid Class

The Ellipsoid class.

Geodetic Class

Members


Ellipsoid ()

Constructor. Creates a new Ellipsoid class instance (WGS84 Ellipsoid).

Ellipsoid (double semimajor_axis, double flattening)

Constructor. Creates a new Ellipsoid class instance with given semi-major axis and flattening.

Arguments

  • double semimajor_axis - Semimajor axis (the longest radius) of the ellipsoid.
  • double flattening - Flattening of a sphere. If the value is 0, the ellipsoid has a sphere shape, for 1 the ellipsoid has a circle (completely flat) shape.

void setSemimajorAxis (double axis)

Sets new semimajor axis of the ellipsoid.

Arguments

  • double axis - Semimajor axis length in units.

double getSemimajorAxis ()

Returns semimajor axis length of the ellipsoid in units.

Return value

Semimajor axis of the ellipsoid.

double getSemiminorAxis ()

Returns semiminor axis of the ellipsoid in units.

Return value

Semiminor axis of the ellipsoid in units.

void setFlattening (double flattening)

Sets new flattening for the ellipsoid.

Arguments

  • double flattening - Flattening coefficient of the ellipsoid. If the value is 0, the ellipsoid has a sphere shape, for 1 the ellipsoid has a circle (completely flat) shape.

double getFlattening ()

Returns flattening coefficient of the ellipsoid.

Return value

Flattening coefficient of the ellipsoid.

double getSemimajorEccentricitySqr ()

Returns the squared eccentricity calculated along the semimajor axis.

Return value

Squared eccentricity calculated along the semimajor axis.

double getSemiminorEccentricitySqr ()

Returns the squared eccentricity calculated along the semiminor axis.

Return value

Squared eccentricity calculated along the semiminor axis.

void setMode (int mode)

Sets the calculation mode.

Arguments

int getMode ()

Returns the calculation mode int value: 1 if the mode is MODE_ACCURATE, 0 if the mode is MODE_FAST.

Return value

1 if the mode is MODE_ACCURATE, 0 if the mode is MODE_FAST.

double getMeanRadius ()

Returns the mean radius of the ellipsoid.

Return value

The mean radius of the ellipsoid.

Math::vec3 getENUTangentPoint (const Math::dvec3 & geodetic_origin, const Math::vec3 & surface_point)

Returns tangent point ENU coordinates based on the geographical coordinates.

Arguments

  • const Math::dvec3 & geodetic_origin - The origin in ellipsoid coordinates (latitude (degrees), longitude (degrees) and altitude (meters).
  • const Math::vec3 & surface_point - Surface coordinates to be converted (flatten) to tangent (related to origin).

Return value

Tangent coordinates.

Math::vec3 getENUSurfacePoint (const Math::dvec3 & geodetic_origin, const Math::vec3 & tangent_point)

Returns surface point by using tangent point coordinates.

Arguments

  • const Math::dvec3 & geodetic_origin - The origin in ellipsoid coordinates (latitude (degrees), longitude (degrees) and altitude (meters).
  • const Math::vec3 & tangent_point - Tangent point coordinates to converted (curved) to surface coordinates (offset related to point of junction).

Return value

Surface point coordinates.

Math::quat getENUWorldRotation (const Math::dvec3 & geodetic_origin)

Returns the world rotation quaternion in ENU coordinates.

Arguments

  • const Math::dvec3 & geodetic_origin - The origin in ellipsoid coordinates (latitude (degrees), longitude (degrees) and altitude (meters).

Return value

World rotation in ENU coordinates.

Math::dmat4 getENUWorldTransform (const Math::dvec3 & geodetic_origin)

Returns the world transformation matrix in ENU coordinates.

Arguments

  • const Math::dvec3 & geodetic_origin - The origin in ellipsoid coordinates (latitude (degrees), longitude (degrees) and altitude (meters).

Return value

World transformation matrix in ENU coordinates.

Math::vec3 getNEDTangentPoint (const Math::dvec3 & geodetic_origin, const Math::dvec3 & surface_point)

Returns tangent point NED coordinates based on the geographical coordinates.

Arguments

  • const Math::dvec3 & geodetic_origin - The origin in ellipsoid coordinates (latitude (degrees), longitude (degrees) and altitude (meters).
  • const Math::dvec3 & surface_point - Surface point coordinates to be converted (flatten) to tangent point (offset related to point of junction).

Return value

Tangent point coordinates.

Math::vec3 getNEDSurfacePoint (const Math::dvec3 & geodetic_origin, const Math::dvec3 & tangent_point)

Returns surface point by using tangent point coordinates.

Arguments

  • const Math::dvec3 & geodetic_origin - The origin in ellipsoid coordinates (latitude (degrees), longitude (degrees) and altitude (meters).
  • const Math::dvec3 & tangent_point - Tangent point coordinates to converted (curved) to surface coordinates (offset related to point of junction).

Return value

Surface point coordinates.

Math::quat getNEDWorldRotation (const Math::dvec3 & geodetic_origin)

Returns the world rotation quaternion in NED coordinates.

Arguments

  • const Math::dvec3 & geodetic_origin - The origin in ellipsoid coordinates (latitude (degrees), longitude (degrees) and altitude (meters).

Return value

World rotation in NED coordinates.

Math::dmat4 getNEDWorldTransform (const Math::dvec3 & geodetic_origin)

Returns the world transformation matrix in NED coordinates.

Arguments

  • const Math::dvec3 & geodetic_origin - The origin in ellipsoid coordinates (latitude (degrees), longitude (degrees) and altitude (meters).

Return value

World transformation matrix in NED coordinates.

Math::dvec3 toECF (const Math::dvec3 & geodetic_coords)

Converts geodetic coordinates to Cartesian (ECF).

Arguments

  • const Math::dvec3 & geodetic_coords - Ellipsoid coordinates (latitude (degrees), longitude (degrees) and altitude (meters)) to be converted to Cartesian.

Return value

Cartesian coordinates.

Math::dvec3 toGeodetic (const Math::dvec3 & ecf_coords)

Converts Cartesian (ECF) coordinates to Ellipsoid.

Arguments

  • const Math::dvec3 & ecf_coords - Cartesian ECF coordinates to be converted.

Return value

Ellipsoid coordinates (latitude (degrees), longitude (degrees) and altitude (meters)

Math::dvec3 toENU (const Math::dvec3 & geodetic_origin, const Math::dvec3 & geodetic_coords)

Converts geodetic coordinates to ENU (East, North, Up).

Arguments

  • const Math::dvec3 & geodetic_origin - The origin in ellipsoid coordinates (latitude (degrees), longitude (degrees) and altitude (meters).
  • const Math::dvec3 & geodetic_coords - Coordinates to be converted to ENU.

Return value

ENU coordinates.

Math::dvec3 toNED (const Math::dvec3 & geodetic_origin, const Math::dvec3 & geodetic_coords)

Converts geodetics coordinates to NED (North, East, Down).

Arguments

  • const Math::dvec3 & geodetic_origin - The origin in ellipsoid coordinates (latitude (degrees), longitude (degrees) and altitude (meters).
  • const Math::dvec3 & geodetic_coords - Coordinates to be converted to NED.

Return value

NED coordinates.

int MODE_FAST

Description

A calculation mode is computed by using Great-circle distance formula. It works pretty fast, but you'll get positioning errors on big (~80000x80000 units) distances.

int MODE_ACCURATE

Description

A calculation mode uses Vincenty's formula to calculate distances on the surface of the ellipsoid with a millimeter precision. It takes more time for calculation, but the accuracy of positioning is awesome.
Last update: 03.07.2017
Build: ()