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::LandscapeImages Class

Header: #include <UnigineObjects.h>

This class is used to manage a fragment of terrain data on the CPU side (e.g. modify heights, albedo, or masks, etc.). Actually it represents a data container for a fragment of terrain area of the specified resolution. This class can be used, for example, when implementing CPU-based brushes.

LandscapeImages Class

Members


Ptr<LandscapeImages> create ( const Math::ivec2 & resolution ) #

Creates a new LandscapeImages object to store the data for a terrain area of the specified resolution.

Arguments

  • const Math::ivec2 & resolution - Two-component vector containing image resolution along X and Y axes.

Return value

LandscapeImages instance - a data container for a terrain area of the specified size.

Ptr<Image> getHeight ( ) #

Returns height data as an image.

Return value

Image (R32F) containing height data.

Ptr<Image> getAlbedo ( ) #

Returns albedo data as an RGBA8 image. Opacity data is stored in the alpha-channel.

Return value

Image (RGBA8) containing albedo data.

Ptr<Image> getMask ( int num ) #

Returns mask data as an RGBA8 image.
Notice
Each detail mask can be represented by a single-channel image. For optimization purposes detail mask data is stored in blocks - RGBA8 images (each containing 4 masks, one mask per each channel). There are 5 blocks, as the terrain has 20 detail masks available. Thus, the data of the 9th detail mask shall be stored in the R-channel of the third block (index = 2).

Arguments

  • int num - Masks data block index.

Return value

Image (RGBA8) containing mask data.

Ptr<Image> getOpacityHeight ( ) #

Returns opacity information for height data as an R32F image.

Return value

Image (R32F) containing opacity information for height data.

Ptr<Image> getOpacityMask ( int num ) #

Returns opacity information for mask data as an RGBA8 image.
Notice
Each mask can be represented by a single-channel image. For optimization purposes opacity information for mask data is stored in blocks - RGBA8 images (each containing 4 masks, one mask per each channel). There are 5 blocks, as the terrain has 20 detail masks available. Thus, the data of the 9th detail mask shall be stored in the R-channel of the third block (index = 2).

Arguments

  • int num - Masks data block index.

Return value

Image (RGBA8) containing opacity information for mask data.

Ptr<Image> get ( int type ) #

Returns the image of the specified type.

Arguments

Return value

Image of the specified type.

Math::ivec2 getResolution ( ) #

Returns the current image resolution.

Return value

Two-component vector containing image resolution along X and Y axes.

void resize ( Math::ivec2 new_resolution ) #

Sets a new image resolution.

Arguments

  • Math::ivec2 new_resolution - Two-component vector containing new image resolution along X and Y axes to be set.

Ptr<LandscapeImages> copy ( const Ptr<LandscapeImages> & image ) #

Copies this LandscapeImages buffer to the specified one (all data layers).

Arguments

  • const Ptr<LandscapeImages> & image - Destination LandscapeImages buffer to which this one is to be copied.

Return value

Destination LandscapeImages buffer.

Ptr<LandscapeImages> clone ( ) #

Clones the LandscapeImages buffer (all data layers).

Return value

Cloned LandscapeImages buffer.
Last update: 09.04.2021
Build: ()