Skip to content
Brass Orrery

Orrery Terrain · OrreryTerrainEditor module · class

FOrreryTerrainSculptHeightTarget

Editor only

Edits the sculpt layer (heights, paint layers, the ground class and holes) through the subsystem's stroke calls, under the editor session.

Declaration

class FOrreryTerrainSculptHeightTarget : public IOrreryTerrainBrushTarget
Header
#include "Tools/OrreryTerrainSculptTarget.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

One class for every built-in brush target, so every editor stroke takes one path: GetId names the target its settings make (SculptHeight, PaintLayer or GroundClass). A paint stroke's undo record is the same exact patch, since the sculpt tiles carry the channels.

A stroke is BeginStroke (refused unless the ground under the whole first ring is loaded), dabs in order, and EndStroke, which returns the stroke's undo record: FOrreryTerrainStrokeChange, the exact before and after tiles.

Cold ground. A dab whose ground is still loading (the subsystem answers Pending) is queued, never dropped: the queue keeps dabs in order and Pump retries the oldest until it applies, so a stroke over cold ground ends in the same ground as one over resident ground. The brush tool keeps a released stroke open until the queue drains (at most kCloseTimeout_s); only a forced close (a tool switch, Ctrl+Z during a drag, the terrain going away) gives the waiting dabs up, with a warning.

Note.

Game thread, editor only. Tier 3.

Functions

  • Configure

    Set what the next dabs apply; takes effect from the next dab.

  • GetSettings
  • MakeBrushstatic

    The subsystem brush one dab becomes under Settings: the exact brush a test applies through the API to compare.

  • DabMaskAnglestatic

    The mask angle of one dab of a stroke, degrees: UOrreryTerrainSculptComponent::ResolveMaskAngle under Settings, the runtime component's own rule, so an editor stroke turns its dabs as a player's does.

  • CheckGroundstatic

    Sample the ground at Centre and RingSamples points on the circle of Radius_cm (world cm).

  • FindTerrainstatic

    The world's terrain subsystem when it has a terrain, else null.

  • GetId

    TargetId, PaintLayerTargetId or GroundClassTargetId, by the configured kind.

  • CanEdit

    Whether the target can be edited in World now; OutWhyNot says why not when it cannot.

  • BeginStroke

    Opens a stroke with its first dab; false refuses it.

  • ApplyDabs

    Applies dabs of the open stroke, in order.

  • EndStroke

    Closes the stroke and returns its undo record (null when nothing changed).

  • CancelStroke

    Abandons the open stroke and restores the ground.

  • TakeExtensionChanges

    The undo records of the extension targets the last ended stroke drove, once; the tool appends them beside the stroke's own.

  • Pump

    Retry the queued dabs in order; stops at the first whose ground is still loading.

  • IsStrokeOpen
  • GetQueuedDabs
  • IsWaitingForGround
  • GetLastRefusal

    Why the last BeginStroke was refused; empty after one that opened.

  • GetAppliedDabs

    Dabs of the open (or last) stroke that changed or kept the ground, that waited at least once, and that were given up.

  • GetWaitedDabs
  • GetAbandonedDabs
  • GetRefusedDabs

    Dabs of the open (or last) stroke that the session's limits refused (a hole while holes are off, for one).

  • GetLastRaised_m3

    What the last ended stroke moved, m3.

  • GetLastLowered_m3

Properties

NameTypeDefaultMeaning
TargetIdconst FName—

The registry ids of the built-in targets: heights, paint layers, and the ground class (holes included).

PaintLayerTargetIdconst FName——
GroundClassTargetIdconst FName——
kCloseTimeout_sdouble10.0

Seconds a released stroke waits for its queued dabs before it closes without them.

kRingSamplesint3264

Ring samples of the stroke-start check.