Exemple #1
0
void CollisionGroup::addShapeFramesOf(
    const dynamics::MetaSkeleton* skel, const Others*... others)
{
  assert(skel);

  auto numBodyNodes = skel->getNumBodyNodes();
  for (auto i = 0u; i < numBodyNodes; ++i)
    addShapeFramesOf(skel->getBodyNode(i));

  addShapeFramesOf(others...);
}
Exemple #2
0
void CollisionGroup::addShapeFramesOf(
    const dynamics::ShapeFrame* shapeFrame, const Others*... others)
{
  addShapeFrame(shapeFrame);

  addShapeFramesOf(others...);
}
Exemple #3
0
void CollisionGroup::addShapeFramesOf(
    const std::vector<const dynamics::ShapeFrame*>& shapeFrames,
    const Others*... others)
{
  addShapeFrames(shapeFrames);

  addShapeFramesOf(others...);
}
std::unique_ptr<CollisionGroup>
CollisionDetector::createCollisionGroup(const Args&... args)
{
  auto group = createCollisionGroup();

  group->addShapeFramesOf(args...);

  return group;
}
Exemple #5
0
void CollisionGroup::addShapeFramesOf(
    const dynamics::BodyNode* bodyNode, const Others*... others)
{
  assert(bodyNode);

  auto collisionShapeNodes
      = bodyNode->getShapeNodesWith<dynamics::CollisionAspect>();

  for (auto& shapeNode : collisionShapeNodes)
    addShapeFrame(shapeNode);

  addShapeFramesOf(others...);
}
Exemple #6
0
void CollisionGroup::addShapeFramesOf(
    const CollisionGroup* otherGroup, const Others*... others)
{
  assert(otherGroup);

  if (otherGroup && this != otherGroup)
  {
    for (const auto& pair : otherGroup->mShapeFrameMap)
      addShapeFrame(pair.first);
  }

  addShapeFramesOf(others...);
}