Orrery Terrain · OrreryTerrainCore module · function
Native::
ScatterDiffSubCells
ExperimentalThe sub-cells whose instances can differ between two revisions of one chunk: heights (with OriginZ), paint and class over each sub-cell's posts, one post wider for the post normals.
Declaration
uint16_t ScatterDiffSubCells(const FScatterPosts& Old, const FScatterPosts& New);- Header
#include "Native/TerrainScatter.h"- Module
PublicDependencyModuleNames.Add("OrreryTerrainCore");in your module’s Build.cs.- Stability
- Experimental: supported, may change in a minor version, with a changelog line.
- Thread
- Tier 1: plain C++, no allocation, deterministic in canonical order (ascending candidate index), any thread. (the header’s rule)
Description
Bit SubY * 4 + SubX.
Heights compare as OriginZ + H: a new datum under unchanged ground dirties nothing, so the shell keeps each clean component at the datum it was built with (an instance's Z is relative to it).
Parameters
| Name | Type | Default | Meaning |
|---|---|---|---|
Old | const FScatter | — | — |
New | const FScatter | — | — |
Returns
0xFFFF when the two are not the same tile or grid (or one has no heights); 0 for two empty chunks.