Scene. Basic Container for SceneElements.
More...
#include <Scene.h>
Scene. Basic Container for SceneElements.
§ Scene()
SurgSim::Framework::Scene::Scene |
( |
std::weak_ptr< Runtime > |
runtime | ) |
|
|
explicit |
Constructor.
- Parameters
-
runtime | The runtime to be used. |
§ addSceneElement()
void SurgSim::Framework::Scene::addSceneElement |
( |
std::shared_ptr< SceneElement > |
element | ) |
|
Adds a scene element to the Scene, the SceneElement will have its initialize() function called.
- Parameters
-
§ addSceneElements()
void SurgSim::Framework::Scene::addSceneElements |
( |
std::vector< std::shared_ptr< SceneElement >> |
elements | ) |
|
Invokes addSceneElement() for each element in the list.
- Parameters
-
elements | the list of elements to be added. |
§ decode()
bool SurgSim::Framework::Scene::decode |
( |
const YAML::Node & |
node | ) |
|
Pull data from a YAML::Node.
- Parameters
-
- Returns
- true if the decoding succeeded and the node was formatted correctly, false otherwise
§ encode()
YAML::Node SurgSim::Framework::Scene::encode |
( |
| ) |
const |
Convert to a YAML::Node.
- Returns
- A node with all the public data of this instance
§ getComponent()
std::shared_ptr< Component > SurgSim::Framework::Scene::getComponent |
( |
const std::string & |
elementName, |
|
|
const std::string & |
componentName |
|
) |
| const |
Look through the scene to find a component of a named element.
- Parameters
-
elementName | The name of the element to find |
componentName | The name of the component to find |
- Returns
- the component that was found, nullptr if no component was found
§ getGroups()
- Returns
- the groups of the scene
§ getRuntime()
std::shared_ptr< Runtime > SurgSim::Framework::Scene::getRuntime |
( |
| ) |
|
Gets the runtime.
- Returns
- runtime The runtime for this scene.
§ getSceneElement()
const std::shared_ptr< SceneElement > SurgSim::Framework::Scene::getSceneElement |
( |
const std::string & |
name | ) |
const |
§ getSceneElements()
const std::vector< std::shared_ptr< SceneElement > > & SurgSim::Framework::Scene::getSceneElements |
( |
| ) |
const |
Gets all the scene elements in the scene.
- Returns
- The scene elements.
§ removeSceneElement()
void SurgSim::Framework::Scene::removeSceneElement |
( |
std::shared_ptr< SceneElement > |
element | ) |
|
Removes a scene element from the Scene.
- Parameters
-
The documentation for this class was generated from the following files:
- SurgSim/Framework/Scene.h
- SurgSim/Framework/Scene.cpp