Skip to content
Snippets Groups Projects
Commit 8b663e67 authored by Raphael Grimm's avatar Raphael Grimm
Browse files

Add templated version of RobotNode::getChildren

parent aa31c255
No related branches found
No related tags found
No related merge requests found
......@@ -126,6 +126,22 @@ namespace VirtualRobot
return localTransformation;
}
using SceneObject::getChildren;
template<class T>
auto getChildren()
{
std::vector<std::shared_ptr<T>> result;
for (const auto& c : getChildren())
{
RobotNodePtr n = std::dynamic_pointer_cast<T>(c);
if (n)
{
result.emplace_back(n);
}
}
return result;
}
/*!
Initialize robot node. Here pointers to robot and children are created from names.
Be sure all children are created and registered to robot before calling initialize.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment