34 const std::shared_ptr<memoryxcontroller::MemoryXController>& memoryXController,
35 const std::shared_ptr<scene3D::Scene>& scene,
36 const std::string& objectId) :
37 Operation(memoryXController, scene, objectId), wasSelected(true)
46 std::shared_ptr<controller::Operation> inverseOperation(
48 return inverseOperation;
52 std::shared_ptr<controller::Operation> inverseOperation(
54 return inverseOperation;
67 std::shared_ptr<scene3D::Scene> scene =
getScene();
72 throw std::logic_error(
"Object does not exist");
75 if (scene->getSelectionManager()->isSelected(
object))
78 scene->getSelectionManager()->removeFromSelection(
object);
DeselectOperation(const std::shared_ptr< memoryxcontroller::MemoryXController > &memoryXController, const std::shared_ptr< scene3D::Scene > &scene, const std::string &objectId)
Creates a new operation, which deselects a object.
const OperationPtr createInverseOperation() const override
Returns a new operation, which selects the object again.
void executeOnScene() override
Deselects the object.
void executeOnWorkingMemory() override
Because the WorkingMemory does not support selection, nothing is done on the WorkingMemory.
A operation which does nothing.
std::string getObjectId() const
Returns the ID of the object, this Operation is working on.
const std::shared_ptr< memoryxcontroller::MemoryXController > getMemoryXController() const
Returns the the MemoryXController to execute the Operation at.
const std::shared_ptr< scene3D::Scene > getScene() const
Returns the the Scene to execute the Operation at.
Operation(const std::shared_ptr< memoryxcontroller::MemoryXController > &memoryXController, const std::shared_ptr< scene3D::Scene > &scene, const std::string &objectId)
A constructor.
A operation to select a object.
std::shared_ptr< Operation > OperationPtr
boost::intrusive_ptr< SceneObject > SceneObjectPtr