16 #ifndef SURGSIM_FRAMEWORK_SCENEELEMENT_INL_H 17 #define SURGSIM_FRAMEWORK_SCENEELEMENT_INL_H 19 #include "SurgSim/Framework/Component.h" 33 std::vector<std::shared_ptr<T>> result;
35 for (
auto componentIt = m_components.begin(); componentIt != m_components.end(); ++componentIt)
37 std::shared_ptr<T> typedElement = std::dynamic_pointer_cast<T>(componentIt->second);
40 result.emplace_back(std::move(typedElement));
49 auto found = m_components.find(component);
51 <<
"Component named " << component <<
" not found in SceneElement named " <<
getName()
52 <<
". Cannot get " <<
property <<
" property.";
53 return found->second->getValue<T>(property);
60 auto found = m_components.find(component);
61 if (found != m_components.end())
63 result = found->second->getValue(property, value);
Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui n...
Definition: AddRandomSphereBehavior.cpp:36
std::vector< std::shared_ptr< Component > > getComponents() const
Gets all the components of this SceneElement.
Definition: SceneElement.cpp:195
std::string getName() const
Return the name of this SceneElement.
Definition: SceneElement.cpp:175
T getValue(const std::string &component, const std::string &property) const
Retrieves the property value from a component.
Definition: SceneElement-inl.h:47
#define SURGSIM_ASSERT(condition)
Assert that condition is true.
Definition: Assert.h:77