This page has been translated automatically.
Видеоуроки
Interface
Essentials
Advanced
Подсказки и советы
Программирование на C#
Рендеринг
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Физика
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Настройки и предпочтения
Работа с проектами
Настройка параметров узла
Setting Up Materials
Setting Up Properties
Освещение
Landscape Tool
Sandworm
Использование инструментов редактора для конкретных задач
Extending Editor Functionality
Встроенные объекты
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Objects
Sound Objects
Pathfinding Objects
Players
Программирование
Основы
Настройка среды разработки
Примеры использования
UnigineScript
C++
C#
Унифицированный язык шейдеров UUSL
File Formats
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
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
Работа с контентом
Оптимизация контента
Материалы
Art Samples
Tutorials
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

Unigine::TerrainGlobalLod Class

Header: #include <UnigineObjects.h>

This class is used to manage a single LOD (level of detail) of the global terrain object.

TerrainGlobalLod Class

Enums

TYPE#

NameDescription
TERRAIN_GLOBAL_LOD = 0Albedo, normal or detail mask LOD of the global terrain object.
TERRAIN_GLOBAL_LOD_HEIGHT = 1Height LOD of the global terrain object. This type of LOD is used for collision and intersection detection.
NUM_TERRAIN_GLOBAL_LODS = 2Total number of LOD types of the global terrain objectю

Members


void setClearDistance ( float distance ) #

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

Arguments

  • float distance - Clear distance, in units.

float getClearDistance ( ) #

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

Return value

Current clear distance, in units.

void setEnabled ( bool enabled ) #

Enables or disables the LOD.

Arguments

  • bool enabled - 1 to enable the LOD, 0 to disable it.

bool isEnabled ( ) #

Returns a value indicating if the LOD is enabled.

Return value

1 if the LOD is enabled; otherwise, 0.

void setLoadDistance ( float distance ) #

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

Arguments

  • float distance - Load distance, in units.

float getLoadDistance ( ) #

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

Return value

Current load distance, in units.

void setPath ( const char * path ) #

Sets the path to the folder where the LOD is stored.

Arguments

  • const char * path - Path to the folder where the LOD is stored.

const char * getPath ( ) #

Returns the path to the folder where the LOD is stored.

Return value

Path to the folder where the LOD is stored.

void setTileDensity ( float density ) #

Sets the density of LOD tiles.

Arguments

  • float density - LOD tile density, in meters per pixel.

float getTileDensity ( ) #

Returns the current density of LOD tiles.

Return value

Current LOD tile density, in meters per pixel.

Ptr<Tileset> getTileset ( ) #

Returns the tileset for the LOD.

Return value

LOD tileset.

void setViewportMask ( int mask ) #

Sets the bit mask for rendering into the viewport. The LOD is rendered, if its mask matches the player's one.

Arguments

  • int mask - Viewport mask, an integer value each bit of which is a mask.

int getViewportMask ( ) #

Returns the current bit mask for rendering into the viewport. The LOD is rendered, if its mask matches the player's one.

Return value

Viewport mask, an integer value each bit of which is a mask.

void setVisibleDistance ( float distance ) #

Sets the visibility distance. Starting from this distance the tiles of the LOD become visible.

Arguments

  • float distance - Visibility distance, in units.

float getVisibleDistance ( ) #

Returns the current visibility distance. Starting from this distance the tiles of the LOD become visible.

Return value

Current visibility distance, in units.

int renamePath ( const char * new_path ) #

Sets a new path to the folder where the LOD is stored.

Arguments

  • const char * new_path - New path to be set.

Return value

1 if the new path was set successfully; otherwise, 0.

void reload ( ) #

Reloads the LOD.

TerrainGlobalLod::TYPE getType ( ) #

Returns the type of the LOD. This method is used to define whether it is a height LOD used for collision and intersection detection or an ordinary albedo, normal or detail mask LOD.

Return value

LOD type, one of the TYPE values.

const char * getTypeName ( ) #

Returns the name of the terrain global LOD type. This method is used to define whether it is a height LOD used for collision and intersection detection or an ordinary albedo, normal or detail mask LOD.

Return value

Name of the terrain global LOD type. One of the following values:
  • TerrainGlobalLod
  • TerrainGlobalLodHeight
Last update: 09.04.2021
Build: ()