16 #ifndef SURGSIM_FRAMEWORK_SCENE_H
17 #define SURGSIM_FRAMEWORK_SCENE_H
22 #include <boost/thread/mutex.hpp>
39 class Scene :
public std::enable_shared_from_this<Scene>
45 explicit Scene(std::weak_ptr<Runtime> runtime);
60 const std::shared_ptr<SceneElement>
getSceneElement(
const std::string& name)
const;
73 bool decode(
const YAML::Node& node);
92 #endif // SURGSIM_FRAMEWORK_SCENE_H
Definition: DriveElementFromInputBehavior.cpp:27
bool decode(const YAML::Node &node)
Pull data from a YAML::Node.
Definition: Scene.cpp:121
void addSceneElement(std::shared_ptr< SceneElement > element)
Adds a scene element to the Scene, the SceneElement will have its initialize() function called...
Definition: Scene.cpp:47
Scene. Basic Container for SceneElements.
Definition: Scene.h:39
boost::mutex m_sceneElementsMutex
Definition: Scene.h:86
std::shared_ptr< Runtime > getRuntime()
Gets the runtime.
Definition: Scene.cpp:68
std::shared_ptr< Scene > getSharedPtr()
Get a shared pointer to Scene.
Definition: Scene.cpp:93
YAML::Node encode() const
Convert to a YAML::Node.
Definition: Scene.cpp:107
std::vector< std::shared_ptr< SceneElement > > m_elements
Definition: Scene.h:83
const std::vector< std::shared_ptr< SceneElement > > & getSceneElements() const
Gets all the scene elements in the scene.
Definition: Scene.cpp:73
const std::shared_ptr< SceneElement > getSceneElement(const std::string &name) const
Retrieve a SceneElement for this scene with the given name.
Definition: Scene.cpp:78
Definition: DataStructuresConvert.h:28
std::weak_ptr< Runtime > m_runtime
Definition: Scene.h:81
~Scene()
Destructor.
Definition: Scene.cpp:42
Scene(std::weak_ptr< Runtime > runtime)
Constructor.
Definition: Scene.cpp:36