Biorbd
Public Member Functions | Protected Attributes | List of all members
biorbd::rigidbody::SegmentCharacteristics Class Reference

Characteristics of a segment, namely the mass, the center of mass, the inertia, the length and its mesh geometry. More...

#include <SegmentCharacteristics.h>

Inheritance diagram for biorbd::rigidbody::SegmentCharacteristics:

Public Member Functions

 SegmentCharacteristics ()
 Construct segment characteristics.
 
 SegmentCharacteristics (double mass, const biorbd::utils::Vector3d &com, const RigidBodyDynamics::Math::Matrix3d &inertia)
 Construct segment characteristics. More...
 
 SegmentCharacteristics (double mass, const biorbd::utils::Vector3d &com, const RigidBodyDynamics::Math::Matrix3d &inertia, const biorbd::rigidbody::Mesh &mesh)
 Construct segment characteristics. More...
 
biorbd::rigidbody::SegmentCharacteristics DeepCopy () const
 Deep copy of the segment characteristics. More...
 
void DeepCopy (const biorbd::rigidbody::SegmentCharacteristics &other)
 Copy the segment characteristics. More...
 
void setLength (const biorbd::utils::Scalar &val)
 Set the segment length. More...
 
const biorbd::utils::Scalar & length () const
 Returns the segment length. More...
 
double mass () const
 Returns the segment mass. More...
 
biorbd::utils::Vector3d CoM () const
 CoM Returns the position of the center of mass in the local reference frame. More...
 
void setCoM (const biorbd::utils::Vector3d &com)
 setCoM Change the position of the center of mass More...
 
const biorbd::rigidbody::Meshmesh () const
 Returns the segment mesh. More...
 
const RigidBodyDynamics::Math::Matrix3d & inertia () const
 Returns the segment inertia matrix. More...
 

Protected Attributes

std::shared_ptr< biorbd::utils::Scalar > m_length
 Length of the segment.
 
std::shared_ptr< biorbd::rigidbody::Meshm_mesh
 Mesh of the segment.
 

Detailed Description

Characteristics of a segment, namely the mass, the center of mass, the inertia, the length and its mesh geometry.

Definition at line 25 of file SegmentCharacteristics.h.

Constructor & Destructor Documentation

◆ SegmentCharacteristics() [1/2]

biorbd::rigidbody::SegmentCharacteristics::SegmentCharacteristics ( double  mass,
const biorbd::utils::Vector3d com,
const RigidBodyDynamics::Math::Matrix3d &  inertia 
)

Construct segment characteristics.

Parameters
massThe mass of the segment
comThe position of the center of Mass
inertiaThe inertia matrix

Definition at line 15 of file SegmentCharacteristics.cpp.

◆ SegmentCharacteristics() [2/2]

biorbd::rigidbody::SegmentCharacteristics::SegmentCharacteristics ( double  mass,
const biorbd::utils::Vector3d com,
const RigidBodyDynamics::Math::Matrix3d &  inertia,
const biorbd::rigidbody::Mesh mesh 
)

Construct segment characteristics.

Parameters
massThe mass of the segment
comThe position of the center of Mass
inertiaThe inertia matrix
meshThe mesh geometry of the segment

Definition at line 25 of file SegmentCharacteristics.cpp.

Member Function Documentation

◆ CoM()

biorbd::utils::Vector3d biorbd::rigidbody::SegmentCharacteristics::CoM ( ) const

CoM Returns the position of the center of mass in the local reference frame.

Returns
The position of the center of mass in the local reference frame

Definition at line 67 of file SegmentCharacteristics.cpp.

◆ DeepCopy() [1/2]

biorbd::rigidbody::SegmentCharacteristics biorbd::rigidbody::SegmentCharacteristics::DeepCopy ( ) const

Deep copy of the segment characteristics.

Returns
Copy of the segment characteristics

Definition at line 37 of file SegmentCharacteristics.cpp.

◆ DeepCopy() [2/2]

void biorbd::rigidbody::SegmentCharacteristics::DeepCopy ( const biorbd::rigidbody::SegmentCharacteristics other)

Copy the segment characteristics.

Parameters
otherThe characteristics to copy

Definition at line 44 of file SegmentCharacteristics.cpp.

◆ inertia()

const RigidBodyDynamics::Math::Matrix3d & biorbd::rigidbody::SegmentCharacteristics::inertia ( ) const

Returns the segment inertia matrix.

Returns
The segment inertia matrix

Definition at line 83 of file SegmentCharacteristics.cpp.

◆ length()

const biorbd::utils::Scalar & biorbd::rigidbody::SegmentCharacteristics::length ( ) const

Returns the segment length.

Returns
The segment length

Definition at line 57 of file SegmentCharacteristics.cpp.

◆ mass()

double biorbd::rigidbody::SegmentCharacteristics::mass ( ) const

Returns the segment mass.

Returns
The segment mass

Definition at line 62 of file SegmentCharacteristics.cpp.

◆ mesh()

const biorbd::rigidbody::Mesh & biorbd::rigidbody::SegmentCharacteristics::mesh ( ) const

Returns the segment mesh.

Returns
The segment mesh

Definition at line 78 of file SegmentCharacteristics.cpp.

◆ setCoM()

void biorbd::rigidbody::SegmentCharacteristics::setCoM ( const biorbd::utils::Vector3d com)

setCoM Change the position of the center of mass

Parameters
comThe new position for the CoM

Definition at line 72 of file SegmentCharacteristics.cpp.

◆ setLength()

void biorbd::rigidbody::SegmentCharacteristics::setLength ( const biorbd::utils::Scalar &  val)

Set the segment length.

Parameters
valValue of the new length

Definition at line 51 of file SegmentCharacteristics.cpp.


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