Skip to content
Brass Orrery

Orrery Terrain · OrreryTerrainEditor module · class

FOrreryTerrainStampHold

Editor only

Apply one height stamp when the terrain can take all of it, without blocking, as exactly one undo record.

Declaration

class FOrreryTerrainStampHold
Header
#include "Tools/OrreryTerrainStampHold.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
Game thread, editor only.

Description

A stamp reaches up to 2 km across, past any cover the brush cursor keeps loaded, so Begin holds its own transient invoker over the stamp's extent (BrushExtent: the disc, or the mask's rotated square) plus a margin. Each Step checks that the terrain accepts edits and that every base under the extent is resident (FTerrainWorld::IsBrushGroundReady of the stamp itself); then it opens a stroke, applies the stamp, closes the stroke with its patches and wraps them, with the editor follow, in one FOrreryTerrainStrokeChange. A stamp the terrain answers Pending in between (a base dropped) is retried at the next Step, never applied twice. Waiting past kGroundWait_s, a terrain re-created or removed, or a refusal ends it.

The caller appends the change (the tools context's AppendChange) from a tick or a click: never from a transaction handler, which must not open a transaction.

Note.

Game thread, editor only. Tier 3.

Functions

  • FOrreryTerrainStampHold (2 overloads)
  • operator=
  • Begin

    Begin stamping Stamp on Terrain and try at once.

  • Step

    Check again and stamp when the ground is ready.

  • SetExtensionTargets

    Registry ids of extension brush targets (V1 or V2) the next Begin also stamps.

  • TakeExtensionChanges

    The undo records of the extension targets the applied stamp drove, once.

  • Cancel

    Drop a pending stamp and release its invoker.

  • Reset

    Back to Idle once the result has been read (a pending stamp is cancelled).

  • GetState
  • IsPending
  • GetRefusal

    Why it was refused; empty unless Refused.

  • GetWaited_s

    Seconds since Begin.

  • GetTries

    Strokes opened for this stamp: 1 when the ground was ready at once; more only when a try found the ground Pending.

  • GetLabel
  • GetStamp
  • TakeChange

    The undo record of the applied stamp, the follow's wrapped in; null unless Applied with a change, and after it was taken once.

  • FootprintOfstatic

    The world box a stamp covers on Terrain (BrushExtent through the terrain's frame), cm, Z 0.

Properties

NameTypeDefaultMeaning
kGroundWait_sdouble60.0

Seconds a stamp waits for its ground before it is refused.

kInvokerMargin_mdouble64.0

Metres the hold's invoker reaches past the stamp's extent grown by one base tile.

The step's window runs to whole edit tiles and the base tiles that share their edge posts, up to one base tile past the extent, and the streamer loads a tile whose nearest point lies within the radius.