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
FAQ
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and 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
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.

Unigine::TerrainDetail Class

Header: #include <UnigineObjects.h>

This class is used to manage details of the Landscape Terrain Object. Details, define terrain's appearance, each ot 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 ( const char * name ) #

Sets a new name for the detail.

Arguments

  • const char * name - New terrain detail name to be set.

const char * getName ( ) #

Returns the name of the detail.

Return value

Current name of the detail.

void setEnabled ( bool enabled ) #

Sets a value indicating if the terrain detail is enabled.

Arguments

  • bool enabled - true to enable the terrain detail, false - to disable it.

bool isEnabled ( ) #

Returns a value indicating if the terrain detail is enabled.

Return value

true if the terrain detail is enabled; otherwise, false.

bool isActive ( ) #

Returns a value indicating if the terrain detail is active.

Return value

true if the terrain detail is active; otherwise, false.

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 ( const Math::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

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

Math::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 ( ) #

Return value

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

void setMaskContrast ( float contrast ) #

Arguments

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

float getMaskContrast ( ) #

Return value

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

void setDetailMask ( const Ptr<TerrainDetailMask> & mask ) #

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

Arguments

  • const Ptr<TerrainDetailMask> & mask - Detail mask to be used for the detail.

Ptr<TerrainDetailMask> getDetailMask ( ) #

Returns the detail mask currently used for the detail.

Return value

Detail mask currently used for the detail.

Ptr<Material> getMaterial ( ) #

Returns the detail material used for the detail.

Return value

Material currently used for the detail.

void setMaterial ( const Ptr<Material> & material ) #

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

Arguments

  • const Ptr<Material> & material - New material to be used for the detail.

int setMaterial ( const char * name ) #

Sets a new detail material with the specified name to be used for the detail.

Arguments

  • const char * name - Name of a new material to be used for the detail.

Return value

1 if the material with the specified name was successfully assigned to the detail; otherwise, 0.

int setMaterial ( const UGUID & guid ) #

Sets a new detail material with the specified GUID to be used for the detail.

Arguments

  • const UGUID & guid - GUID of a new material to be used for the detail.

Return value

1 if the material with the specified GUID was successfully assigned to the detail; otherwise, 0.

Ptr<TerrainDetail> copy ( const Ptr<TerrainDetail> & dest_detail ) #

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

Arguments

  • const Ptr<TerrainDetail> & dest_detail - Destination detail to which the detail is to be copied.

Return value

Destination detail.

Ptr<TerrainDetail> clone ( ) #

Clones the terrain detail (with all its children).

Return value

Cloned detail.
Last update: 2019-12-25
Build: ()