This page has been translated automatically.
Видеоуроки
Interface
Essentials
Advanced
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Professional (SIM)
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Физика
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Настройки и предпочтения
Работа с проектами
Настройка параметров ноды
Setting Up Materials
Настройка свойств
Освещение
Sandworm
Использование инструментов редактора для конкретных задач
Расширение функционала редактора
Встроенные объекты
Ноды (Nodes)
Объекты (Objects)
Эффекты
Декали
Источники света
Geodetics
World-ноды
Звуковые объекты
Объекты поиска пути
Players
Программирование
Основы
Настройка среды разработки
Примеры использования
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Плагины
Форматы файлов
Materials and Shaders
Rebuilding the Engine Tools
Интерфейс пользователя (GUI)
Двойная точность координат
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
Работа с контентом
Оптимизация контента
Материалы
Визуальный редактор материалов
Сэмплы материалов
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

Unigine::GeodeticsTransformer Class

Warning
The functionality described in this article is not available in the Community SDK edition.
You should upgrade to Engineering / Sim SDK edition to use it.
Header: #include <UnigineGeodeticsTransformer.h>

This class is used to transform geodetic coordinates (latitude, longitude and altitude) to the 3D world position and vice versa.

Notice
Geodetics transformations are available only if GeodeticsPlugin is launched.

GeodeticsTransformer Class

Members


GeodeticsTransformer * get ( ) #

Returns a pointer to the existing geodetics instance.

Return value

Pointer to the existing geodetics transformer instance. If GeodeticsPlugin is not launched, nullptr is returned.

dmat4 geodeticToWorld ( const dvec3 & geo_coords, bool rotate_to_en ) const#

Transforms geodetic coordinates of the selected coordinate system to the 3D world coordinates: position and rotation (the Y axis is directed to the North, the X axis — to the East, and the Z axis — upwards).

Arguments

  • const dvec3 & geo_coords - Geodetic coordinates (lat,lon,alt).
  • bool rotate_to_en - true to rotate data as follows: East => X, North => Y (ENU and similar systems); false if the data source uses another alignment (for example NED).

Return value

World position and orientation.

dvec3 geodeticToWorldPosition ( const dvec3 & geo_coords, bool rotate_to_en ) #

Transforms geodetic coordinates of the selected coordinate system to the 3D world coordinates (position).

Arguments

  • const dvec3 & geo_coords - Geodetic coordinates (lat,lon,alt).
  • bool rotate_to_en - true to rotate data as follows: East => X, North => Y (ENU and similar systems); false if the data source uses another alignment (for example NED).

Return value

World position.

dvec3 worldToGeodetic ( const dvec3 & world_pos, bool rotate_to_en ) #

Transforms the 3D world coordinates to geodetic coordinates of the selected coordinate system.

Arguments

  • const dvec3 & world_pos - World position.
  • bool rotate_to_en - true to rotate data as follows: East => X, North => Y (ENU and similar systems); false if the data source uses another alignment (for example NED).

Return value

Geodetic coordinates (lat,lon,alt).

int setProjectionWkt ( const char * projection_cs_wkt_string, const dvec3 & world_origin_geo_coords, const char * geodetic_cs_string, int geodetic_cs_is_well_known ) #

Sets a projection by WKT description, which is used as the world coordinate projection, and defines a geodetic coordinate system.

Arguments

  • const char * projection_cs_wkt_string - Description of the projection in the OpenGIS WKT format.
  • const dvec3 & world_origin_geo_coords - World origin in geodetic coordinates (lat,lon,alt).
  • const char * geodetic_cs_string - Description of a geodetic coordinate system.
  • int geodetic_cs_is_well_known - 1 or 0.

    If set to 1, a well-known coordinate system description is used as the geodetic_cs_string argument.

    The following well-known text values are supported:

    • WGS84 — same as EPSG:4326, but has no dependence on EPSG data files.
    • WGS72 — same as EPSG:4322, but has no dependence on EPSG data files.
    • NAD27 — same as EPSG:4267, but has no dependence on EPSG data files.
    • NAD83 — same as EPSG:4269, but has no dependence on EPSG data files.
    • EPSG:nn is a GCS code from the horizontal coordinate system table.

    If set to 0, a detailed WKT description is used.

Return value

1 on success; otherwise, 0.

int setProjectionEpsg ( int projection_cs_epsg_code, const dvec3 & world_origin_geo_coords, const char * geodetic_cs_string, int geodetic_cs_is_well_known ) #

Sets a projection by EPSG code, which is used as the world coordinate projection, and defines a geodetic coordinate system.

Arguments

  • int projection_cs_epsg_code - EPSG code of the projection.
  • const dvec3 & world_origin_geo_coords - World origin in geodetic coordinates (lat,lon,alt).
  • const char * geodetic_cs_string - Description of a geodetic coordinate system.
  • int geodetic_cs_is_well_known - 1 or 0.

    If set to 1, a well-known coordinate system description is used as the geodetic_cs_string argument.

    The following well-known text values are supported:

    • WGS84 — same as EPSG:4326, but has no dependence on EPSG data files.
    • WGS72 — same as EPSG:4322, but has no dependence on EPSG data files.
    • NAD27 — same as EPSG:4267, but has no dependence on EPSG data files.
    • NAD83 — same as EPSG:4269, but has no dependence on EPSG data files.
    • EPSG:nn is a GCS code from the horizontal coordinate system table.

    If set to 0, a detailed WKT description is used.

Return value

1 on success; otherwise, 0.
Last update: 14.12.2022
Build: ()