This page has been translated automatically.
Видеоуроки
Интерфейс
Основы
Продвинутый уровень
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Профессиональный уровень (SIM)
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Режимы вывода изображения
Физика
Браузер SDK 2
Лицензирование и типы лицензий
Дополнения (Add-Ons)
Демонстрационные проекты
API Samples
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Контроль версий
Настройки и предпочтения
Работа с проектами
Настройка параметров ноды
Setting Up Materials
Настройка свойств
Освещение
Sandworm
Использование инструментов редактора для конкретных задач
Расширение функционала редактора
Встроенные объекты
Ноды (Nodes)
Объекты (Objects)
Эффекты
Декали
Источники света
Geodetics
World-ноды
Звуковые объекты
Объекты поиска пути
Player-ноды
Программирование
Основы
Настройка среды разработки
Примеры использования
C++
C#
UnigineScript
Унифицированный язык шейдеров UUSL (Unified UNIGINE Shader Language)
Плагины
Форматы файлов
Материалы и шейдеры
Rebuilding the Engine Tools
Интерфейс пользователя (GUI)
Двойная точность координат
API
Animations-Related Classes
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
VR-Related Classes
Работа с контентом
Оптимизация контента
Материалы
Визуальный редактор материалов
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Учебные материалы
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

Unigine::Plugins::IG::Converter Class

Header: #include <plugins/Unigine/IG/UnigineIG.h>

This utility class is used to perform conversions between different coordinate systems for the IG (e.g. ENU <-> NED, Euler rotation <-> quaternion, etc.).

Notice
IG plugin must be loaded.

Converter Class

Перечисления (Enums)

COORDINATE_SYSTEM#

ИмяОписание
COORDINATE_SYSTEM::ENU = 0ENU (East-North-Up) coordinate system. X - right, Y - front, Z - up, default in Unigine. Rotation order: Z -> X -> Y (Yaw-Roll-Pitch)
COORDINATE_SYSTEM::NED = 1NED (North-East-Down) coordinate system. X - front, Y - right, Z - down, default in Unigine. Rotation order: Z -> Y -> X (Yaw-Pitch-Roll)

Members


Math::dvec3 worldToGeodetic ( const Math::dvec3& world_pos ) #

Returns geodetic coordinates of a point with the specified world coordinates.

Arguments

  • const Math::dvec3& world_pos - World coordinates of the point to be converted (X, Y, Z).

Return value

Geodetic coordinates of the point (lat, lon, alt).

Math::dvec3 geodeticToWorld ( const Math::dvec3& geo_pos ) const#

Returns world coordinates of a point with the specified geodetic coordinates.

Arguments

  • const Math::dvec3& geo_pos - Geodetic coordinates of the point to be converted (lat, lon, alt).

Return value

World coordinates of the point (X, Y, Z).

Math::dvec3 ENUtoNED ( const Math::dvec3& enu_pos ) const#

Converts the coordinates of a point specified in the ENU (East-North-Up) system to NED (North-East-Down).

Arguments

  • const Math::dvec3& enu_pos - Coordinates of a point in the ENU (East-North-Up) system.

Return value

Coordinates of the point in the NED (North-East-Down) system.

Math::dvec3 NEDtoENU ( const Math::dvec3& ned_pos ) const#

Converts the coordinates of a point specified in the NED (North-East-Down) system to ENU (East-North-Up).

Arguments

  • const Math::dvec3& ned_pos - Coordinates of a point in the NED (North-East-Down) system.

Return value

Coordinates of the point in the ENU (East-North-Up) system.

Math::dvec3 IGtoENU ( const Math::dvec3& ig_pos ) const#

Converts the coordinates of a point specified in the IG system to ENU (East-North-Up).

Arguments

  • const Math::dvec3& ig_pos - Coordinates of the point in the IG system.

Return value

Coordinates of a point in the ENU (East-North-Up) system.

Math::dvec3 ENUtoIG ( const Math::dvec3& enu_pos ) const#

Converts the coordinates of a point specified in the ENU (East-North-Up) system to IG.

Arguments

  • const Math::dvec3& enu_pos - Coordinates of a point in the ENU (East-North-Up) system.

Return value

Coordinates of the point in the IG system.

Math::vec3 ENUtoNED ( const Math::vec3& enu_pos ) const#

Converts the coordinates of a point specified in the ENU (East-North-Up) system to NED (North-East-Down).

Arguments

  • const Math::vec3& enu_pos - Coordinates of a point in the ENU (East-North-Up) system.

Return value

Coordinates of the point in the NED (North-East-Down) system.

Math::vec3 NEDtoENU ( const Math::vec3& ned_pos ) const#

Converts the coordinates of a point specified in the NED (North-East-Down) system to ENU (East-North-Up).

Arguments

  • const Math::vec3& ned_pos - Coordinates of the point in the NED (North-East-Down) system.

Return value

Coordinates of a point in the ENU (East-North-Up) system.

