16 #ifndef SURGSIM_FRAMEWORK_SCENE_H 17 #define SURGSIM_FRAMEWORK_SCENE_H 19 #include <boost/thread/mutex.hpp> 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();
115 #endif // SURGSIM_FRAMEWORK_SCENE_H Definition: CompoundShapeToGraphics.cpp:29
Class to wrap grouping operations, gives access to the members of a group and the groups of members...
Definition: Groups.h:37
std::shared_ptr< Framework::Logger > m_logger
Definition: Scene.h:109
Scene. Basic Container for SceneElements.
Definition: Scene.h:42
boost::mutex m_sceneElementsMutex
Definition: Scene.h:105
SurgSim::DataStructures::Groups< std::string, std::shared_ptr< SceneElement > > m_groups
Definition: Scene.h:107
std::vector< std::shared_ptr< SceneElement > > m_elements
Definition: Scene.h:102
Definition: DataStructuresConvert.h:28
std::weak_ptr< Runtime > m_runtime
Definition: Scene.h:100