Orrery Terrain · OrreryTerrainCore · namespace
OrreryTerrain::
Native
Declared in OrreryTerrainCore. Its members are listed below, by kind.
Types
- EBrushMaskRefusal enumExperimental
Why bytes or samples were refused as a brush mask.
- EBrushMaskAdd enumExperimental
How
FBrushMaskRegistry::Addended. - EBrushMaskRemove enumExperimental
How
FBrushMaskRegistry::Removeended. - EStructureAdvice enum
What the ground under a station suggests building, before the owner's own thresholds.
- EWallKind enum
Why a formation edge holds a vertical step: a retaining wall the terrain reports.
- EFollowMode enum
What a followed type does when the ground under it changes.
- EFollowStatus enum
How an instance's registration or evaluation ended.
- EGroundChangeWhat enum
What a journal entry may have changed (
FGroundChange::What), as bits: a may-have-changed set, so a reader that caches one kind of data skips the entries without its bit. - EGroundAccuracy enum
How exact a sampler request must be.
- EJoinCacheUse enumExperimental
How a join stream uses the save a joiner kept from an earlier join (
FJoinStreamConfig::JoinerSaveHash). - EJoinWrite enumExperimental
How a join writer stands.
- EJoinStreamError enumExperimental
Why a join reader stopped.
- EJoinCacheOpen enumExperimental
Why
FJoinCache::Openrefused a save. - EJoinCacheFill enumExperimental
How
FJoinStreamReader::FillFromCacheended. - EJoinLoad enumExperimental
How LoadJoin ended.
- ETerrainNetRecordKind enumExperimental
What a net record carries.
- ENetDecode enumExperimental
Why bytes were refused as a net record, a payload or a batch.
- EFeatureWireOpKind enumExperimental
What one feature-stack op does, as FTerrainWorld's commit funnel applied it.
- ENetResetReason enumExperimental
Why the authority reset its replicas.
- ENetBrushMaskCodec enumExperimental
How a BrushMask payload codes its mask's canonical bytes.
- ENetVersionMismatch enumExperimental
Which version two peers disagree on, checked in this order.
- ERepairBuild enumExperimental
How
FTerrainRepairSource::Buildended. - EReplicaEnqueue enumExperimental
How
FTerrainReplica::Enqueueended. - EReplicaFault enumExperimental
Why a replica stopped applying records.
- EReplicaRepair enumExperimental
How
FTerrainReplica::Repairor Resync ended. - ESculptRecordKind enumExperimental
What a sculpt record carries.
- ESculptRefusal enumExperimental
Why a sculpt record is refused before it touches the ground.
- ESculptApply enumExperimental
What applying one sculpt record, or one brush step, did.
- ETerrainCost enum
The parts of the terrain's CPU time, one counter each.
- EStageResult enum
Outcome of staging one edit into a transaction.
- EBrushKind enum
What a sculpt brush does.
- EStampBlend enum
How a Stamp's target meets the ground (
EBrushKind::Stamp). - EFalloff enum
Brush falloff.
- EFlattenDirection enum
Which way a Flatten brush may move the ground.
- EFeatureKind enum
Which payload a feature carries.
- EScatterScaling enumExperimental
How a variety's three scales relate (ULandscapeGrassType's EGrassScaling).
- EScatterFootprintKind enumExperimental
What a keep-clear footprint is (from FGroundQuery::FeaturesIn, or a buyer's shape).
- ESurface enum
Which ground a query reads.
- EPrecision enum
How exact a query answer is.
- EChangeCause enum
Why the ground changed, as reported to listeners and in the change journal (
FGroundChange::Cause).
Functions
- BrushMaskRotationExperimental
Cos and sin of an angle in 1/65536 of a turn (
FBrush::MaskAngle), by an integer CORDIC (Volder 1959). - PrepareBrushMaskDabExperimental
Prepare one dab of Brush over Mask: its rotation (BrushMaskRotation), mirror, half-sides (BrushMaskHalfSides), level (
FBrushMask::LevelForwith the longer half-side) and scales. - SampleBrushMaskExperimental
M at a local position (
FBrushMaskDab::Local), in Q16 from 0 to kBrushMaskOne: the one sampler entry point, which dispatches on the dab's flags. - SampleBrushMaskRowExperimental
Sample one row of posts: post i lies at offset (Dx_mm + i × Step_mm, Dy_mm) from the brush centre.
- FollowTileKey (2 overloads)
The edit tile key (Y high, X low) of a world position, metres; tiles beyond +-16384 saturate.
- FollowTileCoord
The tile coordinate a key stands for (the inverse of FollowTileKey, for keys that did not saturate).
- PointInFeatureFootprint
Whether a point stands in a feature's footprint (plus a margin): a plate's polygon, or a corridor's or channel's formation band (the wider half width at each station, interpolated along the segment).
- RegisterFollow
Register Count instances: their reference offsets and whether each stands cleared already.
- EvaluateFollow
Evaluate Count tracked instances against a snapshot.
- NormalTurn
The rotation that takes the unit normal From to the unit normal To, its angle clamped.
- operator|
The union of two sets of bits.
- operator&
The bits two sets share.
- HasAny
Whether Bits holds any of Test's bits.
- FarLevelBit
The bit of far level Level in
FGroundChange::Levels; levels 15 and deeper share bit 15. - DecodePaint (2 overloads)
The weights of one canonical post (FPaintSlots): its used pairs, zero weights dropped.
- SampleGround
Sample many positions on one snapshot.
- GradeAlong
Rise over run of the ground along a horizontal direction, a central difference one edit cell either side of the point.
- LoadJoinExperimental
Load the joiner's world from the stream's save at S (FTerrainSerialization::LoadFromFile: paged when the world has a page store, so codes still on their way stay cold), check StateHash and SyncHash against the head, hold the save's next feature id to the head's, then set the record position to S.
- StartJoinReplicaExperimental
LoadJoin, then a replica that expects S + 1 with the head's digest, which continues the head's open strokes (
FTerrainReplica::ResumeStrokes). - JoinReceiveResidentBytesExperimental
The heap every joiner's save file holds in this process, bytes: the runs in memory and their index, as
FJoinStreamReader::ResidentBytescounts them, for as long as the file lives (the world loaded from it keeps it). - IsKnownNetRecordKindExperimental
Whether this version knows a kind as a record of the authority's stream.
- IsRequestNetRecordKindExperimental
Whether a client's request batch may carry a kind: every known record kind, and MaskUpload.
- IsSequencedNetRecordExperimental
Whether a kind takes a sequence number.
- IsBrushMaskCanonicalSizeExperimental
Whether Bytes is the canonical size of some brush mask: kBrushMaskHeaderBytes + Side² × Bits / 8 for a legal side and bits.
- EncodeBrushMaskRecordExperimental
Append the full BrushMask payload of Mask: its hash, its canonical size, then the smaller of the two codecs.
- EncodeBrushMaskHashOnlyExperimental
Append the hash-only BrushMask payload (kNetBrushMaskHashOnlyBytes) of the mask named Hash, CanonicalBytes long.
- DecodeBrushMaskRecordExperimental
Read a BrushMask payload, all of Size.
- PeekBrushMaskRecordExperimental
The hash and canonical size a BrushMask payload starts with, unchecked.
- EncodeMaskUploadExperimental
Append a MaskUpload payload: the header and Part's chunk.
- DecodeMaskUploadExperimental
Read a MaskUpload payload, all of Size.
- CheckNetPayloadExperimental
Check a payload against its kind, touching nothing.
- CheckNetRequestPayloadExperimental
Check a request's payload against its kind: as CheckNetPayload, and a MaskUpload as DecodeMaskUpload checks it.
- EncodeNetRecordExperimental
Append one record in its canonical, unbatched form: U16 kTerrainNetVersion, U8 kind, U64 seq, U32 author, U32 payload size, then the payload.
- DecodeNetRecordExperimental
Read one record written by EncodeNetRecord, all of Size and nothing more.
- EncodeFeatureOpsExperimental
Append a FeatureOps payload.
- DecodeFeatureOpsExperimental
Read a FeatureOps payload, all of Size.
- EncodeCheckpointExperimental
Append a Checkpoint payload, kNetCheckpointBytes; Checkpoint.Seq travels in the envelope.
- DecodeCheckpointExperimental
Read a Checkpoint payload of the record at Seq.
- EncodeResetExperimental
Append a Reset payload, kNetResetBytes.
- DecodeResetExperimental
Read a Reset payload.
- EncodeRepairExperimental
Append a Repair payload.
- DecodeRepairExperimental
Read a Repair payload, all of Size.
- LocalNetVersionsExperimental
This build's versions.
- CheckNetVersionsExperimental
Compare a peer's versions with this build's, as the Hello does; any mismatch is refused (VersionMismatch).
- EncodeRepairLeavesExperimental
Append the leaves message.
- DecodeRepairLeavesExperimental
Read a leaves message, all of Size: leaves strictly in tree order, each with a tile.
- EncodeRepairRequestExperimental
Append the request message.
- DecodeRepairRequestExperimental
Read a request, all of Size: chunks strictly in tree order, tiles strictly row then column, at most 1,024 a chunk.
- BuildRepairRequestExperimental
Compare the server's leaves with World's SyncHash tree and list the client's tiles in every chunk that differs (by count or sum, or present on one side only), and whether the stack differs.
- FeatureOpsOfExperimental
The FeatureOps record of one stack change, as the authority's commit listener hands it out (FTerrainWorld::SetCommitListener): each op with its id, anchor and feature bytes (EncodeFeature), and the next feature id.
- IsPaintOnlyChannelExperimental
Whether a PaintChannel brush may never write Channel: the paint slot planes and the reserved id after them (16-31), and the retired v4 paint (
Channels::PaintLayer, PaintWeight). - CheckSculptCommandExperimental
Check a command against the record format and the limits, touching nothing.
- EncodeSculptCommandExperimental
Write one command as kSculptCommandBytes little-endian bytes.
- DecodeSculptCommandExperimental
Read one command written by EncodeSculptCommand, of this version or an older one it still reads.
- EncodeSculptPatchExperimental
Append a patch's bytes (version, kind, stroke, tile bytes) to Out.
- DecodeSculptPatchExperimental
Read a patch written by EncodeSculptPatch.
- PeekSculptRecordKindExperimental
The kind of an encoded record, from its first three bytes, so a receiver can dispatch.
- SculptCommandDigestExperimental
Fold one command into a running digest: authority and replica compare it to find the first command they disagree on, before StateHash differs.
- PaintSlotLayerChannel
The channel id of slot Slot's layer plane.
- PaintSlotWeightChannel
The channel id of slot Slot's weight plane.
- IsPaintPlaneChannel
Whether Id is one of the paint slot planes (16-30).
- ChannelDefault
The value an unpainted cell of a channel reads as.
- FindChannel
The id of a named channel.
- SetTerrainCostCollecting
Start or stop collecting.
- AddTerrainCost
Add time to a counter.
- DrainTerrainCosts
Read every counter and reset it to zero.
- FalloffStartToQ16
A falloff start as a brush carries it: Start (a fraction of the radius) rounded to 1/65536.
- FalloffWeight
The brush strength factor at a normalised distance, in floating point.
- ScatterVarietySeedExperimental
The seed of one variety: 64-bit FNV-1a over the grass type's package path (UTF-8 bytes, no terminator) followed by the four little-endian bytes of the variety index.
- ScatterKeyExperimental
The key of candidate Index.
- ScatterSubCellQuadsExperimental
The quads of sub-cell (SubX, SubY), half-open: [OutQ0X, OutQ1X) × [OutQ0Y, OutQ1Y).
- ScatterCandidateCountExperimental
Candidates of one (sub-cell, variety): N = ceil(area m² × DensityPer100m2 / 100), at most 2^20.
- ScatterThinnedCountExperimental
The candidates density scaling leaves to be evaluated: ceil(Candidates × ThinScale) for Halton (a prefix, clamped to [0, Candidates]); every candidate for the grid, which thins per candidate instead (
FScatterSettings::ThinScale). - EffectiveLayerWeightsExperimental
The layer weights the material shows at one point (the material's MF_TerrainLayers formula, ported).
- AutoLayerWeightsExperimental
The auto rules alone: how a unit of layer-0 weight splits over the layers at world position (WorldXCm, WorldYCm).
- RasteriseKeepClearExperimental
Rasterise the footprints that touch sub-cell (SubX, SubY) into its keep-clear mask.
- ScatterSubCellExperimental
Place one (sub-cell, variety): every candidate in ascending Index, kept by holes, keep-clear, class, the slope and altitude bands, and W > Min && W <= Max && W >= u_keep.
- ScatterDiffSubCellsExperimental
The 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.
- ScatterSubCellsInRectExperimental
The sub-cells of a chunk that a world rectangle (cm, inclusive) touches: what a footprint or keep-clear change dirties.
- FourCC
Packs four characters into an owner domain, first character in the high byte (so 'RAIL' reads RAIL in a hex dump).
- Canonical
The surface a query actually reads: Top is Modified until an extension registers cover.
- ViewResidencyRadiusExperimental
The residency radius of a view at Height_m above the ground under it: the ground within Radius_m of the camera horizontally and within Reach_m of it in 3D, so a view keeps its near set until that ground is far enough away for the far field to stand in for it, and has none once it is higher than Reach_m.
Constants
| Name | Type | Default | Meaning |
|---|---|---|---|
kExperimental | uint32_ | 8 | The smallest side of a brush mask, in samples. |
kExperimental | uint32_ | 2048 | The largest side of a brush mask, in samples (a 16-bit mask of this side holds 8 MiB of samples). |
kExperimental | uint8_ | 1 | The canonical bytes' format version, written after the magic. |
kExperimental | size_ | 8 | Bytes of the canonical header: the magic 'TSBM', the format version (1 byte), the bits (1 byte) and the side (2 bytes, little-endian). |
kExperimental | int64_ | 65536 | A mask value of 1 (a white sample) in Q16: every sample becomes M in [0, kBrushMaskOne]. |
kExperimental | uint32_ | 1u < | The largest |
kExperimental | int32_ | 32 | The fixed-point shift of |
kExperimental | int32_ | 46 | The fixed-point shift of |
kExperimental | int32_ | -1 | What SampleBrushMaskRow writes for a post off the mask's rectangle (where |
kExperimental | uint64_ | uint64_ |
|
k | uint16_ | 0x | Every far level: |
k | size_ | 4096 | Entries the ground journal keeps: a reader more entries behind than this resets (FGroundQuery::ChangesSince). |
k | size_ | 1024 | Far entries (Levels != 0) FTerrainWorld::FarChanges keeps: a far reader more far entries behind than this resets. |
k | size_ | 64 | Far rectangles one publish adds at most; more changed tiles coalesce into bounding rectangles. |
kExperimental | uint32_ | 0x10000u | The field of a SyncHash leaf: a paint channel is its own A new authoritative field takes a new id, so it joins the checks without a format change. |
kExperimental | uint32_ | 16 | Stroke contexts a batch stream keeps: a switch back to one of these costs one byte. |
kExperimental | uint16_ | 6 | Version of the join stream's framing and head. A reader refuses any other: a head frame at another version is |
kExperimental | uint64_ | uint64_ | The most canonical brush mask bytes one join carries ( A writer whose masks hold more refuses the join ( |
kExperimental | uint32_ | 64u * 1024u | The most save bytes one frame carries; the transport cuts the stream wherever it likes (ClientJoinChunk, at most 32 KB). |
kExperimental | uint32_ | 16u < | The largest head a reader accepts, bytes. The open strokes' tiles are most of it, 14 bytes each, so it holds about 1.2 million stroke tiles. A writer whose head would be larger refuses the join ( |
kExperimental | uint32_ | 8u + 5u * uint32_ | The largest start chunk a reader accepts, bytes: its stroke and tile index, then the tile's kTilePosts² posts as zigzag varints of their residual from a plane through their neighbours. An int32 post's residual is under 2^33 in magnitude, so it takes at most 5 bytes and every start fits by construction. |
kExperimental | FTerrain | 0 | The author of the server's or the listen host's own edits. |
kExperimental | uint16_ | 6 | Version of the net record format: the envelope, the payloads below and the batch codec ( Bumped on any change of layout or meaning. The Hello compares it, kSculptRecordVersion and the save version (CheckNetVersions), so two builds that would code or apply a record differently never connect. Version 1: the first. Version 2: records unchanged, but a late join travels as the join stream ( |
kExperimental | size_ | size_ | The largest payload a record may carry, 64 MiB. A link further behind than |
kExperimental | size_ | 19 | Bytes of a record's envelope before its payload: version 2, kind 1, seq 8, author 4, payload size 4. |
kExperimental | size_ | 24 | Bytes of a Checkpoint payload. |
kExperimental | size_ | 16 | Bytes of a Reset payload. |
kExperimental | size_ | 12 | Bytes of a BrushMask payload that names its mask by hash only: U64 hash, U32 canonical size. |
kExperimental | size_ | 20 | Bytes of a MaskUpload payload before its chunk: U64 hash, U32 canonical size, U32 total, U32 offset. |
kExperimental | size_ | size_ | The most upload bytes one MaskUpload part carries, 16 KiB: half of the largest transport part (kTerrainNetMaxPartBytes, 32 KiB), so a request batch part holds a chunk and the brush steps beside it. |
kExperimental | uint16_ | 1 | Version of the repair messages (leaves and request). A decoder refuses any other (BadVersion). |
kExperimental | uint16_ | 5 | Version of the sculpt record format (commands and patches), written first on the wire. Bumped on any change of layout or meaning. A decoder refuses a version it does not know, so a replica of another build never applies a stroke differently. Older records back to kSculptRecordOldestVersion still decode: a decoder upgrades them to the current version with the newer fields at their defaults, and they replay as they did before. A version 3 record's paint steps run the list kernel, and a PaintChannel step on the retired paint channels (1, 2) is then refused (UnknownChannel). |
kExperimental | uint16_ | 2 | The oldest record version a decoder still reads; it upgrades it to kSculptRecordVersion. |
kExperimental | size_ | 72 | Bytes of one encoded Little-endian, every field always written. |
kExperimental | size_ | 56 | Bytes of a version 3 or 4 command: the first 53 of the version 5 layout, then 3 zero bytes. |
kExperimental | size_ | 48 | Bytes of a version 2 command: the first 48 of the version 3 layout. |
kExperimental | int64_ | int64_ | Largest |Brush.CentreX_mm| and |Brush.CentreY_mm| a record may carry: about 10^15 m, far beyond any terrain. |
k | int32_ | 8 | Ground classes a cell can carry: the rows of Class 0 is the default soil. |
k | uint8_ | 0x | Ground-class value that marks a hole: a cell under a mesh feature (portal, cut-and-cover), skipped by collision and navigation. Equal to the shell's kTerrainHoleClass. |
k | int32_ | 8 | Paint slots a post can hold in the format: the layer planes are ids 16-23 and the weight planes 24-30. |
k | int32_ | static_ | Number of counters, for arrays passed to DrainTerrainCosts. |
GTerrain | std:: | — | Nonzero while the counters collect. Written by SetTerrainCostCollecting; read by every scope. |
k | uint8_ | 1u < |
|
k | uint8_ | 1u < |
|
k | uint8_ | 1u < |
|
k | uint8_ | k | Every |
k | uint16_ | 256 |
|
k | uint32_ | 65536 |
|
k | uint32_ | 65536 |
|
k | uint16_ | 65535 | The largest falloff start a brush carries, 65535/65536 of the radius. |
k | size_ | 64 | Most openings one corridor may state (FTerrainWorld refuses more as InvalidFeature). |
k | size_ | 256 | Most points one opening's outline may hold. |
kExperimental | int32_ | 4 | Sub-cells per chunk side: a 128-post chunk (127 quads) splits into 4 × 4 sub-cells of 32 quads (the last 31). |
kExperimental | int32_ | 32 | Quads per sub-cell side (the last sub-cell of a row or column takes the remainder). |
kExperimental | int32_ | k | Sub-cells per chunk; a dirty set is a uint16_t with bit SubY * 4 + SubX. |
kExperimental | int32_ | k | Paint layer ids a post can name (8-bit ids, PaintSlots.h). |
kExperimental | int32_ | 5 | Auto rules the material evaluates (the material's AutoRule0..4). |
kExperimental | int32_ | 64 | Keep-clear mask cells per sub-cell side: 0.5 m at 1 m posts. |
kExperimental | double | 25.0 | Keep-clear distance unit, cm ( |
kExperimental | uint64_ | 0x1644 | The material formula EffectiveLayerWeights ports: 64-bit FNV-1a of the UTF-8 bytes of MF_TerrainLayers' Custom node code from the first "float W0 = 1.0;" to the end of the first "EW[0] = W0 * Rem;", carriage returns removed (the painted bilinear of slots 0-1, the two noise fields, the five auto rules and RockMask; chunks holding texture 2 redo the bilinear with slots 2-3 in one branch after the block, which this hash does not cover). Orrery.Terrain.Scatter.Weights.EffectiveParity recomputes it from the asset: when it fails, port the change into EffectiveLayerWeights and update this value. |
k | uint32_ | Four | The owner domains Orrery reserves ( Every one is a FourCC; 0 is no owner. A buyer's own code uses any other value, by convention its own FourCC, and never one of these. Rail earthworks (RailSim's kEarthOwnerDomain, the same value). |
k | uint32_ | Four | Features authored in the terrain editor mode. |
Type aliases
- FFarChange
FGroundChangeThe far journal's entry: the ground journal's entries with Levels != 0.
- FNetCursor
uint32_tA cursor of
FTerrainNetLog: one link or one open join. - FNetSeq
uint64_tA record's position in the authority's log (
FTerrainNetLog): 1 for the first record, 0 for none. - FTerrainAuthor
uint32_tWho authored a record: kTerrainServerAuthor for the server or host, then one id per connection, stable for the session.
- FHeightMm
int32_tA height in integer millimetres: the authoritative, serialised and hashed unit.
- FRevision
uint64_tMonotonic counter, bumped once per published change by FTerrainWorld only.
- FFeatureId
uint64_tIdentity of a feature in the stack.
- FStrokeId
uint64_tIdentity of a sculpt stroke, for the bounded undo ring.
- FGroundClass
uint8_tGround class of a cell (rock, soil, clay…).
- FChannelId
uint16_tIndex of a typed per-cell channel registered on the terrain (paint weights, zoning, soil…).