cisst-saw
Loading...
Searching...
No Matches
robMass Class Reference

#include <robMass.h>

Public Types

enum  Errno { ESUCCESS , EFAILURE }

Public Member Functions

vctFixedSizeMatrix< double, 3, 3 > ParallelAxis (double m, const vctFixedSizeVector< double, 3 > &t, const vctFixedSizeMatrix< double, 3, 3 > &I) const
 Parallel Axis Theorem.
 robMass ()
 Default constructor.
 robMass (double m, const vctFixedSizeVector< double, 3 > &com, const vctFixedSizeMatrix< double, 3, 3 > &D, const vctFixedSizeMatrix< double, 3, 3 > &V)
const double & Mass (void) const
 Return the mass.
double & Mass (void)
vctFixedSizeVector< double, 3 > CenterOfMass () const
 Return the center of mass.
vctFixedSizeMatrix< double, 3, 3 > MomentOfInertia () const
 Return the moment of inertia tensor in the body frame.
vctFixedSizeMatrix< double, 3, 3 > MomentOfInertiaAtCOM () const
robMass::Errno ReadMass (std::istream &is)
 Read the mass from a input stream.
robMass::Errno WriteMass (std::ostream &os) const
 Write the mass from a output stream.

Member Enumeration Documentation

◆ Errno

Enumerator
ESUCCESS 
EFAILURE 

Constructor & Destructor Documentation

◆ robMass() [1/2]

robMass::robMass ( )

Default constructor.

Set the mass, center of mass and inertia to zero

◆ robMass() [2/2]

robMass::robMass ( double m,
const vctFixedSizeVector< double, 3 > & com,
const vctFixedSizeMatrix< double, 3, 3 > & D,
const vctFixedSizeMatrix< double, 3, 3 > & V )

Member Function Documentation

◆ CenterOfMass()

vctFixedSizeVector< double, 3 > robMass::CenterOfMass ( ) const

Return the center of mass.

Return the center of mass. The center of mass is expressed in the coordinate frame of the body.

Returns
A 3D vector representing the center of mass

◆ Mass() [1/2]

double & robMass::Mass ( void )

◆ Mass() [2/2]

const double & robMass::Mass ( void ) const

Return the mass.

Returns
The mass of the body

◆ MomentOfInertia()

vctFixedSizeMatrix< double, 3, 3 > robMass::MomentOfInertia ( ) const

Return the moment of inertia tensor in the body frame.

Return the moment of inertia tensor. The tensor is with respect to the coordinate frame of the body which does not necessarily coincide with the center of mass of the body and the principal axes.

Returns
A 3x3 moment of inertia tensor

◆ MomentOfInertiaAtCOM()

vctFixedSizeMatrix< double, 3, 3 > robMass::MomentOfInertiaAtCOM ( ) const

◆ ParallelAxis()

vctFixedSizeMatrix< double, 3, 3 > robMass::ParallelAxis ( double m,
const vctFixedSizeVector< double, 3 > & t,
const vctFixedSizeMatrix< double, 3, 3 > & I ) const

Parallel Axis Theorem.

Finds the moment of inertia with respect to a parallel axis

◆ ReadMass()

robMass::Errno robMass::ReadMass ( std::istream & is)

Read the mass from a input stream.

◆ WriteMass()

robMass::Errno robMass::WriteMass ( std::ostream & os) const

Write the mass from a output stream.


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