DART  6.10.1
dart::constraint::ConstrainedGroup Class Reference

ConstrainedGroup is a group of skeletons that interact each other with constraints. More...

#include <ConstrainedGroup.hpp>

Public Member Functions

 ConstrainedGroup ()
 Default contructor. More...
 
virtual ~ConstrainedGroup ()
 Destructor. More...
 
void addConstraint (const ConstraintBasePtr &_constraint)
 Add constraint. More...
 
std::size_t getNumConstraints () const
 Return number of constraints in this constrained group. More...
 
ConstraintBasePtr getConstraint (std::size_t _index)
 Return a constraint. More...
 
ConstConstraintBasePtr getConstraint (std::size_t _index) const
 Return a constraint. More...
 
void removeConstraint (const ConstraintBasePtr &_constraint)
 Remove constraint. More...
 
void removeAllConstraints ()
 Remove all constraints. More...
 
std::size_t getTotalDimension () const
 Get total dimension of contraints in this group. More...
 

Private Member Functions

bool containConstraint (const ConstConstraintBasePtr &_constraint) const
 Return true if _constraint is contained. More...
 

Private Attributes

std::vector< ConstraintBasePtrmConstraints
 List of constraints. More...
 
std::shared_ptr< dynamics::SkeletonmRootSkeleton
 

Friends

class ConstraintSolver
 

Detailed Description

ConstrainedGroup is a group of skeletons that interact each other with constraints.

See also
class ConstraintSolver

Constructor & Destructor Documentation

◆ ConstrainedGroup()

dart::constraint::ConstrainedGroup::ConstrainedGroup ( )

Default contructor.

◆ ~ConstrainedGroup()

dart::constraint::ConstrainedGroup::~ConstrainedGroup ( )
virtual

Destructor.

Member Function Documentation

◆ addConstraint()

void dart::constraint::ConstrainedGroup::addConstraint ( const ConstraintBasePtr _constraint)

Add constraint.

◆ containConstraint()

bool dart::constraint::ConstrainedGroup::containConstraint ( const ConstConstraintBasePtr _constraint) const
private

Return true if _constraint is contained.

◆ getConstraint() [1/2]

ConstraintBasePtr dart::constraint::ConstrainedGroup::getConstraint ( std::size_t  _index)

Return a constraint.

◆ getConstraint() [2/2]

ConstConstraintBasePtr dart::constraint::ConstrainedGroup::getConstraint ( std::size_t  _index) const

Return a constraint.

◆ getNumConstraints()

std::size_t dart::constraint::ConstrainedGroup::getNumConstraints ( ) const

Return number of constraints in this constrained group.

◆ getTotalDimension()

std::size_t dart::constraint::ConstrainedGroup::getTotalDimension ( ) const

Get total dimension of contraints in this group.

◆ removeAllConstraints()

void dart::constraint::ConstrainedGroup::removeAllConstraints ( )

Remove all constraints.

◆ removeConstraint()

void dart::constraint::ConstrainedGroup::removeConstraint ( const ConstraintBasePtr _constraint)

Remove constraint.

Friends And Related Function Documentation

◆ ConstraintSolver

friend class ConstraintSolver
friend

Member Data Documentation

◆ mConstraints

std::vector<ConstraintBasePtr> dart::constraint::ConstrainedGroup::mConstraints
private

List of constraints.

◆ mRootSkeleton

std::shared_ptr<dynamics::Skeleton> dart::constraint::ConstrainedGroup::mRootSkeleton
private