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

ACDManager::addCollisionModel(const std::vector<RobotNodePtr>& nodes, const std::string& setName)dd

parent 2c4a715e
No related branches found
No related tags found
No related merge requests found
......@@ -62,6 +62,21 @@ namespace VirtualRobot
}
}
void CDManager::addCollisionModel(const std::vector<RobotNodePtr>& nodes, const std::string& setName)
{
VirtualRobot::SceneObjectSetPtr cms(
new VirtualRobot::SceneObjectSet(
setName.empty() ? "set_" + std::to_string(colModels.size()) : setName,
getCollisionChecker()
)
);
for (const auto& robotNode : nodes)
{
cms->addSceneObject(robotNode);
}
addCollisionModel(cms);
}
bool CDManager::isInCollision(SceneObjectSetPtr m)
{
if (!m || !colChecker)
......
......@@ -86,6 +86,7 @@ namespace VirtualRobot
Here single collision models can be added. Internally they are wrapped by a SceneObjectSet.
*/
void addCollisionModel(SceneObjectPtr m);
void addCollisionModel(const std::vector<RobotNodePtr>& nodes, const std::string& setName = "");
bool hasSceneObjectSet(SceneObjectSetPtr m);
......
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