This page has been translated automatically.
Программирование
Fundamentals
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
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
Rendering-Related Classes
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

Unigine::ObjectTerrainGlobal Class

Header:#include <UnigineObjects.h>
Inherits:Object

This class is used to create a global terrain object representing a certain fragment of Earth's surface on the basis of available GIS data (elevation and imagery). The global terrain is rendered using pre-generated tilesets which represent LODs for different data layers (heights, albedo and normals).

ObjectTerrainGlobal Class

Members


static ObjectTerrainGlobalPtr create()

Constructor. Creates a new empty global terrain object with default properties.

static Ptr<ObjectTerrainGlobal> cast(const Ptr<Node> & node)

Casts an ObjectTerrainGlobal out of the Node instance.

Arguments

  • const Ptr<Node> & node - Pointer to Node.

Return value

Pointer to ObjectTerrainGlobal.

static Ptr<ObjectTerrainGlobal> cast(const Ptr<Object> & base)

Casts an ObjectTerrainGlobal out of the Object instance.

Arguments

  • const Ptr<Object> & base - Pointer to Object.

Return value

Pointer to ObjectTerrainGlobal.

void setAlbedoLodClearDistance(int num, float distance)

Sets the clear distance of a given albedo LOD. Starting from this distance the tiles of the LOD are removed from memory.

Arguments

  • int num - Albedo LOD number.
  • float distance - Clear distance, in units.

float getAlbedoLodClearDistance(int num)

Returns the clear distance of a given albedo LOD. Starting from this distance the tiles of the LOD are removed from memory.

Arguments

  • int num - Albedo LOD number.

Return value

Clear distance, in units.

void setAlbedoLodEnabled(int num, int enabled)

Enables or disables a given albedo LOD.

Arguments

  • int num - Albedo LOD number.
  • int enabled - 1 to enable the LOD, 0 to disable it.

int getAlbedoLodEnabled(int num)

Returns a value indicating if a given albedo LOD is enabled.

Arguments

  • int num - Albedo LOD number.

Return value

1 if a given albedo LOD is enabled; otherwise, 0.

void setAlbedoLodLoadDistance(int num, float distance)

Sets the load distance for a given albedo LOD. Starting from this distance the tiles of the LOD are loaded into memory.

Arguments

  • int num - Albedo LOD number.
  • float distance - Load distance, in units.

float getAlbedoLodLoadDistance(int num)

Returns the load distance for a given albedo LOD. Starting from this distance the tiles of the LOD are loaded into memory.

Arguments

  • int num - Albedo LOD number.

Return value

Load distance, in units.

void setAlbedoLodPath(int num, const char * path)

Sets the path to the folder where a given albedo LOD is stored.

Arguments

  • int num - Albedo LOD number.
  • const char * path - Path to the folder where a given albedo LOD is stored.

const char * getAlbedoLodPath(int num)

Returns the path to the folder where a given albedo LOD is stored.

Arguments

  • int num - Albedo LOD number.

Return value

Path to the folder where a given albedo LOD is stored.

float getAlbedoLodTileDensity(int num)

Returns the density of a tile of a given albedo LOD.

Arguments

  • int num - Albedo LOD number.

Return value

Density of a height LOD tile, in meters per pixel.

void setAlbedoLodViewportMask(int num, int mask)

Sets the viewport mask for a given albedo LOD.

Arguments

  • int num - Albedo LOD number.
  • int mask - Viewport mask.

int getAlbedoLodViewportMask(int num)

Returns the viewport mask for a given albedo LOD.

Arguments

  • int num - Albedo LOD number.

Return value

Viewport mask.

void setAlbedoLodVisibleDistance(int num, float distance)

Sets the visible distance of a given albedo LOD. Starting from this distance the tiles of the LOD become visible.

Arguments

  • int num - Albedo LOD number.
  • float distance - Visible distance, in units.

float getAlbedoLodVisibleDistance(int num)

Returns the visible distance of a given albedo LOD. Starting from this distance the tiles of the LOD become visible.

Arguments

  • int num - Albedo LOD number.

Return value

Visible distance, in units.

int getAlbedoNumLods()

Returns the total number of albedo LODs.

Return value

Total number of albedo LODs.

String getAlbedoVideoMemoryUsage()

Returns information about the total video memory usage for all albedo LODs.

Return value

Total video memory usage for all albedo LODs.

void setHeightLodClearDistance(int num, float distance)

Returns the clear distance of a given height LOD. Starting from this distance the tiles of the LOD are removed from memory.

Arguments

  • int num - Height LOD number.
  • float distance - Clear distance, in units.

float getHeightLodClearDistance(int num)

Returns the clear distance of a given height LOD. Starting from this distance the tiles of the LOD are removed from memory.

Arguments

  • int num - Height LOD number.

Return value

Clear distance, in units.

void setHeightLodCollision(int num, int enabled)

Enables or disables collision detection for a given height LOD.

