Biorbd Release_1.13.0
Loading...
Searching...
No Matches
BIORBD_NAMESPACE::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_NAMESPACE::rigidbody::SegmentCharacteristics:

Public Member Functions

 SegmentCharacteristics ()
 Construct segment characteristics.
 SegmentCharacteristics (const utils::Scalar &mass, const utils::Vector3d &com, const utils::Matrix3d &inertia)
 Construct segment characteristics.
 SegmentCharacteristics (const utils::Scalar &mass, const utils::Vector3d &com, const utils::Matrix3d &inertia, const Mesh &mesh)
 Construct segment characteristics.
SegmentCharacteristics DeepCopy () const
 Deep copy of the segment characteristics.
void DeepCopy (const SegmentCharacteristics &other)
 Copy the segment characteristics.
void setLength (const utils::Scalar &val)
 Set the segment length.
utils::Scalar length () const
 Returns the segment length.
void setMass (const utils::Scalar &newMass)
 Set the new mass.
utils::Scalar mass () const
 Returns the segment mass.
utils::Vector3d CoM () const
 CoM Returns the position of the center of mass in the local reference frame.
void setCoM (const utils::Vector3d &com)
 setCoM Change the position of the center of mass
Mesh & mesh ()
 Returns the segment mesh.
const Mesh & mesh () const
 Returns the segment mesh.
const utils::Matrix3d inertia () const
 Returns the segment inertia matrix.
void setInertia (const utils::Matrix3d &inertia)
 Set the matrix of inertia.

Protected Attributes

std::shared_ptr< utils::Scalar > m_length
 Length of the segment.
std::shared_ptr< Mesh > m_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 28 of file SegmentCharacteristics.h.

Constructor & Destructor Documentation

◆ SegmentCharacteristics() [1/3]

rigidbody::SegmentCharacteristics::SegmentCharacteristics ( )

Construct segment characteristics.

Definition at line 12 of file SegmentCharacteristics.cpp.

◆ SegmentCharacteristics() [2/3]

rigidbody::SegmentCharacteristics::SegmentCharacteristics ( const utils::Scalar & mass,
const utils::Vector3d & com,
const utils::Matrix3d & inertia )

Construct segment characteristics.

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

Definition at line 16 of file SegmentCharacteristics.cpp.

◆ SegmentCharacteristics() [3/3]

rigidbody::SegmentCharacteristics::SegmentCharacteristics ( const utils::Scalar & mass,
const utils::Vector3d & com,
const utils::Matrix3d & inertia,
const 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 23 of file SegmentCharacteristics.cpp.

Member Function Documentation

◆ CoM()

utils::Vector3d 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 60 of file SegmentCharacteristics.cpp.

◆ DeepCopy() [1/2]

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

Deep copy of the segment characteristics.

Returns
Copy of the segment characteristics

Definition at line 32 of file SegmentCharacteristics.cpp.

◆ DeepCopy() [2/2]

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

Copy the segment characteristics.

Parameters
otherThe characteristics to copy

Definition at line 39 of file SegmentCharacteristics.cpp.

◆ inertia()

const utils::Matrix3d rigidbody::SegmentCharacteristics::inertia ( ) const

Returns the segment inertia matrix.

Returns
The segment inertia matrix

Definition at line 74 of file SegmentCharacteristics.cpp.

◆ length()

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

Returns the segment length.

Returns
The segment length

Definition at line 50 of file SegmentCharacteristics.cpp.

◆ mass()

utils::Scalar rigidbody::SegmentCharacteristics::mass ( ) const

Returns the segment mass.

Returns
The segment mass

Definition at line 58 of file SegmentCharacteristics.cpp.

◆ mesh() [1/2]

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

Returns the segment mesh.

Returns
The segment mesh

Definition at line 68 of file SegmentCharacteristics.cpp.

◆ mesh() [2/2]

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

Returns the segment mesh.

Returns
The segment mesh

Definition at line 70 of file SegmentCharacteristics.cpp.

◆ setCoM()

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

setCoM Change the position of the center of mass

Parameters
comThe new position for the CoM

Definition at line 64 of file SegmentCharacteristics.cpp.

◆ setInertia()

void rigidbody::SegmentCharacteristics::setInertia ( const utils::Matrix3d & inertia)

Set the matrix of inertia.

Parameters
inertiaThe new matrix of inertia

Definition at line 78 of file SegmentCharacteristics.cpp.

◆ setLength()

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

Set the segment length.

Parameters
valValue of the new length

Definition at line 46 of file SegmentCharacteristics.cpp.

◆ setMass()

void rigidbody::SegmentCharacteristics::setMass ( const utils::Scalar & newMass)

Set the new mass.

Parameters
newMassThe new mass

Definition at line 54 of file SegmentCharacteristics.cpp.

Member Data Documentation

◆ m_length

std::shared_ptr<utils::Scalar> BIORBD_NAMESPACE::rigidbody::SegmentCharacteristics::m_length
protected

Length of the segment.

Definition at line 135 of file SegmentCharacteristics.h.

◆ m_mesh

std::shared_ptr<Mesh> BIORBD_NAMESPACE::rigidbody::SegmentCharacteristics::m_mesh
protected

Mesh of the segment.

Definition at line 136 of file SegmentCharacteristics.h.


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