35#ifndef DART_DYNAMICS_GROUP_HPP_
36#define DART_DYNAMICS_GROUP_HPP_
50 const std::string& _name =
"Group",
51 const std::vector<BodyNode*>& _bodyNodes = std::vector<BodyNode*>(),
52 bool _includeJoints =
true,
53 bool _includeDofs =
true);
60 const std::string& _name,
61 const std::vector<DegreeOfFreedom*>& _dofs,
62 bool _includeBodyNodes =
true,
63 bool _includeJoints =
true);
67 const std::string& _name,
126 bool addBodyNodes(
const std::vector<BodyNode*>& _bodyNodes,
151 bool addJoint(
Joint* _joint,
bool _addDofs=
true,
bool _warning=
true);
161 bool addJoints(
const std::vector<Joint*>& _joints,
bool _addDofs=
true,
182 bool removeJoints(
const std::vector<Joint*>& _joints,
bool _removeDofs=
true,
201 bool addDofs(
const std::vector<DegreeOfFreedom*>& _dofs,
202 bool _addJoint =
true,
bool _warning=
true);
223 bool removeDofs(
const std::vector<DegreeOfFreedom*>& _dofs,
224 bool _cleanupJoint=
true,
bool _warning=
true);
228 Group(
const std::string& _name,
229 const std::vector<BodyNode*>& _bodyNodes,
234 Group(
const std::string& _name,
235 const std::vector<DegreeOfFreedom*>& _dofs,
236 bool _includeBodyNodes,
237 bool _includeJoints);
240 Group(
const std::string& _name,
BodyNode class represents a single node of the skeleton.
Definition BodyNode.hpp:78
DegreeOfFreedom class is a proxy class for accessing single degrees of freedom (aka generalized coord...
Definition DegreeOfFreedom.hpp:53
bool removeBodyNodes(const std::vector< BodyNode * > &_bodyNodes, bool _warning=true)
Remove a set of BodyNodes from this Group.
Definition Group.cpp:341
bool removeBodyNode(BodyNode *_bn, bool _warning=true)
Remove a BodyNode from this Group.
Definition Group.cpp:308
bool removeComponents(const std::vector< BodyNode * > &_bodyNodes, bool _warning=true)
Remove a set of BodyNodes and their parent DegreesOfFreedom from this Group.
Definition Group.cpp:254
void swapDofIndices(std::size_t _index1, std::size_t _index2)
Swap the index of DegreeOfFreedom _index1 with _index2.
Definition Group.cpp:122
bool removeDof(DegreeOfFreedom *_dof, bool _cleanupJoint=true, bool _warning=true)
Remove a DegreeOfFreedom from this Group.
Definition Group.cpp:521
bool addBodyNode(BodyNode *_bn, bool _warning=true)
Add a BodyNode to this Group.
Definition Group.cpp:265
bool removeComponent(BodyNode *_bn, bool _warning=true)
Remove a BodyNode and its parent DegreesOfFreedom from this Group.
Definition Group.cpp:220
bool addDofs(const std::vector< DegreeOfFreedom * > &_dofs, bool _addJoint=true, bool _warning=true)
Add a set of DegreesOfFreedom to this Group.
Definition Group.cpp:510
bool removeJoints(const std::vector< Joint * > &_joints, bool _removeDofs=true, bool _warning=true)
Remove a set of Joints from this Group.
bool addComponents(const std::vector< BodyNode * > &_bodyNodes, bool _warning=true)
Add set of BodyNodes and their parent DegreesOfFreedom to this Group.
Definition Group.cpp:209
static GroupPtr create(const std::string &_name="Group", const std::vector< BodyNode * > &_bodyNodes=std::vector< BodyNode * >(), bool _includeJoints=true, bool _includeDofs=true)
Create a Group out of a set of BodyNodes.
Definition Group.cpp:43
bool addComponent(BodyNode *_bn, bool _warning=true)
Add a BodyNode and its parent DegreesOfFreedom to this Group.
Definition Group.cpp:176
bool addBodyNodes(const std::vector< BodyNode * > &_bodyNodes, bool _warning=true)
Add a set of BodyNodes to this Group.
Definition Group.cpp:297
bool removeDofs(const std::vector< DegreeOfFreedom * > &_dofs, bool _cleanupJoint=true, bool _warning=true)
Remove a set of DegreesOfFreedom from this Group.
Definition Group.cpp:588
bool addJoint(Joint *_joint, bool _addDofs=true, bool _warning=true)
Add a Joint to this Group.
Definition Group.cpp:352
void swapBodyNodeIndices(std::size_t _index1, std::size_t _index2)
Swap the index of BodyNode _index1 with _index2.
Definition Group.cpp:72
bool removeJoint(Joint *_joint, bool _removeDofs=true, bool _warning=true)
Remove a Joint from this Group.
Definition Group.cpp:412
bool addJoints(const std::vector< Joint * > &_joints, bool _addDofs=true, bool _warning=true)
Add a set of Joints to this Group.
Definition Group.cpp:401
virtual ~Group()=default
Destructor.
bool addDof(DegreeOfFreedom *_dof, bool _addJoint=true, bool _warning=true)
Add a DegreeOfFreedom to this Group.
Definition Group.cpp:464
class Joint
Definition Joint.hpp:59
ReferentialSkeleton is a base class used to implement Linkage, Group, and other classes that are used...
Definition ReferentialSkeleton.hpp:48
std::shared_ptr< MetaSkeleton > MetaSkeletonPtr
Definition SmartPointer.hpp:68
std::shared_ptr< Group > GroupPtr
Definition SmartPointer.hpp:73
Definition BulletCollisionDetector.cpp:63