Biorbd Release_1.13.0
Loading...
Searching...
No Matches
BIORBD_NAMESPACE::rigidbody::SoftContacts Class Reference

Holder for the biorbd contact set. More...

#include <SoftContacts.h>

Inheritance diagram for BIORBD_NAMESPACE::rigidbody::SoftContacts:
BIORBD_NAMESPACE::Model

Public Member Functions

 SoftContacts ()
 Construct a contact biorbd set.
virtual ~SoftContacts ()
 Virtual destructor.
SoftContacts DeepCopy () const
 Deep copy of the contacts.
void DeepCopy (const SoftContacts &other)
 Deep copy of the contacts.
utils::String softContactName (size_t i)
 Return the name of the soft contact.
std::vector< utils::String > softContactNames ()
 Return the names of the soft contact.
void addSoftContact (const SoftContactNode &contact)
 Add a new contact to the contact set.
SoftContactNode & softContact (size_t idx)
 Return a specified contact.
NodeSegment softContact (const GeneralizedCoordinates &Q, size_t idx, bool updateKin=true)
 Return a specified contact at a given position Q.
std::vector< NodeSegment > softContacts (const GeneralizedCoordinates &Q, bool updateKin=true)
 Return a the contacts at a given position Q.
NodeSegment softContactVelocity (const GeneralizedCoordinates &Q, const GeneralizedVelocity &Qdot, size_t idx, bool updateKin=true)
 Return the linear velocity of a contact.
NodeSegment softContactAngularVelocity (const GeneralizedCoordinates &Q, const GeneralizedVelocity &Qdot, size_t idx, bool updateKin=true)
 Return the angular velocity of a contact.
std::vector< NodeSegment > softContactsVelocity (const GeneralizedCoordinates &Q, const GeneralizedVelocity &Qdot, bool updateKin=true)
 Return the velocity of all the contacts.
std::vector< NodeSegment > softContactsAngularVelocity (const GeneralizedCoordinates &Q, const GeneralizedVelocity &Qdot, bool updateKin=true)
 Return the angular velocity of all the contacts.
size_t nbSoftContacts () const
 Return the number of contacts.
std::vector< size_t > segmentSoftContactIdx (size_t idx) const
 Return all the soft contacts indices of a segment.

Protected Attributes

std::shared_ptr< std::vector< std::shared_ptr< SoftContactNode > > > m_softContacts
 The contacts.

Detailed Description

Holder for the biorbd contact set.

Definition at line 25 of file SoftContacts.h.

Constructor & Destructor Documentation

◆ SoftContacts()

rigidbody::SoftContacts::SoftContacts ( )

Construct a contact biorbd set.

Definition at line 17 of file SoftContacts.cpp.

◆ ~SoftContacts()

virtual BIORBD_NAMESPACE::rigidbody::SoftContacts::~SoftContacts ( )
inlinevirtual

Virtual destructor.

Definition at line 35 of file SoftContacts.h.

Member Function Documentation

◆ addSoftContact()

void rigidbody::SoftContacts::addSoftContact ( const SoftContactNode & contact)

Add a new contact to the contact set.

Parameters
contactThe contact to add

Definition at line 52 of file SoftContacts.cpp.

◆ DeepCopy() [1/2]

rigidbody::SoftContacts rigidbody::SoftContacts::DeepCopy ( ) const

Deep copy of the contacts.

Returns
Deep copy of the contacts

Definition at line 21 of file SoftContacts.cpp.

◆ DeepCopy() [2/2]

void rigidbody::SoftContacts::DeepCopy ( const SoftContacts & other)

Deep copy of the contacts.

Parameters
otherThe contacts to copy from

Definition at line 27 of file SoftContacts.cpp.

◆ nbSoftContacts()

size_t rigidbody::SoftContacts::nbSoftContacts ( ) const

Return the number of contacts.

Returns
The number of contacts

Definition at line 148 of file SoftContacts.cpp.

◆ segmentSoftContactIdx()

std::vector< size_t > rigidbody::SoftContacts::segmentSoftContactIdx ( size_t idx) const