Math::vec3 IGtoENU ( const Math::vec3& ig_pos ) const#

Converts the coordinates of a point specified in the IG system to ENU (East-North-Up).

Arguments

  • const Math::vec3& ig_pos - Coordinates of the point in the IG system.

Return value

Coordinates of a point in the ENU (East-North-Up) system.

Math::vec3 ENUtoIG ( const Math::vec3& enu_pos ) const#

Converts the coordinates of a point specified in the IG system to ENU (East-North-Up).

Arguments

  • const Math::vec3& enu_pos - Coordinates of a point in the ENU (East-North-Up) system.

Return value

Coordinates of the point in the IG system.

Math::quat getZeroRotation ( const Math::dvec3& geo_pos ) const#

Returns the zero-rotation for the specified target geodetic position.
Notice

Unigine uses ENU orientation!

  • final_rotation = zero_rotation * entity_local_rotation
  • entity_local_rotation = final_rotation * inverse(zero_rotation)

Arguments

  • const Math::dvec3& geo_pos - Target geodetic position coordinates (lat, lon, alt).

Return value

Zero-rotation quaternion for the specified target geodetic position.

Math::vec3& getZeroUpDirection ( const Math::dvec3& geo_pos ) const#

Returns the zero "up"-vector coordinates for the specified target geodetic position.

Arguments

  • const Math::dvec3& geo_pos - Target geodetic position coordinates (lat, lon, alt).

Return value

Zero "up"-vector coordinates for the specified target geodetic position.

Math::dmat4 getZeroBasis ( const Math::dvec3& geo_pos ) const#

Returns the whole zero basis for the specified target geodetic position.

Arguments

  • const Math::dvec3& geo_pos - Target geodetic position coordinates (lat, lon, alt).

Return value

Zero basis for the specified target geodetic position.

Math::quat eulerENUToRotation ( const Math::vec3& euler ) const#

Converts the specified Euler rotation vector in ENU (East-North-Up) coordinates to a rotation quaternion.
Notice

Unigine uses ENU orientation!

Axis order: Yaw -> Pitch -> Roll (ENU: Z -> X -> Y, NED: Z -> Y -> X)

Arguments

  • const Math::vec3& euler - Vector representing rotation (roll, pitch, yaw) in ENU (East-North-Up) coordinates.

Return value

Rotation quaternion.

Math::quat eulerNEDToRotation ( const Math::vec3& euler ) const#

Converts the specified Euler rotation vector in NED (North-East-Down) coordinates to a rotation quaternion.
Notice

Unigine uses ENU orientation!

Axis order: Yaw -> Pitch -> Roll (ENU: Z -> X -> Y, NED: Z -> Y -> X)

Arguments

  • const Math::vec3& euler - Vector representing Euler rotation (roll, pitch, yaw) in NED (North-East-Down) coordinates.

Return value

Rotation quaternion.

Math::quat eulerIGToRotation ( const Math::vec3& euler ) const#

Converts the specified Euler rotation vector in IG coordinates to a rotation quaternion.

Arguments

  • const Math::vec3& euler - Vector representing Euler rotation (roll, pitch, yaw) in IG coordinates.

Return value

Rotation quaternion.

Math::vec3 rotationToEulerENU ( const Math::quat& rotation ) const#

Converts the specified rotation quaternion to Euler rotation vector in ENU (East-North-Up) coordinates.
Notice

Unigine uses ENU orientation!

Axis order: Yaw -> Pitch -> Roll (ENU: Z -> X -> Y, NED: Z -> Y -> X)

Arguments

  • const Math::quat& rotation - Rotation quaternion.

Return value

Vector representing rotation (roll, pitch, yaw) in ENU (East-North-Up) coordinates.

Math::vec3 rotationToEulerNED ( const Math::quat& rotation ) const#

Converts the specified rotation quaternion to Euler rotation vector in NED (North-East-Down) coordinates.
Notice

Unigine uses ENU orientation!

Axis order: Yaw -> Pitch -> Roll (ENU: Z -> X -> Y, NED: Z -> Y -> X)

Arguments

  • const Math::quat& rotation - Rotation quaternion.

Return value

Vector representing Euler rotation (roll, pitch, yaw) in NED (North-East-Down) coordinates.

Math::vec3 rotationToEulerIG ( const Math::quat& rotation ) const#

Converts the specified rotation quaternion to Euler rotation vector in IG coordinates.

Arguments

  • const Math::quat& rotation - Rotation quaternion.

Return value

Vector representing Euler rotation (roll, pitch, yaw) in IG coordinates.

void setCoordinateSystem ( Converter::COORDINATE_SYSTEM coord_system ) #

Sets the specified coordinate system to be used.

Arguments

Converter::COORDINATE_SYSTEM getCoordinateSystem ( ) const#

Returns the currently used coordinate system.

Return value

Coordinate system currently used.
Last update: 16.08.2024
Build: ()