This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
Rendering
Professional (SIM)
UnigineEditor
Interface Overview
Assets Workflow
Version Control
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Lighting
Sandworm
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Built-in Node Types
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Materials and Shaders
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
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
Content Creation
Content Optimization
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials

LandscapeMapFileCreator Class

Warning
The scope of applications for UnigineScript is limited to implementing materials-related logic (material expressions, scriptable materials, brush materials). Do not use UnigineScript as a language for application logic, please consider C#/C++ instead, as these APIs are the preferred ones. Availability of new Engine features in UnigineScript (beyond its scope of applications) is not guaranteed, as the current level of support assumes only fixing critical issues.

This class is used to generate a landscape map file (.lmap) to be used for landscape layer map creation.

LandscapeMapFileCreator Class

Members

void setResolution ( ivec2 resolution ) #

Sets a new landscape map resolution.

Arguments

  • ivec2 resolution - The two-component vector (X, Y) representing landscape map resolution along X and Y axes, in pixels.

ivec2 getResolution() const#

Returns the current landscape map resolution.

Return value

Current two-component vector (X, Y) representing landscape map resolution along X and Y axes, in pixels.

void setGrid ( ivec2 grid ) #

Sets a new grid size for the landscape map.

Arguments

  • ivec2 grid - The two-component vector (X, Y) representing number of tiles of the landscape map along X and Y axes.

ivec2 getGrid() const#

Returns the current grid size for the landscape map.

Return value

Current two-component vector (X, Y) representing number of tiles of the landscape map along X and Y axes.

float getProgress() const#

Returns the current landscape map file creation progress.

Return value

Current landscape map file creation progress (percentage).

double getTimeSeconds() const#

Returns the current landscape map file creation time. You can use this method to get total file generation time when processing an End callback.

Return value

Current landscape map file creation time, in seconds.

void setPath ( string path ) #

Sets a new path to the generated *.lmap file.

Arguments

  • string path - The path to the generated *.lmap file.

string getPath() const#

Returns the current path to the generated *.lmap file.

Return value

Current path to the generated *.lmap file.

getEventEnd() const#

The event handler signature is as follows: myhandler()

Usage Example

Source code

Return value

Event reference.

getEventBegin() const#

The event handler signature is as follows: myhandler()

Usage Example

Source code

Return value

Event reference.

getEventProgress() const#

The event handler signature is as follows: myhandler()

Usage Example

Source code

Return value

Event reference.

getEventCreate() const#

The event handler signature is as follows: myhandler()

Usage Example

Source code

Return value

Event reference.

static LandscapeMapFileCreator ( ) #

The LandscapeMapFileCreator constructor.

void setDownscaleFilter ( int file_data_type, int filter ) #

Sets a new filtering type to be used for image downscaling performed for LODs of the specified file data type.

Arguments

int getDownscaleFilter ( int file_data_type ) #

Returns the current filtering type used for image downscaling performed for LODs of the specified file data type.

Arguments

  • int file_data_type - File data type.

Return value

Filter type used for image downscaling. See the Unigine::Image Enumerations with FILTER_* prefixes.

int run ( int is_empty = false, int is_safe = true ) #

Runs the landscape map file creation process. You can set callbacks to be fired in the beginning, upon completion and during the process to monitor progress and display statistics. Creates the landscape map file path if it doesn’t exist yet (including subdirectories).

Arguments

  • int is_empty - 1 to create an empty .lmap file (e.g., when you create a layer map to be manually sculpted from scratch using brushes), 0 - to get necessary data from the sources and put them to the generated .lmap file.
  • int is_safe - 1 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), 0 - 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

1 if the operation is successful; otherwise, 0.
Last update: 2024-03-27
Build: ()