33#ifndef DART_COLLISION_DETAIL_COLLISIONGROUP_HPP_
34#define DART_COLLISION_DETAIL_COLLISIONGROUP_HPP_
44template <
typename... Others>
54template <
typename... Others>
56 const std::vector<const dynamics::ShapeFrame*>& shapeFrames,
57 const Others*... others)
65template <
typename... Others>
71 if (otherGroup &&
this != otherGroup)
81template <
typename... Others>
87 auto collisionShapeNodes
90 for (
auto& shapeNode : collisionShapeNodes)
97template <
typename... Others>
104 for (
auto i = 0u; i < numBodyNodes; ++i)
111template <
typename... Others>
120 const BodyNodeSources::iterator& entry = inserted.first;
122 const auto collisionShapeNodes
125 for (
const auto& shapeNode : collisionShapeNodes)
127 entry->second.mObjects.insert(
136template <
typename... Others>
141 skeleton.get(),
SkeletonSource(skeleton, skeleton->getVersion())));
147 const std::size_t numBodies = skeleton->getNumBodyNodes();
148 for (std::size_t i = 0u; i < numBodies; ++i)
152 const auto& collisionShapeNodes
157 .insert(std::make_pair(
161 for (
const auto& shapeNode : collisionShapeNodes)
165 childInfo.mFrames.insert(shapeNode);
174template <
typename... Others>
184template <
typename... Others>
186 const std::vector<const dynamics::ShapeFrame*>& shapeFrames,
187 const Others*... others)
195template <
typename... Others>
203 if (
this == otherGroup)
217template <
typename... Others>
223 auto collisionShapeNodes
226 for (
auto& shapeNode : collisionShapeNodes)
233template <
typename... Others>
240 for (
auto i = 0u; i < numBodyNodes; ++i)
247template <
typename... Others>
254 for (
const auto& entry : it->second.mObjects)
264template <
typename... Others>
271 for (
const auto& entry : it->second.mObjects)
Definition CollisionGroup.hpp:54
void addShapeFramesOf()
Do nothing.
Definition CollisionGroup.cpp:79
void subscribeTo()
Do nothing.
Definition CollisionGroup.cpp:85
void removeShapeFrames(const std::vector< const dynamics::ShapeFrame * > &shapeFrames)
Remove ShapeFrames from this CollisionGroup.
Definition CollisionGroup.cpp:132
void addShapeFrames(const std::vector< const dynamics::ShapeFrame * > &shapeFrames)
Add ShapeFrames to this CollisionGroup.
Definition CollisionGroup.cpp:71
SkeletonSources mSkeletonSources
Skeleton sources that this group is subscribed to.
Definition CollisionGroup.hpp:512
void unsubscribeFrom(const dynamics::BodyNode *bodyNode, const Others *... others)
Unsubscribe from bodyNode.
Definition CollisionGroup.hpp:248
ObjectInfo * addShapeFrameImpl(const dynamics::ShapeFrame *shapeFrame, const void *source)
Implementation of addShapeFrame.
Definition CollisionGroup.cpp:348
void removeAllShapeFrames()
Remove all the ShapeFrames in this CollisionGroup.
Definition CollisionGroup.cpp:146
void addShapeFrame(const dynamics::ShapeFrame *shapeFrame)
Add a ShapeFrame to this CollisionGroup.
Definition CollisionGroup.cpp:65
void removeShapeFrame(const dynamics::ShapeFrame *shapeFrame)
Remove a ShapeFrame from this CollisionGroup.
Definition CollisionGroup.cpp:91
void removeShapeFramesOf()
Do nothing.
Definition CollisionGroup.cpp:140
void removeShapeFrameInternal(const dynamics::ShapeFrame *shapeFrame, const void *source)
Internal version of removeShapeFrame.
Definition CollisionGroup.cpp:390
ObjectInfoList mObjectInfoList
Information about ShapeFrames and CollisionObjects that have been added to this CollisionGroup.
Definition CollisionGroup.hpp:374
BodyNodeSources mBodyNodeSources
BodyNode sources that this group is susbscribed to.
Definition CollisionGroup.hpp:515
virtual std::size_t getVersion() const
Get the version number of this object.
Definition VersionCounter.cpp:60
BodyNode class represents a single node of the skeleton.
Definition BodyNode.hpp:79
const std::vector< ShapeNode * > getShapeNodesWith()
Return the list of ShapeNodes containing given Aspect.
Definition BodyNode.hpp:221
Definition ShapeFrame.hpp:117
Definition ShapeFrame.hpp:192
class Skeleton
Definition Skeleton.hpp:60
TemplateBodyNodePtr is a templated class that enables users to create a reference-counting BodyNodePt...
Definition BodyNodePtr.hpp:110
BodyNodeT * get() const
Get the raw BodyNode pointer.
Definition BodyNodePtr.hpp:184
std::shared_ptr< const Skeleton > ConstSkeletonPtr
Definition SmartPointer.hpp:60
Definition BulletCollisionDetector.cpp:60
This is information pertaining to a child of the source.
Definition CollisionGroup.hpp:461
This struct is used to store sources of ShapeFrames that the CollisionGroup is subscribed to,...
Definition CollisionGroup.hpp:448
std::unordered_map< const Child *, ChildInfo > mChildren
The last known versions of the children related to this source.
Definition CollisionGroup.hpp:478
std::unordered_map< const dynamics::ShapeFrame *, ObjectInfo * > mObjects
The set of objects that pertain to this source.
Definition CollisionGroup.hpp:456