This page has been translated automatically.
Видеоуроки
Интерфейс
Основы
Продвинутый уровень
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Профессиональный уровень (SIM)
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Физика
Редактор 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
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
Учебные материалы

Unigine::TerrainGlobalLods Class

Header: #include <UnigineObjects.h>

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

TerrainGlobalLods Class

Members


int getDataFormat ( ) #

Returns a value indicating current image format for the tile data.

Return value

Tile data image format. One of the Image::FORMAT_* values.

int getDataType ( ) #

Returns a value indicating current image format for the tile data.

Return value

Tile data image type. One of the Image::IMAGE_* values.

int getMaskFormat ( ) #

Returns a value indicating current image format for the tile mask.

Return value

Tile mask image format. One of the Image::FORMAT_* values.

void setNumLayers ( int layers ) #

Sets the number of layers of the LOD group.

Arguments

  • int layers - Number of layers.

int getNumLayers ( ) #

Returns the number of layers of the LOD group.

Return value

Number of layers.

int getNumLods ( ) #

Returns the total number of LODs in the group.

Return value

Total number of LODs.

int addLod ( ) #

Adds a new LOD.

Return value

Index of the last added LOD.

void insertLod ( int num ) #

Inserts a new LOD at the specified position.

Arguments

  • int num - Position to insert a new LOD at.

void removeLod ( int num ) #

Removes the LOD with the specified number.

Arguments

  • int num - LOD number.

void clearLods ( ) #

Removes all LODs.

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

Loads the data of all 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 LODs was fetched successfully; otherwise, 0.

int fetchData ( double x, double y, Pixel & ret_pixel, int layer, bool force ) #

Fetches the data for the point on the terrain with given coordinates and puts it to the specified output structure.

Arguments

  • double x - X coordinate of the point on the terrain.
  • double y - Y coordinate of the point on the terrain.
  • Pixel & ret_pixel - Output Pixel structure to store the pixel color.
  • int layer - Layer number.
  • bool force - Force flag.
    • If 1 is specified, the data will be fetched immediately.
    • If 0 is specified, the operation will be queued to a separate thread.
    Notice
    It is recommended to set this flag to 0 when possible to avoid spikes.
    .

Return value

1 if the data for the specified pixel was fetched successfully; otherwise, 0.

int getType ( ) #

Returns the type of LODs.

const char * getName ( ) #

Returns the name of the LOD group.

Return value

LOD group name.

Ptr<TerrainGlobalLod> getLod ( int num ) #

Returns the LOD with a given number.

Arguments

  • int num - LOD number.

Return value

Pointer to TerrainGlobalLod.

String getVideoMemoryUsage ( ) #

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

Return value

Total video memory usage for all LODs.
Last update: 28.11.2019
Build: ()