Skip to content
Brass Orrery

Orrery Terrain · OrreryTerrainEditor module · struct

FOrreryTerrainStampMesh

Editor only

One build of a stamp's preview: the post-aligned grid of StampPreviewPostGridWithin, its ground, the stamp's result there (EvaluateStampPreviewPosts: on every vertex the millimetres the stamp writes to that post), the mesh drawn from it, and the wire ghost from the same ground snapshot.

Declaration

struct FOrreryTerrainStampMesh
Header
#include "Tools/OrreryTerrainStampPreviewMesh.h"
Module
PublicDependencyModuleNames.Add("OrreryTerrainEditor"); in an editor module’s Build.cs: an editor module, not in packaged games.
Stability
Stable: changes within a major version only add.
Thread
Any thread once published.

Description

Immutable once built; the game thread and the render thread share it.

Vertex (I, J) lies at Origin_cm + (I, J) × Spacing_cm, its Z the result relative to Origin_cm.Z. Triangles (Indices) cover the cells where the stamp changes the ground; they are tinted cyan where it raises and orange where it cuts, lit through the result's normals, and fade out where the change is under a few decimetres, so unchanged ground is not covered. The cells with a vertex the stamp cuts (Cut) are listed again in CutIndices: the component draws them a second time through the ground (kCutMaterialPath), where the first pass is hidden. A wire-only build (no points to spare, or the mesh hidden after a click) has Width 0 and a Wire.

Note.

Any thread once published. Tier 3.

Functions

Properties

NameTypeDefaultMeaning
Serialuint640

The request this answers (FOrreryTerrainStampPreview counts them from 1).

Revisionuint640

The ground snapshot's revision.

Widthint320

Vertices per row; 0 when the stamp has no grid.

Heightint320

Rows of vertices.

Strideint320

Edit posts between vertices, a power of two (1 at the edit cell).

Cell_mmint640

The terrain's edit cell.

OriginPostXint640

Post index of vertex column 0.

OriginPostYint640

Post index of vertex row 0.

Spacing_cmdouble0.0

World cm between vertices.

Origin_cmFVectorFVector::ZeroVector

World position of vertex (0, 0) at the stamp's base height.

PositionsTArray<FVector3f>—

Width × Height, row-major (J the row), cm relative to Origin_cm.

NormalsTArray<FVector3f>—

The result's normals, per vertex.

GpuTSharedPtr<const FOrreryTerrainStampMeshGpu>—

The tangent basis, packed on the worker; the render thread copies it whole.

ColorsTArray<FColor>—

The tint, alpha the opacity; linear.

Ground_mmTArray<int32>—

The sampled ground per vertex (the stamp's base where there is none).

Result_mmTArray<int32>—

The stamp's result per vertex, the kernel's millimetres.

InsideTArray<uint8>—

1 where the stamp writes and the terrain has ground.

CutTArray<uint8>—

1 where the vertex is inside and the result lies below the ground (MarkStampPreviewCuts).

IndicesTArray<uint32>—

Triangle list over the cells the stamp changes.

CutIndicesTArray<uint32>—

Triangle list over those of them with a vertex in Cut: drawn again through the ground.

LocalBoundsFBox3fFBox3f(ForceInit)

Bounds of every vertex, relative to Origin_cm.

InsideCountint320

Vertices inside.

CutCountint320

Vertices in Cut.

bLoadedboolfalse

Every vertex's ground answered Exact.

BuildMsdouble0.0

Worker milliseconds: sampling, evaluation and the mesh, the wire included.

WireTSharedPtr<const FOrreryTerrainStampWire>—

The wire ghost over the same snapshot; null when the stamp has no preview.