Jazz2::Editor::SetTerrainSplinesCommand class

Changes the ground laid along lines and the tiles of its layer as one step.

Base classes

class EditCommand
Undoable change of a level being edited.

Constructors, destructors, conversion operators

SetTerrainSplinesCommand(const LevelDocument& document, const SmallVectorImpl<TerrainSpline>& splines, std::unique_ptr<SetTilesCommand> tiles, String name)
Creates a change to the given lines and tiles, the tiles may be nullptr.

Public functions

void Do(LevelDocument& document, DocumentChanges& changes) override
Applies the change to the document, again after it was undone.
void Undo(LevelDocument& document, DocumentChanges& changes) override
Reverts the change.
auto GetName() const -> String override
Returns the name shown in the history.
auto GetMemoryUsage() const -> std::size_t override
Returns the memory the command takes.