Orrery Terrain · OrreryTerrain module · function
BrushBake::
FromPlane
Bake one 16-bit plane: resample to the spec's side, invert, quantise to its depth and make the mask.
Declaration
EOrreryTerrainBrushBake FromPlane(const uint16* Plane, int32 Width, int32 Height, const FBakeSpec& Spec,
std::shared_ptr<const OrreryTerrain::Native::FBrushMask>& OutMask);- Header
#include "OrreryTerrainBrushAsset.h"- Module
PublicDependencyModuleNames.Add("OrreryTerrain");in your module’s Build.cs.- Stability
- Stable: changes within a major version only add.
- Thread
- Any thread.
Description
The resample is integer only (a box filter down, bilinear up, each pass rounded once), so the same plane and spec give the same bytes and the same hash on every machine. The hash covers the baked bytes only; the source is never part of it.
Parameters
| Name | Type | Default | Meaning |
|---|---|---|---|
Plane | const uint16* | — | Width x Height unorm samples, row-major, 0 to 65535. |
Width | int32 | — | Samples a row of Plane. |
Height | int32 | — | Rows of Plane. |
Spec | const FBake | — | The bake settings; the channel is ignored. |
OutMask | std:: | — | The mask on Ok. |
Returns
Ok, BadSize or Refused.
Note.
Any thread.