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>
96template <
typename... Others>
103 for (
auto i = 0u; i < numBodyNodes; ++i)
110template <
typename... Others>
119 const BodyNodeSources::iterator& entry = inserted.first;
122 entry->second.mObjects.insert(
131template <
typename... Others>
136 skeleton.get(),
SkeletonSource(skeleton, skeleton->getVersion())));
142 const std::size_t numBodies = skeleton->getNumBodyNodes();
143 for (std::size_t i = 0u; i < numBodies; ++i)
149 .insert(std::make_pair(
157 childInfo.mFrames.insert(shapeNode);
166template <
typename... Others>
176template <
typename... Others>
178 const std::vector<const dynamics::ShapeFrame*>& shapeFrames,
179 const Others*... others)
187template <
typename... Others>
195 if (
this == otherGroup)
209template <
typename... Others>
224template <
typename... Others>
231 for (
auto i = 0u; i < numBodyNodes; ++i)
238template <
typename... Others>
245 for (
const auto& entry : it->second.mObjects)
255template <
typename... Others>
262 for (
const auto& entry : it->second.mObjects)
275template <
typename... Others>
284template <
typename... Others>
Definition CollisionGroup.hpp:54
bool isSubscribedTo()
Return true.
Definition CollisionGroup.cpp:152
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:530
void unsubscribeFrom()
Do nothing.
Definition CollisionGroup.cpp:146
ObjectInfo * addShapeFrameImpl(const dynamics::ShapeFrame *shapeFrame, const void *source)
Implementation of addShapeFrame.
Definition CollisionGroup.cpp:360
void removeAllShapeFrames()
Remove all the ShapeFrames in this CollisionGroup.
Definition CollisionGroup.cpp:158
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:403
ObjectInfoList mObjectInfoList
Information about ShapeFrames and CollisionObjects that have been added to this CollisionGroup.
Definition CollisionGroup.hpp:392
BodyNodeSources mBodyNodeSources
BodyNode sources that this group is susbscribed to.
Definition CollisionGroup.hpp:533
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:80
void eachShapeNodeWith(Func func) const
Iterates all the ShapeNodes that has a specific aspect and invokes the callback function.
Definition BodyNode.hpp:303
Definition ShapeFrame.hpp:117
Definition ShapeFrame.hpp:192
Definition ShapeNode.hpp:49
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:479
This struct is used to store sources of ShapeFrames that the CollisionGroup is subscribed to,...
Definition CollisionGroup.hpp:466
std::unordered_map< const Child *, ChildInfo > mChildren
The last known versions of the children related to this source.
Definition CollisionGroup.hpp:496
std::unordered_map< const dynamics::ShapeFrame *, ObjectInfo * > mObjects
The set of objects that pertain to this source.
Definition CollisionGroup.hpp:474