This page has been translated automatically.
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
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
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

engine.geodeticsTransformer Functions

Warning
The scope of applications for UnigineScript is limited to implementing materials-related logic (material expressions, scriptable materials, brush materials). Do not use UnigineScript as a language for application logic, please consider C#/C++ instead, as these APIs are the preferred ones. Availability of new Engine features in UnigineScipt (beyond its scope of applications) is not guaranteed, as the current level of support assumes only fixing critical issues.
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.

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


dmat4 engine.geodeticsTransformer.geodeticToWorld ( dvec3 geo_coords ) #

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

Arguments

  • dvec3 geo_coords - Geodetic coordinates.

Return value

World position and orientation.

dvec3 engine.geodeticsTransformer.worldToGeodetic ( dvec3 world_pos ) #

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

Arguments

  • dvec3 world_pos - World position.

Return value

Geodetic coordinates.

int engine.geodeticsTransformer.setProjectionWkt ( string projection_cs_wkt_string, dvec3 world_origin_geo_coords, string 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

  • string projection_cs_wkt_string - Description of the projection in the OpenGIS WKT format.
  • dvec3 world_origin_geo_coords - World origin in geodetic coordinates.
  • string 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 engine.geodeticsTransformer.setProjectionEpsg ( int projection_cs_epsg_code, dvec3 world_origin_geo_coords, string 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.
  • dvec3 world_origin_geo_coords - World origin in geodetic coordinates.
  • string 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: 2020-07-31
Build: ()