This page has been translated automatically.
Видеоуроки
Interface
Essentials
Advanced
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Professional (SIM)
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Физика
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Настройки и предпочтения
Работа с проектами
Настройка параметров ноды
Setting Up Materials
Настройка свойств
Освещение
Sandworm
Использование инструментов редактора для конкретных задач
Расширение функционала редактора
Встроенные объекты
Ноды (Nodes)
Объекты (Objects)
Эффекты
Декали
Источники света
Geodetics
World-ноды
Звуковые объекты
Объекты поиска пути
Players
Программирование
Основы
Настройка среды разработки
Примеры использования
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Плагины
Форматы файлов
Materials and Shaders
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
Работа с контентом
Оптимизация контента
Материалы
Визуальный редактор материалов
Сэмплы материалов
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

Unigine.LandscapeMapFileCompression Class

Landscape Map File Compression class is used to compress and decompress .lmap file data using Zlib, LZ4, or Unigine's compression algorithm. The latter provides better compression results for 2D and 3D textures than LZ4 and Zlib without quality reduction.

LandscapeMapFileCompression Class

Properties

bool IsCompressing#

The true if the compression is running; otherwise, false.

bool IsDecompressing#

The true if the decompression is running; otherwise, false.

int Progress#

The Current landscape map file compression progress (percentage).

Landscape.COMPRESSOR_TYPE HeightCompressor#

The Type of the compressor used for height data compression.

Landscape.COMPRESSOR_TYPE AlbedoCompressor#

The Type of the compressor used for albedo data compression.

Landscape.COMPRESSOR_TYPE OpacityHeightCompressor#

The Type of the compressor used for compression of the opacity height data.

bool EnabledAlbedoTextureCompression#

The Value indicating if the compression of the albedo texture enabled or not.

bool EnabledOpacityHeightTextureCompression#

The Value indicating if the compression of the opacity height texture enabled or not.

UGUID GUID#

The GUID of the .lmap file.

string CacheDirectory#

The path to the directory that stores the cache.

Members


LandscapeMapFileCompression ( ) #

Constructor.

bool Compress ( bool is_safe ) #

Starts the landscape map file compression process.

Arguments

  • bool is_safe - true to make the Engine automatically call filesClose()/fileOpen() methods when performing operations (before modifying an .lmap file the Engine should release files via filesClose(), while after modification fileOpen() should be called), false — to call filesClose()/fileOpen() methods manually.

    The Landscape class has two overloads for the filesClose() method:

    • filesClose() — to be called in case of moving an .lmap file (no data reloading is performed as the file itself was not modified — saves time on reloading data)
    • filesClose(reload_files) — to be called in case of deleting or modifying an .lmap file.
    Notice
    When is_safe = true the Engine shall always call filesClose(reload_files) with complete data reloading.

Return value

true if the compression operation is successful; otherwise, false.

bool Decompress ( bool is_safe ) #

Starts the landscape map file decompression process.

Arguments

  • bool is_safe - true to make the Engine automatically call filesClose()/fileOpen() methods when performing operations (before modifying an .lmap file the Engine should release files via filesClose(), while after modification fileOpen() should be called), false — to call filesClose()/fileOpen() methods manually.

    The Landscape class has two overloads for the filesClose() method:

    • filesClose() — to be called in case of moving an .lmap file (no data reloading is performed as the file itself was not modified — saves time on reloading data)
    • filesClose(reload_files) — to be called in case of deleting or modifying an .lmap file.
    Notice
    When is_safe = true the Engine shall always call filesClose(reload_files) with complete data reloading.

Return value

true if the decompression operation is successful; otherwise, false.

void Stop ( ) #

Stops the landscape map file compression/decompression process.

void SetMaskCompressor ( int mask, Landscape.COMPRESSOR_TYPE compressor_type ) #

Sets the type of the compressor used for the specified mask.

Arguments

  • int mask - Mask number.
  • Landscape.COMPRESSOR_TYPE compressor_type - Compressor type:
    • 0 – None
    • 1 – Our Method
    • 2 – LZ4
    • 3 – Zlib

void SetMaskOpacityCompressor ( int mask, Landscape.COMPRESSOR_TYPE compressor_type ) #

Sets the type of the compressor used for the opacity data of the specified mask.

Arguments

  • int mask - Mask number.
  • Landscape.COMPRESSOR_TYPE compressor_type - Compressor type:
    • 0 – None
    • 1 – Our Method
    • 2 – LZ4
    • 3 – Zlib

void SetCompressorAll ( Landscape.COMPRESSOR_TYPE compressor_type ) #

Sets the type of the compressor used to compress all data.

Arguments

int GetMaskCompressor ( int mask ) #

Returns the current type of the compressor used for the specified mask.

Arguments

  • int mask - Mask number.

Return value

Compressor type:
  • 0 – None
  • 1 – Our Method
  • 2 – LZ4
  • 3 – Zlib

int GetMaskOpacityCompressor ( int mask ) #

Returns the current type of the compressor used for the opacity data of the specified mask.

Arguments

  • int mask - Mask number.

Return value

Compressor type:
  • 0 – None
  • 1 – Our Method
  • 2 – LZ4
  • 3 – Zlib

void SetEnabledMaskTextureCompression ( int mask, bool enable ) #

Enables or disables compression of the specified mask texture.

Arguments

  • int mask - Mask number.
  • bool enable - true to enable the mask texture compression; otherwise, false.

void SetEnabledMaskOpacityTextureCompression ( int mask, bool enable ) #

Enables or disables compression of the specified mask opacity texture.

Arguments

  • int mask - Mask number.
  • bool enable - true to enable the compression of the mask opacity texture; otherwise, false.

bool IsEnabledMaskTextureCompression ( int mask ) #

Returns a value undicating if the mask texture compression is enabled.

Arguments

  • int mask - Mask number.

Return value

true if the mask texture compression is enabled; otherwise, false.

bool IsEnabledMaskOpacityTextureCompression ( int mask ) #

Returns the value indicating if the compression of the mask opacity texture is enabled.

Arguments

  • int mask - Mask number.

Return value

true if the mask opacity texture compression is enabled; otherwise, false.
Last update: 14.12.2022
Build: ()