16 #ifndef SURGSIM_FRAMEWORK_SCENE_H 17 #define SURGSIM_FRAMEWORK_SCENE_H 19 #include <boost/thread/mutex.hpp> 24 #include "SurgSim/DataStructures/Groups.h" 25 #include "SurgSim/Framework/SceneElement.h" 42 class Scene :
public std::enable_shared_from_this<Scene>
48 explicit Scene(std::weak_ptr<Runtime> runtime);
55 void addSceneElement(std::shared_ptr<SceneElement> element);
59 void removeSceneElement(std::shared_ptr<SceneElement> element);
63 void addSceneElements(std::vector<std::shared_ptr<SceneElement>> elements);
67 const std::vector<std::shared_ptr<SceneElement>>& getSceneElements()
const;
71 const std::shared_ptr<SceneElement> getSceneElement(
const std::string& name)
const;
77 std::shared_ptr<Component> getComponent(
const std::string& elementName,
const std::string& componentName)
const;
81 std::shared_ptr<Runtime> getRuntime();
85 YAML::Node encode()
const;
90 bool decode(
const YAML::Node& node);
99 std::shared_ptr<Scene> getSharedPtr();
100 std::weak_ptr<Runtime> m_runtime;
102 std::vector<std::shared_ptr<SceneElement>> m_elements;
105 mutable boost::mutex m_sceneElementsMutex;
109 std::shared_ptr<Framework::Logger> m_logger;
115 #endif // SURGSIM_FRAMEWORK_SCENE_H Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui n...
Definition: AddRandomSphereBehavior.cpp:36
Class to wrap grouping operations, gives access to the members of a group and the groups of members...
Definition: Groups.h:37
Scene. Basic Container for SceneElements.
Definition: Scene.h:42
Definition: DataStructuresConvert.h:28