Skip to content
Orbdale

Orbdale Terrain · OrbdaleTerrainEditor module · class

UOrbdaleTerrainStampTool

Editor only

Places height stamps (EBrushKind::Stamp) of the brush mask picked in the palette.

Declaration

UCLASS()
class UOrbdaleTerrainStampTool : public UInteractiveTool, public IClickDragBehaviorTarget, public IHoverBehaviorTarget
Header
#include "Tools/OrbdaleTerrainStampTool.h"
Module
PublicDependencyModuleNames.Add("OrbdaleTerrainEditor"); 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.
Derives from
UInteractiveTool, IClickDragBehaviorTarget, IHoverBehaviorTarget

Description

A click places one stamp at the cursor with the settings' radius and the mask's angle; a click-drag past a few pixels puts the centre at the press and sets the radius to the drag's length and the angle to its direction, live, and the release places it; Esc during a drag restores both and places nothing, and Esc while a stamp waits for its ground drops it. Each stamp goes through FOrbdaleTerrainStampHold: it waits, without blocking, for editable ground under its whole extent and lands as one undo record (AppendChange from a click or a tick, never from a transaction handler).

Before the click the result shows twice, with the stamp's footprint and orientation: a shaded, translucent mesh at the edit cell, or every 2nd, 4th... post on a big stamp (the console variable Orbdale.Terrain.Stamp.PreviewPoints caps its vertices, 0 turns it off), and its contour, the 65 × 65 wire ghost (EvaluateStampPreview over the sampled ground). One worker build (FOrbdaleTerrainStampPreview) makes both over one ground snapshot when the stamp or the ground changes, so a drag shows them a build behind the cursor and the game thread only draws; the mesh is gone from the click until the stamp changes. What the stamp would cut below today's ground draws through it: the wire in red-orange, the mesh hatched. [ ] scale the radius, , . turn the mask by 15 degrees, Ctrl+wheel by 5. The mode routes the keys.

Note.

Game thread, editor only. Tier 3.

Types

  • EAction enum

    Action ids of the hotkeys (RegisterActions).

    RadiusDown, RadiusUp, AngleDown, AngleUp, AngleFineDown, AngleFineUp, CancelStamp

Functions

Properties

NameTypeDefaultMeaning
kDragPixelsfloat4.f

Screen pixels a press must move before it becomes a drag that sizes and turns the stamp.

kDragWorld_mdouble1.0

World metres a scripted drag must move before it sizes and turns the stamp.