Orrery Terrain · OrreryTerrainEditor module · class
UOrreryTerrainFeatureToolBase
Editor onlyWhat the feature tools share: clicks and hovers on the analytic ground (RaycastGround), the HUD, and committing or removing a feature as one editor transaction (AppendChange of an FOrreryTerrainFeatureChange on the terrain actor, never EmitObjectChange, so the edit outlives the tool).
Declaration
UCLASS(Abstract)
class UOrreryTerrainFeatureToolBase : public UInteractiveTool, public IClickBehaviorTarget, public IHoverBehaviorTarget- Header
#include "Tools/OrreryTerrainFeatureTools.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.
- Derives from
UInteractiveTool,IClickBehaviorTarget,IHoverBehaviorTarget
Description
Features are owned by the editor (kOwnerDomainTerrainEditor), so the authoring layer keeps them and the editor session admits them.
A commit whose ground is still loading waits: the tool holds an FOrreryTerrainFeaturePlacement, as the editor library does, steps it from its tick and appends the transaction when it lands. Meanwhile the HUD says so in red, a second commit and new clicks are refused, and Esc (or leaving the tool) cancels it with nothing changed.
Game thread, editor only. Tier 3.
Functions
- Init
- Setup
- Shutdown
- OnTick
- DrawHUD
- IsPlacing
Whether a commit waits for its ground; the tool's tick steps it.
- CancelPlacement
Drop the commit that waits for its ground (Esc).
- IsHitByClick
- OnClicked
- BeginHoverSequenceHitTest
- OnBeginHover
- OnUpdateHover
- OnEndHover
- OnUpdateModifierState
- ClickAt
A click at Location_cm (world cm; Z ignored, the ground's height is taken), as the mouse gives one: for tests and captures.
- GetHudLines
The HUD's lines as drawn this frame.
- GetLastRefusal
Why the last commit, edit or removal was refused; empty after one that went through.
- GetLastDone
What the last commit, edit or cancel did, as the HUD says it; empty when nothing was done yet.
- GetTerrain
The terrain this tool edits, or null.
- OnGroundClickedprotected
A click on the ground at Hit (world cm).
- HitGroundprotected
- GroundUnderprotected
- CommitAsTransactionprotected
Commit Feature (Id 0 adds, else replaces in place) and append its transaction, now if its ground is loaded, else once it is (IsPlacing).
- OnFeatureCommittedprotected
A commit of this tool landed as feature Id: at once, or from the tick after its ground loaded.
- OnFeatureRemovedprotected
A removal of this tool landed as feature Id: at once, or from the tick after its ground loaded.
- AppendPlacingLineprotected
Add the red HUD line of a commit that waits for its ground.
- RemoveAsTransactionprotected
Remove a feature and append its transaction, now if the ground under it is loaded, else once it is (IsPlacing).
- CoverWithInvokerprotected
Keep the mode's invoker over Bounds (world cm), so the ground there is resident for previews and commits.
- DrawPolylinestaticprotected
Draw a polyline (world cm), depth tested plus a faint pass through the ground.
- AppendEarthworksLinesstaticprotected
The earthworks lines of a preview: volumes and footprint, or why it was refused.
- PreviewColorprotected
Properties
| Name | Type | Default | Meaning |
|---|---|---|---|
k | uint64 | 1 | The owner id within kOwnerDomainTerrainEditor that the editor's features carry. |
World | TWeak | — | — |
Mode | TWeak | — | — |
Cursor_ | FVector | FVector:: | — |
b | bool | false | — |
Last | FString | — | — |
Last | FString | — | — |