29 #include <QtCore/qstatemachine.h>
31 #include <Inventor/SbRotation.h>
32 #include <Inventor/SbVec3f.h>
38 const std::shared_ptr<memoryxcontroller::MemoryXController>& memoryXController,
39 const std::shared_ptr<scene3D::Scene>& scene,
40 const std::string& objectName,
41 const std::string& objectCollection,
42 const SbVec3f& objectPosition,
43 const SbRotation& objectRotation,
44 const std::string& objectId) :
45 Operation(memoryXController, scene, objectId),
46 objectName(objectName),
47 objectCollection(objectCollection),
48 objectPosition(objectPosition),
49 objectRotation(objectRotation)
54 const std::shared_ptr<memoryxcontroller::MemoryXController>& memoryXController,
55 const std::shared_ptr<scene3D::Scene>& scene,
56 const std::string& objectId) :
57 Operation(memoryXController, scene, objectId),
68 if (!(objectName.empty() || objectCollection.empty()))
70 std::shared_ptr<controller::Operation> inverseOperation(
78 return inverseOperation;
82 throw std::runtime_error(
"Not yet executed");
99 memoryXController->getWorkingMemoryController()->removeObjectInstance(getObjectId());
105 std::shared_ptr<scene3D::Scene> scene = getScene();
110 throw std::logic_error(
"Object does not exist");
113 objectName =
object->getClassId();
114 objectCollection =
object->getCollection();
115 objectPosition =
object->getTranslation();
116 objectRotation =
object->getRotation();
117 scene->getObjectManager()->removeObject(
object);
123 std::shared_ptr<scene3D::Scene> scene = getScene();
131 return object->isMutable();