Biorbd
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
biorbd::muscles::Compound Class Referenceabstract

Class compound is a very generic definition of what a muscle is. It should be the base class of every muscles. More...

#include <Compound.h>

Inheritance diagram for biorbd::muscles::Compound:
biorbd::muscles::Muscle biorbd::muscles::HillType biorbd::muscles::IdealizedActuator biorbd::muscles::HillThelenType biorbd::muscles::HillThelenTypeFatigable

Public Member Functions

 Compound ()
 Construct muscle compound.
 
 Compound (const biorbd::utils::String &name)
 Construct compound. More...
 
 Compound (const biorbd::utils::String &name, const biorbd::muscles::PathModifiers &pathModifiers)
 Construct compound. More...
 
 Compound (const biorbd::muscles::Compound &other)
 Construct compound from another muscle. More...
 
 Compound (const std::shared_ptr< biorbd::muscles::Compound > other)
 Construct compound from another muscle. More...
 
virtual ~Compound ()
 Destroy class properly.
 
void DeepCopy (const biorbd::muscles::Compound &other)
 Deep copy of a compound. More...
 
void setName (const biorbd::utils::String &name)
 Set the name of a muscle. More...
 
const biorbd::utils::Stringname () const
 Return the name of the muscle. More...
 
biorbd::muscles::MUSCLE_TYPE type () const
 Return the type of the muscle. More...
 
const biorbd::muscles::PathModifierspathModifier ()
 Return the path modifier. More...
 
void addPathObject (biorbd::utils::Vector3d &wrap)
 Add a path modifier object. More...
 
virtual const biorbd::utils::Scalar & force ()
 Return the last computed muscle force norm. More...
 
virtual const biorbd::utils::Scalar & force (const biorbd::muscles::State &emg)=0
 Computes and returns the forces norm from the EMG. More...
 
virtual const biorbd::utils::Scalar & force (biorbd::rigidbody::Joints &model, const biorbd::rigidbody::GeneralizedCoordinates &Q, const biorbd::rigidbody::GeneralizedVelocity &Qdot, const biorbd::muscles::State &emg, int updateKin=2)=0
 Return the computed force norm from EMG. More...
 
virtual const biorbd::utils::Scalar & force (biorbd::rigidbody::Joints &model, const biorbd::rigidbody::GeneralizedCoordinates &Q, const biorbd::muscles::State &emg, int updateKin=2)=0
 Return the computed force norm from EMG. More...
 

Protected Member Functions

virtual void setType ()=0
 Set the type of muscle.
 

Protected Attributes

std::shared_ptr< biorbd::utils::Stringm_name
 The name of the muscle.
 
std::shared_ptr< biorbd::muscles::MUSCLE_TYPE > m_type
 The type of muscle.
 
std::shared_ptr< biorbd::muscles::PathModifiersm_pathChanger
 The set of path modifiers.
 
std::shared_ptr< biorbd::utils::Scalar > m_force
 The last computed force.
 

Detailed Description

Class compound is a very generic definition of what a muscle is. It should be the base class of every muscles.

Definition at line 29 of file Compound.h.

Constructor & Destructor Documentation

◆ Compound() [1/4]

biorbd::muscles::Compound::Compound ( const biorbd::utils::String name)

Construct compound.

Parameters
nameName of the compound

Definition at line 20 of file Compound.cpp.

◆ Compound() [2/4]

biorbd::muscles::Compound::Compound ( const biorbd::utils::String name,
const biorbd::muscles::PathModifiers pathModifiers 
)

Construct compound.

Parameters
nameName of the compound
pathModifiersThe set of path modifiers

Definition at line 29 of file Compound.cpp.

◆ Compound() [3/4]

biorbd::muscles::Compound::Compound ( const biorbd::muscles::Compound other)

Construct compound from another muscle.

Parameters
otherThe muscle to shallow copy

Definition at line 40 of file Compound.cpp.

◆ Compound() [4/4]

biorbd::muscles::Compound::Compound ( const std::shared_ptr< biorbd::muscles::Compound other)

Construct compound from another muscle.

Parameters
otherThe muscle to shallow copy

Definition at line 50 of file Compound.cpp.

Member Function Documentation

◆ addPathObject()

void biorbd::muscles::Compound::addPathObject ( biorbd::utils::Vector3d wrap)

Add a path modifier object.

Parameters
wrapPosition of the object

Definition at line 92 of file Compound.cpp.

◆ DeepCopy()

void biorbd::muscles::Compound::DeepCopy ( const biorbd::muscles::Compound other)

Deep copy of a compound.

Parameters
otherCompound to copy

Definition at line 65 of file Compound.cpp.

◆ force() [1/4]

const biorbd::utils::Scalar & biorbd::muscles::Compound::force ( )
virtual

Return the last computed muscle force norm.

Returns
The last computed muscle force norm

Definition at line 96 of file Compound.cpp.

◆ force() [2/4]

virtual const biorbd::utils::Scalar& biorbd::muscles::Compound::force ( biorbd::rigidbody::Joints model,
const biorbd::rigidbody::GeneralizedCoordinates Q,
const biorbd::muscles::State emg,
int  updateKin = 2 
)
pure virtual

Return the computed force norm from EMG.

Parameters
modelThe joints model
QThe generalized coordinates of the model
emgEMG data
updateKinUpdate kinematics (0: don't update, 1:only muscles, [2: both kinematics and muscles])
Returns
The computed force from EMG

Implemented in biorbd::muscles::HillType, and biorbd::muscles::IdealizedActuator.

◆ force() [3/4]

virtual const biorbd::utils::Scalar& biorbd::muscles::Compound::force ( biorbd::rigidbody::Joints model,
const biorbd::rigidbody::GeneralizedCoordinates Q,
const biorbd::rigidbody::GeneralizedVelocity Qdot,
const biorbd::muscles::State emg,
int  updateKin = 2 
)
pure virtual

Return the computed force norm from EMG.

Parameters
modelThe joints model
QThe generalized coordinates of the model
QdotThe generalized velocities of the model
emgEMG data
updateKinUpdate kinematics (0: don't update, 1:only muscles, [2: both kinematics and muscles])
Returns
The computed force from EMG

Implemented in biorbd::muscles::HillType, and biorbd::muscles::IdealizedActuator.

◆ force() [4/4]

virtual const biorbd::utils::Scalar& biorbd::muscles::Compound::force ( const biorbd::muscles::State emg)
pure virtual

Computes and returns the forces norm from the EMG.

Parameters
emgEMG data
Returns
The computed forces from the EMG

Implemented in biorbd::muscles::HillType, and biorbd::muscles::IdealizedActuator.

◆ name()

const biorbd::utils::String & biorbd::muscles::Compound::name ( ) const

Return the name of the muscle.

Returns
The name of the muscle

Definition at line 73 of file Compound.cpp.

◆ pathModifier()

const biorbd::muscles::PathModifiers & biorbd::muscles::Compound::pathModifier ( )

Return the path modifier.

Returns
The path modifier

Definition at line 88 of file Compound.cpp.

◆ setName()

void biorbd::muscles::Compound::setName ( const biorbd::utils::String name)

Set the name of a muscle.

Parameters
nameName of the muscle

Definition at line 78 of file Compound.cpp.

◆ type()

biorbd::muscles::MUSCLE_TYPE biorbd::muscles::Compound::type ( ) const

Return the type of the muscle.

Returns
The type of the muscle

Definition at line 83 of file Compound.cpp.


The documentation for this class was generated from the following files: