Go to the documentation of this file.
37 #include "../scene3D/Scene.h"
38 #include "../scene3D/SceneObject.h"
40 #include "../memoryxcontroller/MemoryXController.h"
42 #include "../gui/ShortcutController.h"
126 const std::shared_ptr<scene3D::Scene>
getScene()
const;
245 std::shared_ptr<scene3D::Scene> scene;
246 std::shared_ptr<memoryxcontroller::MemoryXController> memoryXController;
247 std::shared_ptr<gui::ShortcutController> shortcutController;
248 mutable std::recursive_mutex execute_mutex;
249 mutable std::mutex queue_mutex;
251 std::vector<std::pair<int, OperationPtr>> queuedOperations;
void redo()
Goes one step forward in the history and redoes the corresponding Operations.
void triggerMinimapClicked()
Triggers signal controller:Controller::minimapClicked.
void triggerObjectsChanged(controller::vector_string objectIds)
Triggers signal controller:Controller::objectsChanged with given parameter.
const std::shared_ptr< gui::ShortcutController > getShortcutController() const
Returns the ShortcutController.
static ControllerPtr create()
Creates a new instance of the Controller, initializes the Scene and the MemoryXController and returns...
void triggerSceneObjectSelected(scene3D::SceneObjectPtr object)
Triggers signal controller:Controller::sceneObjectSelected with given parameter.
std::shared_ptr< std::vector< OperationPtr > > OperationPtrListPtr
static const int EXECUTE_ON_SCENE
A flag to execute operations on the Scene.
void minimapClicked()
A signal which gets triggered, after a click was performed on the minimap.
void saveSnapshotAsJSON(std::string const &snapshotName)
void triggerObjectClassSelected(const std::string &objectClass, const std::string &collection)
Triggers signal controller:Controller::objectClassSelected with given parameter.
const std::shared_ptr< scene3D::Scene > getScene() const
Returns the Scene.
void reloadScene()
A signal which gets triggered, after the scene is reloaded.
~Controller() override
A destructor.
const std::shared_ptr< memoryxcontroller::MemoryXController > getMemoryXController() const
Returns the MemoryXController.
void clearScene()
Deletes all objects in local scene and in WorkingMemory and deletes all groups.
std::vector< std::string > vector_string
static const int UNDOABLE
A flag to save the executed operations to the history.
std::shared_ptr< Controller > ControllerPtr
A class to execute Operations, maintain the execution history and initialize Scene and MemoryXControl...
void objectClassSelected(const std::string &objectClass, const std::string &collection)
A signal which gets triggered, after a class gets selected.
void reloadLocalScene()
Deletes all objects in the local Scene and loads the current objects from the WorkingMemory in the Sc...
void objectsChanged(controller::vector_string objectIds)
A signal which gets triggered, if objects are moved or rotated.
void executeQueuedOperations(bool blocking=true)
Executes the Operations, which are queued because the object, which would be affected by this was bus...
std::shared_ptr< UndoRedoStack > UndoRedoStackPtr
void sceneObjectSelected(scene3D::SceneObjectPtr object)
A signal which gets triggered, after a object gets selected.
void undo()
Goes one step back in the history and undoes the corresponding Operations.
boost::intrusive_ptr< SceneObject > SceneObjectPtr
static const int EXECUTE_ON_WM
A Flag to execute operations on the WorkingMemory.
void operationExecuted(controller::vector_string objectIds)
A signal which gets triggered, after a vector of operations is executed.
void execute(int flags, const OperationPtrListPtr &operations, bool blocking=true)
Executes multiple operations.