Unigine.Plugins.IG.Converter Class
This utility class is used to perform conversions between different coordinate systems for the IG (e.g. ENU <-> NED, Euler rotation <-> quaternion, etc.).
IG plugin must be loaded.
Converter Class
Enums
COORDINATE_SYSTEM#
Properties
Converter.COORDINATE_SYSTEM CoordinateSystem#
The currently used coordinate system.
Members
dvec3 WorldToGeodetic ( dvec3 world_pos ) #
Returns geodetic coordinates of a point with the specified world coordinates.Arguments
- dvec3 world_pos - World coordinates of the point to be converted (X, Y, Z).
Return value
Geodetic coordinates of the point (lat, lon, alt).dvec3 GeodeticToWorld ( dvec3 geo_pos ) #
Returns world coordinates of a point with the specified geodetic coordinates.Arguments
- dvec3 geo_pos - Geodetic coordinates of the point to be converted (lat, lon, alt).
Return value
World coordinates of the point (X, Y, Z).dvec3 ENUtoNED ( dvec3 enu_pos ) #
Converts the coordinates of a point specified in the ENU (East-North-Up) system to NED (North-East-Down).Arguments
- 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.dvec3 NEDtoENU ( dvec3 ned_pos ) #
Converts the coordinates of a point specified in the NED (North-East-Down) system to ENU (East-North-Up).Arguments
- 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.dvec3 IGtoENU ( dvec3 ig_pos ) #
Converts the coordinates of a point specified in the IG system to ENU (East-North-Up).Arguments
- dvec3 ig_pos - Coordinates of the point in the IG system.
Return value
Coordinates of a point in the ENU (East-North-Up) system.dvec3 ENUtoIG ( dvec3 enu_pos ) #
Converts the coordinates of a point specified in the ENU (East-North-Up) system to IG.Arguments
- dvec3 enu_pos - Coordinates of a point in the ENU (East-North-Up) system.
Return value
Coordinates of the point in the IG system.vec3 ENUtoNED ( vec3 enu_pos ) #
Converts the coordinates of a point specified in the ENU (East-North-Up) system to NED (North-East-Down).Arguments
- 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.vec3 NEDtoENU ( vec3 ned_pos ) #
Converts the coordinates of a point specified in the NED (North-East-Down) system to ENU (East-North-Up).Arguments
- 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.vec3 IGtoENU ( vec3 ig_pos ) #
Converts the coordinates of a point specified in the IG system to ENU (East-North-Up).Arguments
- vec3 ig_pos - Coordinates of the point in the IG system.
Return value
Coordinates of a point in the ENU (East-North-Up) system.vec3 ENUtoIG ( vec3 enu_pos ) #
Converts the coordinates of a point specified in the IG system to ENU (East-North-Up).Arguments
- vec3 enu_pos - Coordinates of a point in the ENU (East-North-Up) system.
Return value
Coordinates of the point in the IG system.quat GetZeroRotation ( dvec3 geo_pos ) #
Returns the zero-rotation for the specified target geodetic position.Unigine uses ENU orientation!
- final_rotation = zero_rotation * entity_local_rotation
- entity_local_rotation = final_rotation * inverse(zero_rotation)
Arguments
- dvec3 geo_pos - Target geodetic position coordinates (lat, lon, alt).
Return value
Zero-rotation quaternion for the specified target geodetic position.vec3 GetZeroUpDirection ( dvec3 geo_pos ) #
Returns the zero "up"-vector coordinates for the specified target geodetic position.Arguments
- dvec3 geo_pos - Target geodetic position coordinates (lat, lon, alt).
Return value
Zero "up"-vector coordinates for the specified target geodetic position.dmat4 GetZeroBasis ( dvec3 geo_pos ) #
Returns the whole zero basis for the specified target geodetic position.Arguments
- dvec3 geo_pos - Target geodetic position coordinates (lat, lon, alt).
Return value
Zero basis for the specified target geodetic position.quat EulerENUToRotation ( vec3 euler ) #
Converts the specified Euler rotation vector in ENU (East-North-Up) coordinates to a rotation quaternion.Unigine uses ENU orientation!
Axis order: Yaw -> Pitch -> Roll (ENU: Z -> X -> Y, NED: Z -> Y -> X)
- final_rotation = zero_rotation * entity_local_rotation
- entity_local_rotation = final_rotation * inverse(zero_rotation)
Arguments
- vec3 euler - Vector representing rotation (roll, pitch, yaw) in ENU (East-North-Up) coordinates.
Return value
Rotation quaternion.quat EulerNEDToRotation ( vec3 euler ) #
Converts the specified Euler rotation vector in NED (North-East-Down) coordinates to a rotation quaternion.Unigine uses ENU orientation!
Axis order: Yaw -> Pitch -> Roll (ENU: Z -> X -> Y, NED: Z -> Y -> X)
- final_rotation = zero_rotation * entity_local_rotation
- entity_local_rotation = final_rotation * inverse(zero_rotation)
Arguments
- vec3 euler - Vector representing Euler rotation (roll, pitch, yaw) in NED (North-East-Down) coordinates.
Return value
Rotation quaternion.quat EulerIGToRotation ( vec3 euler ) #
Converts the specified Euler rotation vector in IG coordinates to a rotation quaternion.Arguments
- vec3 euler - Vector representing Euler rotation (roll, pitch, yaw) in IG coordinates.
Return value
Rotation quaternion.vec3 RotationToEulerENU ( quat rotation ) #
Converts the specified rotation quaternion to Euler rotation vector in ENU (East-North-Up) coordinates.Unigine uses ENU orientation!
Axis order: Yaw -> Pitch -> Roll (ENU: Z -> X -> Y, NED: Z -> Y -> X)
- final_rotation = zero_rotation * entity_local_rotation
- entity_local_rotation = final_rotation * inverse(zero_rotation)
Arguments
- quat rotation - Rotation quaternion.
Return value
Vector representing rotation (roll, pitch, yaw) in ENU (East-North-Up) coordinates.vec3 RotationToEulerNED ( quat rotation ) #
Converts the specified rotation quaternion to Euler rotation vector in NED (North-East-Down) coordinates.Unigine uses ENU orientation!
Axis order: Yaw -> Pitch -> Roll (ENU: Z -> X -> Y, NED: Z -> Y -> X)
- final_rotation = zero_rotation * entity_local_rotation
- entity_local_rotation = final_rotation * inverse(zero_rotation)
Arguments
- quat rotation - Rotation quaternion.
Return value
Vector representing Euler rotation (roll, pitch, yaw) in NED (North-East-Down) coordinates.vec3 RotationToEulerIG ( quat rotation ) #
Converts the specified rotation quaternion to Euler rotation vector in IG coordinates.Arguments
- quat rotation - Rotation quaternion.
Return value
Vector representing Euler rotation (roll, pitch, yaw) in IG coordinates.Last update:
2024-12-13
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)