35 return this->sceneObjects;
42 if (object->getObjectId().compare(objectId) == 0)
53 if (
ScenePtr scene = this->scene.lock())
56 std::unique_lock lock(scene->execute_mutex);
59 if (this->getObjectById(object->getObjectId()) != NULL)
61 throw std::logic_error(
"Object with this ID is already contained in scene!");
65 sceneObjects.push_back(
object);
68 scene->objectRootNode->insertChild(
object.get(), 0);
74 if (
ScenePtr scene = this->scene.lock())
77 std::unique_lock lock(scene->execute_mutex);
81 if (std::find(sceneObjects.begin(), sceneObjects.end(),
object) != sceneObjects.end())
83 if (scene->getSelectionManager()->isSelected(
object))
85 std::cerr <<
"Warning: Remove selected item, whis is currently selected." << std::endl;
89 sceneObjects.erase(std::remove(sceneObjects.begin(), sceneObjects.end(),
object), sceneObjects.end());
91 scene->getSelectionManager()->removeFromSelection(
object);
92 scene->objectRootNode->removeChild(
object.get());
96 throw std::runtime_error(
"This object is not registered in the sceneObjectManager!");
101 throw std::runtime_error(
"Object is null!");