SOFA API  d3aee470
Open source framework for multi-physics simuation
sofa::core::behavior::ConstraintGroup Class Reference

#include <BaseLMConstraint.h>

Intern storage of the constraints. a ConstraintGroup is a list of equations that will be solved together. They are defined by a ConstOrder(position, velocity or acceleration) More...

Detailed Description

Intern storage of the constraints. a ConstraintGroup is a list of equations that will be solved together. They are defined by a ConstOrder(position, velocity or acceleration)

See also
ConstraintEquation
ConstOrder

Protected Attributes

ConstraintParams::ConstOrder Order
 
VecEquations equations
 
bool active
 

Public Member Functions

 ConstraintGroup (ConstraintParams::ConstOrder idConstraint)
 
void addConstraint (unsigned int &constraintId, unsigned int idx, SReal c)
 
const ConstraintEquationgetConstraint (const unsigned int i) const
 Random Access to an equation. More...
 
ConstraintEquationgetConstraint (const unsigned int i)
 
std::pair< EquationConstIterator, EquationConstIteratordata () const
 Retrieve all the equations. More...
 
std::pair< EquationIterator, EquationIteratordata ()
 
std::size_t getNumConstraint () const
 Return the number of constraint contained in this group. More...
 
ConstraintParams::ConstOrder getOrder () const
 
bool isActive () const
 
void setActive (bool b)
 

Attribute details

bool sofa::core::behavior::ConstraintGroup::active
protected
VecEquations sofa::core::behavior::ConstraintGroup::equations
protected
ConstraintParams::ConstOrder sofa::core::behavior::ConstraintGroup::Order
protected

Order of the constraint

See also
ConstOrder

Constructor details

sofa::core::behavior::ConstraintGroup::ConstraintGroup ( ConstraintParams::ConstOrder  idConstraint)

Function details

void sofa::core::behavior::ConstraintGroup::addConstraint ( unsigned int constraintId,
unsigned int  idx,
SReal  c 
)

Method to add an interaction constraint to the group

Parameters
idxindex of the equation
ccorrection we need to apply in order to solve the constraint
std::pair< EquationConstIterator,EquationConstIterator> sofa::core::behavior::ConstraintGroup::data ( ) const
inline

Retrieve all the equations.

std::pair< EquationIterator,EquationIterator > sofa::core::behavior::ConstraintGroup::data ( )
inline
const ConstraintEquation& sofa::core::behavior::ConstraintGroup::getConstraint ( const unsigned int  i) const
inline

Random Access to an equation.

ConstraintEquation& sofa::core::behavior::ConstraintGroup::getConstraint ( const unsigned int  i)
inline
std::size_t sofa::core::behavior::ConstraintGroup::getNumConstraint ( ) const
inline

Return the number of constraint contained in this group.

ConstraintParams::ConstOrder sofa::core::behavior::ConstraintGroup::getOrder ( ) const
inline

Return the order of the constraint

See also
ConstOrder
bool sofa::core::behavior::ConstraintGroup::isActive ( ) const
inline
void sofa::core::behavior::ConstraintGroup::setActive ( bool  b)
inline