标量场
61 个节点
本页内容 61
物理比例
函数Meters per unit cell.
This applies only to width and "height" of the heightmap grid, not physical height.
物理比例(Scalar Field: Scalar Field) -> 数字
double PhysicalScale(ScalarField2D Scalar Field)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
返回
| 结果 | 数字 |
备注
Recommended range for large scale terrain work: 1m/px to 10m/px.
As a reference, a 2K heightmap representing 4km square landscape should use a ScalarField2D.PhysicalScale of 2, aka. 2 meters per unit cell.
Use lower value (e.g. 0.5) if we wish to represent dense details on smaller regions.
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
标量场
函数重载 1/2
标量场(宽度: 整数, 高度: 整数) -> Scalar Field
ScalarField2D ScalarField2D(int width, int height)
Initializes a new instance of the Heightmap class with the specified dimensions.
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| 宽度 | 整数 | — | The width (number of columns) of the heightmap. |
| 高度 | 整数 | — | The height (number of rows) of the heightmap. |
返回
| 标量场 | Scalar Field |
重载 2/2
标量场(初始数据: 数字数组数组) -> Scalar Field
ScalarField2D ScalarField2D(double[][] initialData)
Initializes a new instance of the Heightmap class with the specified data.
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| 初始数据 | 数字数组数组 | — | A jagged array of doubles representing the heightmap data. |
返回
| 标量场 | Scalar Field |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
相加
函数Adds another heightmap to this heightmap, element-wise.
相加(Scalar Field: Scalar Field, 另一个: Scalar Field)
void Add(ScalarField2D Scalar Field, ScalarField2D other)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| 另一个 | Scalar Field | — | The other heightmap to add. |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 事件 例程 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
应用
函数Applies a custom transformation function to each height value in the heightmap.
重载 1/2
应用(Scalar Field: Scalar Field, 变换: Func<数字, 数字>)
void Apply(
ScalarField2D Scalar Field,
Func<double, double> transform)参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| 变换 | Func<数字, 数字> | — | The function to apply to each height value. |
重载 2/2
应用
Scalar Field: Scalar Field
变换: Func<整数, 整数, 数字, 数字>void Apply(
ScalarField2D Scalar Field,
Func<int, int, double, double> transform)参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| 变换 | Func<整数, 整数, 数字, 数字> | — | The function to apply to each height value. |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 事件 例程 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
复制标量场
函数Clones the heightmap, creating a deep copy.
复制标量场(Scalar Field: Scalar Field) -> Scalar Field
ScalarField2D Clone(ScalarField2D Scalar Field)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
返回
| 结果 | Scalar Field |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
创建模板
函数Creates a heightmap with same dimensions and attributes but initialized with fresh empty data.
创建模板 -> Scalar Field
Scalar Field: Scalar Field
新用途: 文本ScalarField2D CreateTemplate(
ScalarField2D Scalar Field,
string newUsage)参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| 新用途 | 文本 | — |
返回
| 结果 | Scalar Field |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
裁剪
函数Crops the heightmap to the specified rectangular region.
裁剪 -> Scalar Field
Scalar Field: Scalar Field
起点 X: 整数
起点 Y: 整数
裁剪宽度: 整数
裁剪高度: 整数ScalarField2D Crop(
ScalarField2D Scalar Field,
int startX,
int startY,
int cropWidth,
int cropHeight)参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| 起点 X | 整数 | — | The starting x-coordinate (column index). |
| 起点 Y | 整数 | — | The starting y-coordinate (row index). |
| 裁剪宽度 | 整数 | — | The width of the cropped region. |
| 裁剪高度 | 整数 | — | The height of the cropped region. |
返回
| 结果 | Scalar Field |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 事件 例程 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
侵蚀笔刷
函数重载 1/2
侵蚀笔刷
Scalar Field: Scalar Field
中心 X: 整数
中心 Y: 整数
半径: 整数
衰减: 数字
笔刷形状: ScalarField2D.PaintbrushShapevoid ErodeBrush(
ScalarField2D Scalar Field,
int centerX,
int centerY,
int radius,
double falloff,
ScalarField2D.PaintbrushShape brushShape = PaintbrushShape.Circle)Simple erosion
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| 中心 X | 整数 | — | |
| 中心 Y | 整数 | — | |
| 半径 | 整数 | — | |
| 衰减 | 数字 | — | |
| 笔刷形状 | ScalarField2D.PaintbrushShape | 圆形 |
重载 2/2
侵蚀笔刷
Scalar Field: Scalar Field
中心 X: 整数
中心 Y: 整数
半径: 整数
衰减: 数字
迭代次数: 整数
休止角: 数字
侵蚀系数: 数字
笔刷形状: ScalarField2D.PaintbrushShapevoid ErodeBrush(
ScalarField2D Scalar Field,
int centerX,
int centerY,
int radius,
double falloff,
int iterations,
double talusAngle,
double erosionFactor,
ScalarField2D.PaintbrushShape brushShape = PaintbrushShape.Circle)Applies thermal erosion within a brush area.
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| 中心 X | 整数 | — | The x-coordinate of the brush center. |
| 中心 Y | 整数 | — | The y-coordinate of the brush center. |
| 半径 | 整数 | — | The radius of the brush. |
| 衰减 | 数字 | — | The fall-off parameter (0 to 1). |
| 迭代次数 | 整数 | — | The number of erosion iterations to perform. |
| 休止角 | 数字 | — | The maximum stable slope (in height units). |
| 侵蚀系数 | 数字 | — | Controls how much material moves per iteration (0 to 1). |
| 笔刷形状 | ScalarField2D.PaintbrushShape | 圆形 | The shape of the brush ("circle" or "rectangle"). |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 事件 例程 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
压平笔刷
函数Flattens the terrain within a brush area to a target height.
压平笔刷
Scalar Field: Scalar Field
中心 X: 整数
中心 Y: 整数
半径: 整数
衰减: 数字
目标高度: 数字
笔刷形状: ScalarField2D.PaintbrushShapevoid FlattenBrush(
ScalarField2D Scalar Field,
int centerX,
int centerY,
int radius,
double falloff,
double targetHeight,
ScalarField2D.PaintbrushShape brushShape = PaintbrushShape.Circle)参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| 中心 X | 整数 | — | The x-coordinate of the brush center. |
| 中心 Y | 整数 | — | The y-coordinate of the brush center. |
| 半径 | 整数 | — | The radius of the brush. |
| 衰减 | 数字 | — | The fall-off parameter (0 to 1). |
| 目标高度 | 数字 | — | The target height to flatten to. |
| 笔刷形状 | ScalarField2D.PaintbrushShape | 圆形 | The shape of the brush ("circle" or "rectangle"). |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 事件 例程 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
列数
函数Gets the width of the heightmap (number of columns).
列数(Scalar Field: Scalar Field) -> 整数
int Columns(ScalarField2D Scalar Field)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
返回
| 结果 | 整数 |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
获取数据
函数Row-major: height (y), width (x).
获取数据(Scalar Field: Scalar Field) -> 数字数组数组
double[][] Data(ScalarField2D Scalar Field)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
返回
| 结果 | 数字数组数组 |
备注
Every read of the values goes through here, the field's own members' included, so a field whose values are kept elsewhere - on the graphics card, where a GPU kernel left them (round 26) - brings them here the first time anything reads it, and from then on is an ordinary field.
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
获取高程
函数此节点没有文档说明。
获取高程(Scalar Field: Scalar Field) -> ScalarField2D.ElevationRange
ScalarField2D.ElevationRange Elevations(ScalarField2D Scalar Field)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
返回
| 结果 | ScalarField2D.ElevationRange |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
是否已归一化
函数Gets whether all values in this scalar field are valid normalized values in the inclusive 0..1 range.
是否已归一化(Scalar Field: Scalar Field) -> 真否
bool IsNormalized(ScalarField2D Scalar Field)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
返回
| 结果 | 真否 |
备注
This does not require the field minimum to be exactly 0 or the maximum to be exactly 1.
A constant mask value such as 0.5 is considered normalized because it is already directly usable as opacity.
Non-finite values are never considered normalized.
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
是否为正方形
函数Occassionally useful due to output engine requirements - some usage scenarios require square maps.
是否为正方形(Scalar Field: Scalar Field) -> 真否
bool IsSquare(ScalarField2D Scalar Field)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
返回
| 结果 | 真否 |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
值
函数Gets or sets the height value at the specified (x, y) coordinate.
值(Scalar Field: Scalar Field, X: 整数, Y: 整数) -> 数字
double Item(ScalarField2D Scalar Field, int x, int y)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| X | 整数 | — | The x-coordinate (column index). |
| Y | 整数 | — | The y-coordinate (row index). |
返回
| 结果 | 数字 |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
行数
函数Gets the height of the heightmap (number of rows).
行数(Scalar Field: Scalar Field) -> 整数
int Rows(ScalarField2D Scalar Field)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
返回
| 结果 | 整数 |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
用途
函数An indicator what this heightmap is used for.
Some valid values: Height, Mask, Slope/Steepness, Wetness, etc.
用途(Scalar Field: Scalar Field) -> 文本
string Usage(ScalarField2D Scalar Field)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
返回
| 结果 | 文本 |
备注
Currently only for display purpose; No functional distinction.
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
获取世界深度
函数此节点没有文档说明。
获取世界深度(Scalar Field: Scalar Field) -> 数字
double WorldDepth(ScalarField2D Scalar Field)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
返回
| 结果 | 数字 |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
获取世界宽度
函数此节点没有文档说明。
获取世界宽度(Scalar Field: Scalar Field) -> 数字
double WorldWidth(ScalarField2D Scalar Field)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
返回
| 结果 | 数字 |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
获取角度(度)
函数Calculates the slope angle in degrees based on the gradient at a given point.
获取角度(度) -> 数字
Scalar Field: Scalar Field
X: 整数
Y: 整数double GetAngleDegree(ScalarField2D Scalar Field, int x, int y)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| X | 整数 | — | The x-coordinate (column index). |
| Y | 整数 | — | The y-coordinate (row index). |
返回
| 结果 | 数字 |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 事件 例程 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
获取平均高度
函数Gets the average height value of the heightmap.
获取平均高度(Scalar Field: Scalar Field) -> 数字
double GetAverageHeight(ScalarField2D Scalar Field)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
返回
| 结果 | 数字 |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
获取颜色
函数此节点没有文档说明。
获取颜色(Scalar Field: Scalar Field, X: 整数, Y: 整数) -> 颜色
ColorElement GetColor(ScalarField2D Scalar Field, int x, int y)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| X | 整数 | — | |
| Y | 整数 | — |
返回
| 结果 | 颜色 |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 事件 例程 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
获取数组形式的数据
函数Gets a copy of data.
获取数组形式的数据(Scalar Field: Scalar Field) -> 数字数组数组
double[][] GetDataAsArrays(ScalarField2D Scalar Field)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
返回
| 结果 | 数字数组数组 |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 事件 例程 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
获取数组形式的数据(低精度)
函数Gets a copy of data in floats.
获取数组形式的数据(低精度)(Scalar Field: Scalar Field) -> 低精度数字数组数组
float[][] GetDataAsArraysLD(ScalarField2D Scalar Field)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
返回
| 结果 | 低精度数字数组数组 |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 事件 例程 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
获取浮点值
函数This is very slow!
获取浮点值 -> 低精度数字
Scalar Field: Scalar Field
X: 整数
Y: 整数float GetFloatValue(ScalarField2D Scalar Field, int x, int y)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| X | 整数 | — | |
| Y | 整数 | — |
返回
| 结果 | 低精度数字 |
备注
Currently this is very slow, e.g. when used with `PixelImageSampling.GetGrayClamped` on `ImageFilter.DirectionalGradientSmudge`. It's recommended to conver the Topology.ScalarField2D to a grayscale image first.
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 事件 例程 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
获取梯度
函数Gets the gradient (partial derivatives) at the specified (x, y) coordinate.
获取梯度 -> (数字, 数字)
Scalar Field: Scalar Field
X: 整数
Y: 整数
使用物理比例: 真否(double, double) GetGradient(
ScalarField2D Scalar Field,
int x,
int y,
bool usePhysicalScale = true)参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| X | 整数 | — | The x-coordinate (column index). |
| Y | 整数 | — | The y-coordinate (row index). |
| 使用物理比例 | 真否 | True |
返回
| 结果 | (数字, 数字) |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 事件 例程 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
获取梯度大小
函数此节点没有文档说明。
获取梯度大小 -> 数字
Scalar Field: Scalar Field
X: 整数
Y: 整数
使用物理比例: 真否double GetGradientMagnitude(
ScalarField2D Scalar Field,
int x,
int y,
bool usePhysicalScale)参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| X | 整数 | — | |
| Y | 整数 | — | |
| 使用物理比例 | 真否 | — |
返回
| 结果 | 数字 |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 事件 例程 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
获取灰度字节
函数此节点没有文档说明。
获取灰度字节 -> 字节
Scalar Field: Scalar Field
X: 整数
Y: 整数byte GetGrayByte(ScalarField2D Scalar Field, int x, int y)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| X | 整数 | — | |
| Y | 整数 | — |
返回
| 结果 | 字节 |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 事件 例程 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
获取高度变化
函数此节点没有文档说明。
获取高度变化 -> 数字
Scalar Field: Scalar Field
X: 整数
Y: 整数double GetHeightChange(ScalarField2D Scalar Field, int x, int y)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| X | 整数 | — | |
| Y | 整数 | — |
返回
| 结果 | 数字 |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 事件 例程 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
获取最大高度
函数Gets the maximum height value in the heightmap.
获取最大高度(Scalar Field: Scalar Field) -> 数字
double GetMaxHeight(ScalarField2D Scalar Field)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
返回
| 结果 | 数字 |
备注
Consider using ScalarField2D.Elevations
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
获取最小高度
函数Gets the minimum height value in the heightmap.
获取最小高度(Scalar Field: Scalar Field) -> 数字
double GetMinHeight(ScalarField2D Scalar Field)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
返回
| 结果 | 数字 |
备注
Consider using ScalarField2D.Elevations
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
获取法线
函数重载 1/2
获取法线 -> (数字, 数字, 数字)
Scalar Field: Scalar Field
X: 整数
Y: 整数(double, double, double) GetNormal(
ScalarField2D Scalar Field,
int x,
int y)Gets the normal vector at the specified (x, y) coordinate.
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| X | 整数 | — | The x-coordinate (column index). |
| Y | 整数 | — | The y-coordinate (row index). |
返回
| 结果 | (数字, 数字, 数字) |
重载 2/2
获取法线 -> Vector3dhd
Scalar Field: Scalar Field
点 1: Vector3dhd
点 2: Vector3dhd
点 3: Vector3dhdVector3DHD GetNormal(
ScalarField2D Scalar Field,
Vector3DHD p1,
Vector3DHD p2,
Vector3DHD p3)Computes the normal vector of a triangle defined by three 3D points.
Points should be specified in counter-clockwise order to ensure the normal points outward (right-hand rule).
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| 点 1 | Vector3dhd | — | |
| 点 2 | Vector3dhd | — | |
| 点 3 | Vector3dhd | — |
返回
| 结果 | Vector3dhd |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 事件 例程 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
获取物理高度变化
函数此节点没有文档说明。
获取物理高度变化 -> 数字
Scalar Field: Scalar Field
X: 整数
Y: 整数double GetPhysicalHeightChange(
ScalarField2D Scalar Field,
int x,
int y)参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| X | 整数 | — | |
| Y | 整数 | — |
返回
| 结果 | 数字 |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 事件 例程 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
获取值
函数Gets the height value at the specified (x, y) coordinate.
获取值(Scalar Field: Scalar Field, X: 整数, Y: 整数) -> 数字
double GetValue(ScalarField2D Scalar Field, int x, int y)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| X | 整数 | — | The x-coordinate (column index). |
| Y | 整数 | — | The y-coordinate (row index). |
返回
| 结果 | 数字 |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 事件 例程 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
获取 Z
函数此节点没有文档说明。
获取 Z -> 低精度数字
Scalar Field: Scalar Field
X: 低精度数字
Y: 低精度数字float GetZ(ScalarField2D Scalar Field, float x, float y)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| X | 低精度数字 | — | |
| Y | 低精度数字 | — |
返回
| 结果 | 低精度数字 |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 事件 例程 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
插值高度
函数Interpolates the height value at the specified (x, y) coordinate using bilinear interpolation.
插值高度(Scalar Field: Scalar Field, X: 数字, Y: 数字) -> 数字
double InterpolateHeight(
ScalarField2D Scalar Field,
double x,
double y)参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| X | 数字 | — | The x-coordinate (can be fractional). |
| Y | 数字 | — | The y-coordinate (can be fractional). |
返回
| 结果 | 数字 |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 事件 例程 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
噪声笔刷
函数此节点没有文档说明。
噪声笔刷
Scalar Field: Scalar Field
中心 X: 整数
中心 Y: 整数
半径: 整数
衰减: 数字
噪声振幅: 数字
笔刷形状: ScalarField2D.PaintbrushShapevoid NoiseBrush(
ScalarField2D Scalar Field,
int centerX,
int centerY,
int radius,
double falloff,
double noiseAmplitude,
ScalarField2D.PaintbrushShape brushShape = PaintbrushShape.Circle)参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| 中心 X | 整数 | — | |
| 中心 Y | 整数 | — | |
| 半径 | 整数 | — | |
| 衰减 | 数字 | — | |
| 噪声振幅 | 数字 | — | |
| 笔刷形状 | ScalarField2D.PaintbrushShape | 圆形 |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 事件 例程 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
就地归一化并限制范围
函数Normalizes every value in _heightData in place so the result is between 0.0 and 1.0 (as specified by Max Value).
For data values smaller than zero, it becomes 0.
就地归一化并限制范围(Scalar Field: Scalar Field, 最大值: 数字)
void NormalizeInPlaceWithClamp(
ScalarField2D Scalar Field,
double maxValue)参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| 最大值 | 数字 | — |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 事件 例程 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
抬升降低笔刷
函数Raises or lowers the terrain within a brush area.
抬升降低笔刷
Scalar Field: Scalar Field
中心 X: 整数
中心 Y: 整数
半径: 整数
衰减: 数字
高度增量: 数字
笔刷形状: ScalarField2D.PaintbrushShapevoid RaiseLowerBrush(
ScalarField2D Scalar Field,
int centerX,
int centerY,
int radius,
double falloff,
double deltaHeight,
ScalarField2D.PaintbrushShape brushShape = PaintbrushShape.Circle)参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| 中心 X | 整数 | — | The x-coordinate of the brush center. |
| 中心 Y | 整数 | — | The y-coordinate of the brush center. |
| 半径 | 整数 | — | The radius of the brush. |
| 衰减 | 数字 | — | The fall-off parameter (0 to 1). |
| 高度增量 | 数字 | — | The amount to raise or lower the height. |
| 笔刷形状 | ScalarField2D.PaintbrushShape | 圆形 | The shape of the brush ("circle" or "rectangle"). |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 事件 例程 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
调整大小
函数重载 1/2
调整大小(Scalar Field: Scalar Field, 新宽度: 整数, 新高度: 整数)
void Resize(
ScalarField2D Scalar Field,
int newWidth,
int newHeight)Resizes the heightmap to the specified dimensions using nearest neighbor scaling.
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| 新宽度 | 整数 | — | The new width (number of columns). |
| 新高度 | 整数 | — | The new height (number of rows). |
重载 2/2
调整大小
Scalar Field: Scalar Field
新宽度: 整数
新高度: 整数
插值方式: ScalarField2D.HeightmapResizeInterpolation
保持海拔范围: 真否void Resize(
ScalarField2D Scalar Field,
int newWidth,
int newHeight,
ScalarField2D.HeightmapResizeInterpolation interpolation = HeightmapResizeInterpolation.Bilinear,
bool preserveElevationRange = false)Resizes the heightmap to the specified dimensions.
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| 新宽度 | 整数 | — | The new width (number of columns). |
| 新高度 | 整数 | — | The new height (number of rows). |
| 插值方式 | ScalarField2D.HeightmapResizeInterpolation | 双线性 | Interpolation method. |
| 保持海拔范围 | 真否 | False | Prescales result so original min/max elevation remains unchanged. Only neeed as a post to ensure exact min/max elevations, otherwise matters not. |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 事件 例程 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
逆时针旋转
函数Rotates the heightmap data 90 degrees counterclockwise.
逆时针旋转(Scalar Field: Scalar Field)
void RotateCCW(ScalarField2D Scalar Field)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 事件 例程 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
顺时针旋转
函数Rotates the heightmap data 90 degrees clockwise.
顺时针旋转(Scalar Field: Scalar Field)
void RotateCW(ScalarField2D Scalar Field)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 事件 例程 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
双线性采样(限制边界)
函数Bilinearly samples the field using grid coordinates and clamps samples at the outer border.
双线性采样(限制边界) -> 数字
Scalar Field: Scalar Field
X: 数字
Y: 数字double SampleBilinearClamped(
ScalarField2D Scalar Field,
double x,
double y)参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| X | 数字 | — | |
| Y | 数字 | — |
返回
| 结果 | 数字 |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 事件 例程 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
世界坐标双线性采样(限制边界)
函数Bilinearly samples the field using physical world coordinates.
Cell values are treated as samples located at cell centres.
世界坐标双线性采样(限制边界) -> 数字
Scalar Field: Scalar Field
世界 X: 数字
世界 Y: 数字double SampleWorldBilinearClamped(
ScalarField2D Scalar Field,
double worldX,
double worldY)参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| 世界 X | 数字 | — | |
| 世界 Y | 数字 | — |
返回
| 结果 | 数字 |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 事件 例程 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
缩放高度
函数Scales the heightmap vertically by the specified factor.
缩放高度(Scalar Field: Scalar Field, 缩放: 数字)
void ScaleHeights(ScalarField2D Scalar Field, double scale)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| 缩放 | 数字 | — | The scale factor to apply. |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 事件 例程 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
设置值
函数Sets the height value at the specified (x, y) coordinate.
设置值(Scalar Field: Scalar Field, X: 整数, Y: 整数, 值: 数字)
void SetValue(
ScalarField2D Scalar Field,
int x,
int y,
double value)参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| X | 整数 | — | The x-coordinate (column index). |
| Y | 整数 | — | The y-coordinate (row index). |
| 值 | 数字 | — | The height value to set. |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 事件 例程 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
平滑
函数Smooths the heightmap using a simple averaging filter.
平滑(Scalar Field: Scalar Field)
void Smooth(ScalarField2D Scalar Field)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 事件 例程 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
平滑笔刷
函数Applies a smoothing operation within a brush area.
平滑笔刷
Scalar Field: Scalar Field
中心 X: 整数
中心 Y: 整数
半径: 整数
衰减: 数字
笔刷形状: ScalarField2D.PaintbrushShapevoid SmoothBrush(
ScalarField2D Scalar Field,
int centerX,
int centerY,
int radius,
double falloff,
ScalarField2D.PaintbrushShape brushShape = PaintbrushShape.Circle)参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| 中心 X | 整数 | — | The x-coordinate of the brush center. |
| 中心 Y | 整数 | — | The y-coordinate of the brush center. |
| 半径 | 整数 | — | The radius of the brush. |
| 衰减 | 数字 | — | The fall-off parameter (0 to 1). |
| 笔刷形状 | ScalarField2D.PaintbrushShape | 圆形 | The shape of the brush ("Circle" or "Rectangle"). |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 事件 例程 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
细分
函数Subdivides each heightmap cell into a finer grid while preserving the overall physical dimensions.
细分
Scalar Field: Scalar Field
系数: 整数
插值方式: ScalarField2D.HeightmapResizeInterpolation
保持海拔范围: 真否void Subdivide(
ScalarField2D Scalar Field,
int factor = 2,
ScalarField2D.HeightmapResizeInterpolation interpolation = HeightmapResizeInterpolation.Bilinear,
bool preserveElevationRange = false)参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| 系数 | 整数 | 2 | Number of cells created along each axis for every existing cell. Must be greater than or equal to 1. |
| 插值方式 | ScalarField2D.HeightmapResizeInterpolation | 双线性 | Interpolation method used to generate the additional samples. |
| 保持海拔范围 | 真否 | False | Rescales the result so the original minimum and maximum elevations remain unchanged. |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 事件 例程 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
汇总
函数Returns a technical summary of the heightmap, one parameter per line.
汇总(Scalar Field: Scalar Field) -> 文本
string Summarize(ScalarField2D Scalar Field)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
返回
| 结果 | 文本 |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
转为平铺数组
函数Flattened array.
转为平铺数组(Scalar Field: Scalar Field) -> 数字数组
double[] ToFlattenArray(ScalarField2D Scalar Field)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
返回
| 结果 | 数字数组 |
备注
Used for high-performance purposes.
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 事件 例程 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
转为平铺数组(低精度)
函数Flattened array.
转为平铺数组(低精度)(Scalar Field: Scalar Field) -> 低精度数字数组
float[] ToFlattenArrayLD(ScalarField2D Scalar Field)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
返回
| 结果 | 低精度数字数组 |
备注
Used for high-performance purposes.
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 事件 例程 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
转为像素图像
函数此节点没有文档说明。
转为像素图像(Scalar Field: Scalar Field) -> Pixel Image
PixelImage ToPixelImage(ScalarField2D Scalar Field)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — |
返回
| 结果 | Pixel Image |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 事件 例程 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
作为颜色数据修改
函数此节点没有文档说明。
作为颜色数据修改
Scalar Field: Scalar Field
更新函数: Func<颜色数组数组, 颜色数组数组>void UpdateColorData(
ScalarField2D Scalar Field,
Func<ColorElement[][], ColorElement[][]> updater)参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Scalar Field | Scalar Field | — | |
| 更新函数 | Func<颜色数组数组, 颜色数组数组> | — |
备注
Converts the current heightmap into a grayscale image, lets caller-provided code modify that image, then writes the modified grayscale values back into the heightmap as heights.
Per IPixelImageSampler.UpdateColorData.
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 事件 例程 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
创建派生图
函数此节点没有文档说明。
创建派生图(源: Scalar Field, 用途: 文本) -> Scalar Field
ScalarField2D CreateDerivedMap(
ScalarField2D source,
string usage)参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| 源 | Scalar Field | — | |
| 用途 | 文本 | — |
返回
| 结果 | Scalar Field |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
从数组创建
函数此节点没有文档说明。
从数组创建 -> Scalar Field
初始数据: 低精度数字数组数组
用途: 文本
物理比例: 数字ScalarField2D FromArrays(
float[][] initialData,
string usage = "Height",
double physicalScale = 1)参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| 初始数据 | 低精度数字数组数组 | — | |
| 用途 | 文本 | Height | |
| 物理比例 | 数字 | 1 |
返回
| 结果 | Scalar Field |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
生成生物群系纹理
函数此节点没有文档说明。
生成生物群系纹理(高度图: Scalar Field) -> Pixel Image
PixelImage GenerateBiomeTexture(ScalarField2D heightmap)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| 高度图 | Scalar Field | — |
返回
| 结果 | Pixel Image |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
生成生物群系渐变纹理
函数此节点没有文档说明。
生成生物群系渐变纹理(高度图: Scalar Field) -> Pixel Image
PixelImage GenerateBiomeTextureGradient(ScalarField2D heightmap)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| 高度图 | Scalar Field | — |
返回
| 结果 | Pixel Image |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
获取坡度图用途标记
函数Returns the canonical usage/term string for a slope map type.
获取坡度图用途标记(坡度图类型: Slope Map Type) -> 文本
string GetSlopeMapUsageToken(ScalarField2D.SlopeMapType slopeMapType)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| 坡度图类型 | Slope Map Type | — |
返回
| 结果 | 文本 |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
转为灰度像素图像
函数此节点没有文档说明。
转为灰度像素图像(高度图: Scalar Field) -> Pixel Image
PixelImage ToGrayscalePixelImage(ScalarField2D heightmap)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| 高度图 | Scalar Field | — |
返回
| 结果 | Pixel Image |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成
验证物理比例
函数此节点没有文档说明。
验证物理比例(源: Scalar Field, 使用物理比例: 真否)
void ValidatePhysicalScale(
ScalarField2D source,
bool usePhysicalScale)参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| 源 | Scalar Field | — | |
| 使用物理比例 | 真否 | — |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 标量场
- 所属包
- 程序化生成