Return all the soft contacts indices of a segment.

Parameters
idxThe index of the segment
Returns
All the soft contacts of a segment

Definition at line 152 of file SoftContacts.cpp.

◆ softContact() [1/2]

rigidbody::NodeSegment rigidbody::SoftContacts::softContact ( const GeneralizedCoordinates & Q,
size_t idx,
bool updateKin = true )

Return a specified contact at a given position Q.

Parameters
QThe generalized coordinates
idxThe index of the marker
updateKinIf the model should be updated
Returns
The contact of index idx

Definition at line 67 of file SoftContacts.cpp.

◆ softContact() [2/2]

rigidbody::SoftContactNode & rigidbody::SoftContacts::softContact ( size_t idx)

Return a specified contact.

Parameters
idxThe index of the marker
Returns
The contact of index idx

Definition at line 63 of file SoftContacts.cpp.

◆ softContactAngularVelocity()

rigidbody::NodeSegment rigidbody::SoftContacts::softContactAngularVelocity ( const GeneralizedCoordinates & Q,
const GeneralizedVelocity & Qdot,
size_t idx,
bool updateKin = true )

Return the angular velocity of a contact.

Parameters
QThe generalized coordinates
QdotThe generalized velocities
idxThe index of the marker in the contact set
updateKinIf the model should be updated
Returns
The angular velocity of the contact

Definition at line 105 of file SoftContacts.cpp.

◆ softContactName()

utils::String rigidbody::SoftContacts::softContactName ( size_t i)

Return the name of the soft contact.

Parameters
iThe index of the contact
Returns
The name of the soft contact

Definition at line 40 of file SoftContacts.cpp.

◆ softContactNames()

std::vector< utils::String > rigidbody::SoftContacts::softContactNames ( )

Return the names of the soft contact.

Returns
The names of the soft contact

Definition at line 44 of file SoftContacts.cpp.

◆ softContacts()

std::vector< rigidbody::NodeSegment > rigidbody::SoftContacts::softContacts ( const GeneralizedCoordinates & Q,
bool updateKin = true )

Return a the contacts at a given position Q.

Parameters
QThe generalized coordinates
updateKinIf the model should be updated
Returns
The contacts

Definition at line 78 of file SoftContacts.cpp.

◆ softContactsAngularVelocity()

std::vector< rigidbody::NodeSegment > rigidbody::SoftContacts::softContactsAngularVelocity ( const GeneralizedCoordinates & Q,
const GeneralizedVelocity & Qdot,
bool updateKin = true )

Return the angular velocity of all the contacts.

Parameters
QThe generalized coordinates
QdotThe generalized velocities
updateKinIf the model should be updated
Returns
The angular velocity of all the contacts

Definition at line 135 of file SoftContacts.cpp.

◆ softContactsVelocity()

std::vector< rigidbody::NodeSegment > rigidbody::SoftContacts::softContactsVelocity ( const GeneralizedCoordinates & Q,
const GeneralizedVelocity & Qdot,
bool updateKin = true )

Return the velocity of all the contacts.

Parameters
QThe generalized coordinates
QdotThe generalized velocities
updateKinIf the model should be updated
Returns
The velocity of all the contacts

Definition at line 121 of file SoftContacts.cpp.

◆ softContactVelocity()

rigidbody::NodeSegment rigidbody::SoftContacts::softContactVelocity ( const GeneralizedCoordinates & Q,
const GeneralizedVelocity & Qdot,
size_t idx,
bool updateKin = true )

Return the linear velocity of a contact.

Parameters
QThe generalized coordinates
QdotThe generalized velocities
idxThe index of the marker in the contact set
updateKinIf the model should be updated
Returns
The linear velocity of the contact

Definition at line 91 of file SoftContacts.cpp.

Member Data Documentation

◆ m_softContacts

std::shared_ptr<std::vector<std::shared_ptr<SoftContactNode> > > BIORBD_NAMESPACE::rigidbody::SoftContacts::m_softContacts
protected

The contacts.

Definition at line 164 of file SoftContacts.h.


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