chrono::ChInertiaUtils Class Reference

Description

Class with some static functions that can be used to make computations with inertia tensors.

#include <ChInertiaUtils.h>

Static Public Member Functions

static void InertiaFromCluster (const std::vector< ChVector<> > &positions, const std::vector< ChMatrix33<> > &rotations, const std::vector< ChMatrix33<> > &Jlocal, const std::vector< double > &masses, ChMatrix33<> &totJ, double &totmass, ChVector<> &baricenter)
 Given a cluster of bodies, each with local inertia tensor, and position and rotation respect to absolute coordinates, compute the total mass, the baricenter and the inertia tensor of the cluster. More...
 
static void RotateInertia (const ChMatrix33<> inertiaIn, const ChMatrix33<> R, ChMatrix33<> &inertiaOut)
 Rotate an inertia tensor ,given a rotation matrix R.
 
static void TranslateInertia (const ChMatrix33<> inertiaIn, const ChVector<> dist, const double mass, ChMatrix33<> &inertiaOut)
 Translate an inertia tensor to a non-barycentric reference, given a displacement 'dist', using the Huygens-Steiner parallel axis theorem. More...
 

Member Function Documentation

static void chrono::ChInertiaUtils::InertiaFromCluster ( const std::vector< ChVector<> > &  positions,
const std::vector< ChMatrix33<> > &  rotations,
const std::vector< ChMatrix33<> > &  Jlocal,
const std::vector< double > &  masses,
ChMatrix33<> &  totJ,
double &  totmass,
ChVector<> &  baricenter 
)
static

Given a cluster of bodies, each with local inertia tensor, and position and rotation respect to absolute coordinates, compute the total mass, the baricenter and the inertia tensor of the cluster.

Note: the resulting total inertia tensor is expressed in absolute coordinates Note: we assume that body masses are not overlapping Note: we assume that all local inertias are expressed in body local coords Note: we assume that all local inertias are expressed relative to body baricenter

static void chrono::ChInertiaUtils::TranslateInertia ( const ChMatrix33<>  inertiaIn,
const ChVector<>  dist,
const double  mass,
ChMatrix33<> &  inertiaOut 
)
static

Translate an inertia tensor to a non-barycentric reference, given a displacement 'dist', using the Huygens-Steiner parallel axis theorem.