Cogs.Core
|
Public Member Functions | |
ScaleCommand (EditorState *state, const EntityIds &entityIds, glm::vec3 scale) | |
void | apply () override |
Run the command. | |
void | undo () override |
bool | mergeWith (const EditorCommand *command) override |
![]() | |
EditorCommand (EditorState *state, Context *context) | |
virtual void | apply ()=0 |
Run the command. | |
virtual void | undo ()=0 |
virtual void | redo () |
virtual bool | mergeWith (const EditorCommand *) |
virtual MeshHandle | applyMesh (MeshHandle) |
Workaround for having extendable mesh processing available without linking (e.g command -> RR). | |
virtual void | close () |
Close command, i.e. prevent merging with another command. | |
bool | isClosed () const |
bool | merge (const EditorCommand *command) |
Merge into this if not this is closed. | |
Private Attributes | |
EntityIds | entityIds |
glm::vec3 | scale |
std::vector< glm::vec3 > | previousScales |
Additional Inherited Members | |
![]() | |
std::vector< ParsedValue > | options |
Options passed to the command when running in batch mode. | |
bool | permanentUndo = false |
True if cannot Redo after Undo. | |
![]() | |
EditorState * | state = nullptr |
Context * | context = nullptr |
Definition at line 182 of file EditorCommand.h.
|
inline |
Definition at line 184 of file EditorCommand.h.
|
overridevirtual |
Run the command.
In batch scripts this method is called for all type of commands. In interactive mode this method is not called for model commands (subclasses of ModalEditorCommand)
Implements Cogs::Core::EditorCommand.
Definition at line 285 of file EditorCommand.cpp.
References Cogs::ComponentModel::Entity::getComponent(), and Cogs::Core::TransformComponent::scale.
|
overridevirtual |
Check if the action in the given command should be merged into this. I.e. Multiple field-changes commands merged info one for undoing all-in-one. Client code shall use
Reimplemented from Cogs::Core::EditorCommand.
Definition at line 309 of file EditorCommand.cpp.
|
overridevirtual |
Implements Cogs::Core::EditorCommand.
Definition at line 298 of file EditorCommand.cpp.
|
private |
Definition at line 192 of file EditorCommand.h.
|
private |
Definition at line 195 of file EditorCommand.h.
|
private |
Definition at line 193 of file EditorCommand.h.