Arguments

  • int num - Height LOD number.
  • int enabled - 1 to enable collision detection, 0 to disable it.

int getHeightLodCollision(int num)

Returns a value indicating if collision detection for a given height LOD is enabled.

Arguments

  • int num - Height LOD number.

Return value

1 if collision detection for a given LOD is enabled; otherwise, 0.

void setHeightLodCollisionMask(int num, int mask)

Sets the collision mask for a given height LOD.

Arguments

  • int num - Height LOD number.
  • int mask - Collision mask.

int getHeightLodCollisionMask(int num)

Returns the collision mask for a given height LOD.

Arguments

  • int num - Height LOD number.

Return value

Collision mask.

void setHeightLodEnabled(int num, int enabled)

Enables of disables a given height LOD.

Arguments

  • int num - Height LOD number.
  • int enabled - 1 to enable the LOD, 0 to disable it.

int getHeightLodEnabled(int num)

Returns a value indicating if a given height LOD is enabled.

Arguments

  • int num - Height LOD number.

Return value

1 if a given height LOD is enabled; otherwise, 0.

void setHeightLodIntersection(int num, int enabled)

Enables or disables intersection detection for a given height LOD.

Arguments

  • int num - Height LOD number.
  • int enabled - 1 to enable intersection detection, 0 to disable it.

int getHeightLodIntersection(int num)

Returns a value indicating if intersection detection for a given height LOD is enabled.

Arguments

  • int num - Height LOD number.

Return value

1 if intersection detection for a given LOD is enabled; otherwise, 0.

void setHeightLodIntersectionMask(int num, int mask)

Sets the intersection mask for a given height LOD.

Arguments

  • int num - Height LOD number.
  • int mask - Intersection mask.

int getHeightLodIntersectionMask(int num)

Sets the intersection mask for a given height LOD.

Arguments

  • int num - Height LOD number.

Return value

Intersection mask.

void setHeightLodLoadDistance(int num, float distance)

Sets the load distance for a given height LOD. Starting from this distance the tiles of the LOD are loaded into memory.

Arguments

  • int num - Height LOD number.
  • float distance - Load distance, in units.

float getHeightLodLoadDistance(int num)

Returns the load distance for a given height LOD. Starting from this distance the tiles of the LOD are loaded into memory.

Arguments

  • int num - Height LOD number.

Return value

Load distance, in units.

void setHeightLodPath(int num, const char * path)

Sets the path to the folder where a given height LOD is stored.

Arguments

  • int num - Height LOD number.
  • const char * path - Path to the folder where a given height LOD is stored.

const char * getHeightLodPath(int num)

Returns the path to the folder where a given height LOD is stored.

Arguments

  • int num - Height LOD number.

Return value

Path to the folder where a given height LOD is stored.

float getHeightLodTileDensity(int num)

Returns the density of a tile of a given height LOD.

Arguments

  • int num - Height LOD number.

Return value

Density of a height LOD tile, in meters per pixel.

void setHeightLodViewportMask(int num, int mask)

Sets the viewport mask for a given height LOD.

Arguments

  • int num - Height LOD number.
  • int mask - Viewport mask.

int getHeightLodViewportMask(int num)

Returns the viewport mask for a given height LOD.

Arguments

  • int num - Height LOD number.

Return value

Veiwport mask.

void setHeightLodVisibleDistance(int num, float distance)

Sets the visible distance of a given height LOD. Starting from this distance the tiles of the LOD become visible.

Arguments

  • int num - Height LOD number.
  • float distance - Visible distance, in units.

float getHeightLodVisibleDistance(int num)

Returns the visible distance of a given height LOD. Starting from this distance the tiles of the LOD become visible.

Arguments

  • int num - Height LOD number.

Return value

Visible distance, in units.

int getHeightNumLods()

Returns the total number of height LODs.

Return value

Total number of height LODs.

String getHeightVideoMemoryUsage()

Returns information about the total video memory usage for all height LODs.

Return value

Total video memory usage for all height LODs.

void setNormalLodClearDistance(int num, float distance)

Sets the clear distance of a given normal LOD. Starting from this distance the tiles of the LOD are removed from memory.

Arguments

  • int num - Normal LOD number.
  • float distance - Clear distance, in units.

float getNormalLodClearDistance(int num)

Returns the clear distance of a given normal LOD. Starting from this distance the tiles of the LOD are removed from memory.

Arguments

  • int num - Normal LOD number.

Return value

Clear distance, in units.

void setNormalLodEnabled(int num, int enabled)

Enables or disables a given normal LOD.

Arguments

  • int num - Normal LOD number.
  • int enabled - 1 to enable the LOD, 0 to disable it.

int getNormalLodEnabled(int num)

Returns a value indicating if a given normal LOD is enabled.

Arguments

  • int num - Normal LOD number.

Return value

1 if a given normal LOD is enabled; otherwise, 0.

void setNormalLodLoadDistance(int num, float distance)

Sets the load distance for a given normal LOD. Starting from this distance the tiles of the LOD are loaded into memory.

