This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
专业(SIM)
UnigineEditor
界面概述
资产工作流程
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
照明
Landscape Tool
Sandworm
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
使用范例
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Materials and Shaders
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
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
创建内容
内容优化
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Unigine::TerrainDetailMask Class

Header: #include <UnigineObjects.h>

This class is used to manage detail masks of the Landscape Terrain Object. Each detail mask can have an unlimited number of details, defining its appearance. Detail masks are rendered in accordance with their rendering order (the one with the highest order shall be rendered above all others).

TerrainDetailMask Class

Members


void setName ( const char * name ) #

Sets a new name for the detail mask.

Arguments

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

const char * getName ( ) #

Returns the name of the detail mask.

Return value

Current name of the detail mask.

void setEnabled ( bool enabled ) #

Sets a value indicating if the terrain detail mask is enabled.

Arguments

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

bool isEnabled ( ) #

Returns a value indicating if the terrain detail mask is enabled.

Return value

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

int getRenderOrder ( ) #

Returns rendering order of the detail mask. Rendering order of masks can be changed via the swapRenderOrder()method.

Return value

Rendering order of the detail mask in the [0; 19] range.

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

Swap rendering order of this detail mask with the specified one.

Arguments

  • const Ptr<TerrainDetailMask> & mask - Target detail mask.

Ptr<TerrainDetail> addDetail ( ) #

Adds a new detail for this mask.

Return value

New detail added for this mask.

int getNumDetails ( ) #

Returns the number of details of this detail mask.

Return value

Number of details of this detail mask.

Ptr<TerrainDetail> getDetail ( int num ) #

Returns a detail by its index.

Arguments

  • int num - Detail index.

Return value

Detail with the specified index (if it exists); otherwise, an assertion failure error is reported.

int isDetail ( const Ptr<TerrainDetail> & detail ) #

Checks if the specified detail belongs to this detail mask.

Arguments

Return value

1 if the specified terrain detail belongs to this mask; otherwise, 0.

int findDetailIndex ( const char * name ) #

Returns a detail index by its name.

Arguments

  • const char * name - Detail name.

Return value

Index of the detail having the specified name (if it exists); otherwise, -1.

Ptr<TerrainDetail> findDetail ( const char * name ) #

Returns a detail attached to the detail mask by its name.

Arguments

  • const char * name - Detail name.

Return value

Detail with the specified name (if it exists); otherwise, nullptr.

void setDetailIndex ( const Ptr<TerrainDetail> & detail, int index ) #

Replaces a detail with a given index with the specified detail.

Arguments

  • const Ptr<TerrainDetail> & detail - Detail to be set instead of the one with the given index.
  • int index - Index of the detail to be replaced with the specified one.

int getDetailIndex ( const Ptr<TerrainDetail> & detail ) #

Returns the index of the specified detail.

Arguments

Return value

Index of the specified detail (if it exists); otherwise, -1.

void swapDetail ( int num_0, int num_1 ) #

Swaps the two details with given indices.

Arguments

  • int num_0 - First detail index.
  • int num_1 - Second detail index.

int getIndex ( ) #

Returns the index of the detail mask.

Return value

Index of the detail mask in the [0; 19] range.

void setDithering ( float dithering ) #

Sets a new dither amount for the detail mask of the landscape terrain. Dithering enables reduction of graphical artefacts in case of increased Mask Contrast values set for details. This value is multiplied by the global dither amount.

Arguments

  • float dithering - New dither amount to be set for the detail mask in the [0.0f; 1.0f] range.

float getDithering ( ) const#

Returns the current dither amount for the detail mask of the landscape terrain. Dithering enables reduction of graphical artefacts in case of increased Mask Contrast values set for details. This value is multiplied by the global dither amount.

Return value

Current dither amount for the detail mask in the [0.0f; 1.0f] range.
Last update: 2022-09-08
Build: ()