Skip to content
Brass Orrery

Orrery Terrain · OrreryTerrain module · function

BrushBake::

FromPixels

Bake raw single-channel pixels from game code.

Declaration

EOrreryTerrainBrushBake FromPixels(const uint8* Bytes, int64 Count, int32 Width, int32 Height, bool b16Bit, 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.

Parameters

NameTypeDefaultMeaning
Bytesconst uint8*—

Width x Height samples, row-major: 1 byte each, or 2 little-endian bytes each when b16Bit.

Countint64—

Bytes in the array; must be exactly Width x Height x (1 or 2).

Widthint32—

Samples a row.

Heightint32—

Rows.

b16Bitbool—

Samples are 2 little-endian bytes instead of 1.

Specconst FBakeSpec&—

The bake settings; the channel is ignored.

OutMaskstd::shared_ptr<const OrreryTerrain::Native::FBrushMask>&—

The mask on Ok.

Returns

Ok, BadPixels, BadSize or Refused.

Note.

Any thread.