Skip to content
Brass Orrery

Orrery Terrain · OrreryTerrainCore module · function

Native::

SampleGround

Sample many positions on one snapshot.

Declaration

EPrecision SampleGround(const FGroundQuery& Query, const FGroundSampleRequest& Request, const FGroundSampleColumns& Out);
Header
#include "Native/GroundSampling.h"
Module
PublicDependencyModuleNames.Add("OrreryTerrainCore"); in your module’s Build.cs.
Stability
Stable: changes within a major version only add.
Thread
Any thread, lock-free.

Description

The normal and slope are the face normal of the triangle SampleCell uses (CellNormal), the one collision uses. Paint and ground class are read at the nearest post exactly as FGroundQuery::Channel answers. A sample whose requested paint or class is not resident (Pending there: paged out, or natural values whose base tile has left) is at best Approximate under Best, its heights kept, its paint the unpainted post and its class ChannelDefault; under ExactOnly it answers Pending. Coarse answers are Approximate already, their paint and class as Channel reads them. Coarse reads one pyramid tile per tile touched, sorted by tile, so a random batch pays one CopyFarTile per tile.

Parameters

NameTypeDefaultMeaning
Queryconst FGroundQuery&—

The snapshot to read; take it once per batch.

Requestconst FGroundSampleRequest&—

Positions, surface and accuracy.

Outconst FGroundSampleColumns&—

Columns to fill; at least one non-null.

Returns

The worst precision in the batch (NoData is worse than Approximate, Pending the worst); NoData for an empty request.

Note.

Any thread, lock-free. No allocation per sample; a per-thread scratch grows to the largest Coarse batch seen. Deterministic: the same snapshot and request give the same bytes. Experimental parts: SurfaceState and Coarse.