This page has been translated automatically.
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
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
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.

TerrainDetail Class

Warning
UnigineScript is deprecated and will be removed in future releases. Please consider using C#/C++ instead, as these APIs are the preferred ones. Availability of new Engine features in UnigineScipt is not guaranteed, as the current level of support assumes only fixing critical issues.

This class is used to manage details of the Landscape Terrain Object. Details, define terrain's appearance, each of them can have an unlimited number of children. Details are attached to detail masks are rendered in accordance with their rendering order (the one with the highest order shall be rendered above all others).

TerrainDetail Class

Members


void setName ( string name ) #

Sets a new name for the detail.

Arguments

  • string name - New terrain detail name to be set.

string getName ( ) #

Returns the name of the detail.

Return value

Current name of the detail.

void setEnabled ( int enabled ) #

Sets a value indicating if the terrain detail is enabled.

Arguments

  • int enabled - 1 to enable the terrain detail, 0 - to disable it.

int isEnabled ( ) #

Returns a value indicating if the terrain detail is enabled.

Return value

1 if the terrain detail is enabled; otherwise, 0.

int isActive ( ) #

Returns a value indicating if the terrain detail is active.

Return value

1 if the terrain detail is active; otherwise, 0.

void setMinVisibleHeight ( float height ) #

Sets the minimum height value for the detail, starting from which the detail begins to fade in until it becomes completely visible. This parameter is used to modulate the detail mask by height.

Arguments

  • float height - Minimum height value for the detail, in units. The default value is -inf.

float getMinVisibleHeight ( ) #

Returns the minimum height value for the detail, starting from which the detail begins to fade in until it becomes completely visible. This parameter is used to modulate the detail mask by height.

Return value

Minimum height value for the detail, in units.

void setMaxVisibleHeight ( float height ) #

Sets the maximum height value for the detail, starting from which the detail begins to fade out until it becomes completely invisible. This parameter is used to modulate the detail mask by height.

Arguments

  • float height - Maximum height value for the detail, in units. The default value is inf.

float getMaxVisibleHeight ( ) #

Returns the maximum height value for the detail, starting from which the detail begins to fade out until it becomes completely invisible. This parameter is used to modulate the detail mask by height.

Return value

Maximum height value for the detail, in units.

void setMinFadeHeight ( float height ) #

Sets the fade in height range for the detail. Over this height range below the minimum height value the detail will fade in until it is completely visible. This parameter is used to modulate the detail mask by height.

Arguments

  • float height - Fade in height range value for the detail, in units.

float getMinFadeHeight ( ) #

Returns the current fade in height range for the detail. Over this height range below the minimum height value the detail will fade in until it is completely visible. This parameter is used to modulate the detail mask by height.

Return value

Fade in height range value for the detail, in units.

void setMaxFadeHeight ( float height ) #

Sets the fade out height range for the detail. Over this height range below the maximum height value the detail will fade out until it is completely invisible. This parameter is used to modulate the detail mask by height.

Arguments

  • float height - Fade out height range value for the detail, in units.

float getMaxFadeHeight ( ) #

Returns the current fade out height range for the detail. Over this height range below the maximum height value the detail will fade out until it is completely invisible. This parameter is used to modulate the detail mask by height.

Return value

Fade out height range value for the detail, in units.

void setMaskByAlbedo ( vec4 albedo ) #

Sets a new color to be used as a mask for the detail. In this case, all areas on the terrain having selected color will be covered by the detail.

Arguments

  • vec4 albedo - Four-component vector (R, G, B, A) representing a new color to be used as a mask for the detail.

vec4 getMaskByAlbedo ( ) #

Returns the color currently used as a mask for the detail. In this case, all areas on the terrain having selected color will be covered by the detail.

Return value

Four-component vector (R, G, B, A) representing a color currently used as a mask for the detail.

void setMaskThreshold ( float threshold ) #

Sets a new mask threshold value for the detail. Control blending of the detail according to the mask. The Threshold parameter controls the spread intensity of the layer. Lower values provide bigger spread.

Arguments

  • float threshold - New mask threshold value to be set in the [0; 1] range.

float getMaskThreshold ( ) #

Returns a mask threshold value for the detail. Control blending of the detail according to the mask. The Threshold parameter controls the spread intensity of the layer. Lower values provide bigger spread.

Return value

Current mask threshold value in the [0; 1] range.

void setMaskContrast ( float contrast ) #

Sets a new mask contrast value.

Arguments

  • float contrast - New mask contrast value to be set in the [0; 1] range.

float getMaskContrast ( ) #

Returns a current mask contrast value.

Return value

Current mask contrast value in the [0; 1] range.

void setDetailMask ( TerrainDetailMask mask ) #

Sets the specified detail mask to be used for the detail.

Arguments

  • TerrainDetailMask mask - Detail mask to be used for the detail.

TerrainDetailMask getDetailMask ( ) #

Returns the detail mask currently used for the detail.

Return value

Detail mask currently used for the detail.

Material getMaterial ( ) #

Returns the detail material used for the detail.

Return value

Material currently used for the detail.

void setMaterial ( Material material ) #

Sets a new detail material to be used for the detail.

Arguments

  • Material material - New material to be used for the detail.

TerrainDetail copy ( TerrainDetail dest_detail ) #

Copies the detail to the specified destination detail (with all its children).

Arguments

  • TerrainDetail dest_detail - Destination detail to which the detail is to be copied.

Return value

Destination detail.

TerrainDetail clone ( ) #

Clones the terrain detail (with all its children).

Return value

Cloned detail.
Last update: 2020-04-30
Build: ()