Orrery Terrain · OrreryTerrainEditor module · class
FOrreryTerrainStrokeStepper
Editor onlyTurns a timeline of cursor positions into brush step positions.
Declaration
class FOrreryTerrainStrokeStepper- Header
#include "Tools/OrreryTerrainStrokeStepper.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 (it holds no shared state; one stepper per tool).
Description
Continuous: Begin is the first step; each Tick adds DeltaSeconds to a debt and takes a step at the current cursor per period owed (the cursor off the ground clears the debt); End takes one last step when time is owed. These are the rules of UOrreryTerrainSculptComponent, so an editor stroke and a runtime stroke of the same input give the same commands. Spacing: a step every Spacing x Radius of cursor travel in XY, placed along the path; Tick and End hand them out.
Plain C++ state, no UObject. Positions are world cm; Z is the ground under the cursor and is kept.
Game thread (it holds no shared state; one stepper per tool).
Functions
- Begin
Start a stroke at Cursor, which is its first step.
- SetCursor
The cursor hit the ground at Cursor.
- LoseCursor
The cursor is off the ground: no steps until it returns, and continuous time owed is forgiven.
- Tick
Advance the stroke's clock and append the steps that fell due, in order.
- End
End the stroke, appending its last steps.
- IsActive
- HasCursor
- GetCursor