Arguments

  • int num - Normal LOD number.
  • float distance - Load distance, in units.

float getNormalLodLoadDistance(int num)

Returns the load distance for a given normal LOD. Starting from this distance the tiles of the LOD are loaded into memory.

Arguments

  • int num - Normal LOD number.

Return value

Load distance, in units.

void setNormalLodPath(int num, const char * path)

Sets the path to the folder where a given normal LOD is stored.

Arguments

  • int num - Normal LOD number.
  • const char * path - Path to the folder where a given normal LOD is stored.

const char * getNormalLodPath(int num)

Returns the path to a given normal LOD.

Arguments

  • int num - Normal LOD number.

Return value

Returns the path to a given normal LOD.

float getNormalLodTileDensity(int num)

Returns the density of a tile of a given normal LOD.

Arguments

  • int num - Normal LOD number.

Return value

Density of a normal LOD tile, in meters per pixel.

void setNormalLodViewportMask(int num, int mask)

Sets the viewport mask for a given normal LOD.

Arguments

  • int num - Normal LOD number.
  • int mask - Viewport mask.

int getNormalLodViewportMask(int num)

Returns the viewport mask for a given normal LOD.

Arguments

  • int num - Normal LOD number.

Return value

Viewport mask.

void setNormalLodVisibleDistance(int num, float distance)

Sets the visible distance of a given normal LOD. Starting from this distance the tiles of the LOD become visible.

Arguments

  • int num - Normal LOD number.
  • float distance - Visible distance, in units.

float getNormalLodVisibleDistance(int num)

Returns the visible distance of a given normal LOD. Starting from this distance the tiles of the LOD become visible.

Arguments

  • int num - Normal LOD number.

Return value

Visible distance, in units.

int getNormalNumLods()

Returns the total number of normal LODs.

Return value

Total number of normal LODs.

String getNormalVideoMemoryUsage()

Returns information about the total video memory usage for all normal LODs.

Return value

Total video memory usage for all normal LODs.

int addAlbedoLod()

Adds a new albedo LOD.

Return value

1 if a new albedo LOD was added successfully; otherwise, 0.

int addHeightLod()

Adds a new height LOD.

Return value

1 if a new height LOD was added successfully; otherwise, 0.

int addNormalLod()

Adds a new normal LOD.

Return value

1 if a new normal LOD was added successfully; otherwise, 0.

void clear()

Removes all current terrain data from memory.

int fetchAlbedoes(const BoundSphere & bs, const BoundBox & bb, int force = 0)

Loads the data of all albedo LODs for the tiles within a given bounding box and a bounding sphere.

Arguments

  • const BoundSphere & bs - Bounding sphere.
  • const BoundBox & bb - Bounding sphere.
  • int force - Force flag. Use 1 to load files in any case; otherwise, 0. The default value is 0.

Return value

1 if the data of all albedo LODs was fetched successfully; otherwise, 0.

int fetchHeights(const BoundSphere & bs, const BoundBox & bb, int force = 0)

Loads the data of all height LODs for the tiles within a given bounding box and a bounding sphere.

Arguments

  • const BoundSphere & bs - Bounding sphere.
  • const BoundBox & bb - Bounding box.
  • int force - Force flag. Use 1 to load files in any case; otherwise, 0. The default value is 0.

Return value

1 if the data of all height LODs was fetched successfully; otherwise, 0.

int fetchNormals(const BoundSphere & bs, const BoundBox & bb, int force = 0)

Loads the data of all normal LODs for the tiles within a given bounding box and a bounding sphere.

Arguments

  • const BoundSphere & bs - Bounding sphere.
  • const BoundBox & bb - Bounding box.
  • int force - Force flag. Use 1 to load files in any case; otherwise, 0. The default value is 0.

Return value

1 if the data of all normal LODs was fetched successfully; otherwise, 0.

int fetchTopologyData(double x, double y, Math::Vec3 & ret_point, Math::vec3 & ret_normal, Math::vec3 & ret_up, int force = 0)

Returns topology data for a given terrain point

Arguments

  • double x - X coordinate of the point.
  • double y - Y coordinate of the point.
  • Math::Vec3 & ret_point - World coordinates of the point.
  • Math::vec3 & ret_normal - Normal coordinates.
  • Math::vec3 & ret_up - "Up" vector coordinates.
  • int force - Force flag. Use 1 to load files in any case; otherwise, 0. The default value is 0.

Return value

1 if the topology data was fetched successfully; otherwise, 0.

void removeAlbedoLod(int num)

Removes a given albedo LOD.

Arguments

  • int num - Albedo LOD number.

void removeHeightLod(int num)

Arguments

  • int num - Height LOD number.

void removeNormalLod(int num)

Removes a given normal LOD.

Arguments

  • int num - Normal LOD number.

static int type()

Returns the type of the object.

Return value

Object Terrain Global type identifier
Last update: 03.07.2017
Build: ()