33 #ifndef DART_COLLISION_DETAIL_COLLISIONGROUP_HPP_
34 #define DART_COLLISION_DETAIL_COLLISIONGROUP_HPP_
45 template <
typename... Others>
55 template <
typename... Others>
57 const std::vector<const dynamics::ShapeFrame*>& shapeFrames,
58 const Others*... others)
66 template <
typename... Others>
72 if (otherGroup &&
this != otherGroup)
82 template <
typename... Others>
88 auto collisionShapeNodes
91 for (
auto& shapeNode : collisionShapeNodes)
98 template <
typename... Others>
105 for (
auto i = 0u; i < numBodyNodes; ++i)
112 template <
typename... Others>
123 const auto collisionShapeNodes
126 for (
const auto& shapeNode : collisionShapeNodes)
128 entry->second.mObjects.insert(
137 template <
typename... Others>
142 skeleton.get(),
SkeletonSource(skeleton, skeleton->getVersion())));
148 const std::size_t numBodies = skeleton->getNumBodyNodes();
149 for (std::size_t i = 0u; i < numBodies; ++i)
153 const auto& collisionShapeNodes
158 .insert(std::make_pair(
162 for (
const auto& shapeNode : collisionShapeNodes)
166 childInfo.mFrames.insert(shapeNode);
175 template <
typename... Others>
185 template <
typename... Others>
187 const std::vector<const dynamics::ShapeFrame*>& shapeFrames,
188 const Others*... others)
196 template <
typename... Others>
204 if (
this == otherGroup)
218 template <
typename... Others>
224 auto collisionShapeNodes
227 for (
auto& shapeNode : collisionShapeNodes)
234 template <
typename... Others>
241 for (
auto i = 0u; i < numBodyNodes; ++i)
248 template <
typename... Others>
255 for (
const auto& entry : it->second.mObjects)
265 template <
typename... Others>
272 for (
const auto& entry : it->second.mObjects)
Definition: CollisionGroup.hpp:53
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:511
void unsubscribeFrom(const dynamics::BodyNode *bodyNode, const Others *... others)
Unsubscribe from bodyNode.
Definition: CollisionGroup.hpp:249
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:373
BodyNodeSources mBodyNodeSources
BodyNode sources that this group is susbscribed to.
Definition: CollisionGroup.hpp:514
virtual std::size_t getVersion() const
Get the version number of this object.
Definition: VersionCounter.cpp:59
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:59
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:186
std::shared_ptr< const Skeleton > ConstSkeletonPtr
Definition: SmartPointer.hpp:60
std::multimap< dart::dynamics::Shape *, SimpleFrameShapeDnD * >::iterator iterator
Definition: Viewer.cpp:620
Definition: BulletCollisionDetector.cpp:65
This is information pertaining to a child of the source.
Definition: CollisionGroup.hpp:460
This struct is used to store sources of ShapeFrames that the CollisionGroup is subscribed to,...
Definition: CollisionGroup.hpp:447
std::unordered_map< const Child *, ChildInfo > mChildren
The last known versions of the children related to this source.
Definition: CollisionGroup.hpp:477
std::unordered_map< const dynamics::ShapeFrame *, ObjectInfo * > mObjects
The set of objects that pertain to this source.
Definition: CollisionGroup.hpp:455