This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Lighting
Landscape Tool
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
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
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
Content Creation
Content Optimization
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

TerrainGlobalLods 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.
Warning
The functionality described in this article is not available in the Community SDK edition.
You should upgrade to Engineering / Sim SDK edition to use it.

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_* 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 ( BoundSphere bs, BoundBox bb, int force = 0 ) #

Loads the data of all LODs for the tiles within a given bounding box and a bounding sphere.

Arguments

  • BoundSphere bs - Bounding sphere.
  • 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 getType ( ) #

Returns the type of LODs.

string getName ( ) #

Returns the name of the LOD group.

Return value

LOD group name.

TerrainGlobalLod getLod ( int num ) #

Returns the LOD with a given number.

Arguments

  • int num - LOD number.

Return value

TerrainGlobalLod instance.

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: 2021-12-13
Build: ()