chrono::ChTransform< Real > Class Template Reference

## Description

### template<class Real = double> class chrono::ChTransform< Real >

ChTransform: a class for fast coordinate transformations in 3D space.

A coordinate system (a 'frame') has a translation and a rotation respect to a 'parent' coordinate system, usually the absolute (world) coordinates. This class implements useful static functions to perform the typical local->parent or parent->local transformations of points. Such functions are static, so you don't even need to instantiate a ChTransform object, you can just call functions in this way: ChTransform<>::SomeFunction(..)

#include <ChTransform.h>

## Static Public Member Functions

static ChVector< Real > TransformParentToLocal (const ChVector< Real > &parent, const ChVector< Real > &origin, const ChMatrix33< Real > &alignment)
This function transforms a point from the parent coordinate system to a local coordinate system, whose relative position is given by the 'origin' translation and 'alignment' rotation matrix. More...

static ChVector< Real > TransformLocalToParent (const ChVector< Real > &local, const ChVector< Real > &origin, const ChMatrix33< Real > &alignment)
This function transforms a point from the local reference frame to the parent reference frame. More...

static ChVector< Real > TransformParentToLocal (const ChVector< Real > &parent, const ChVector< Real > &origin, const ChQuaternion< Real > &alignment)
This function transforms a point from the parent coordinate system to a local coordinate system, whose relative position is given by the 'origin' translation and 'alignment' quaternion q. More...

static ChVector< Real > TransformLocalToParent (const ChVector< Real > &local, const ChVector< Real > &origin, const ChQuaternion< Real > &alignment)
This function transforms a point from the local coordinate system to the parent coordinate system. More...

## ◆ TransformLocalToParent() [1/2]

template<class Real = double>
 static ChVector chrono::ChTransform< Real >::TransformLocalToParent ( const ChVector< Real > & local, const ChVector< Real > & origin, const ChMatrix33< Real > & alignment )
inlinestatic

This function transforms a point from the local reference frame to the parent reference frame.

The relative attitude of the local reference frame with respect to the parent reference frame is given by the 'origin' translation and the 'alignment' rotation matrix. Since the function is static, you do not need a ChTransform object. For example, use it as: mresult=ChTransform<>::TransformLocalToParent(mloc, morig, malign). This function is optimized for fast execution.

Returns
The point in the parent reference frame, as parent = origin + [A]*(local)
Parameters
 local point to transform, given in local coordinates origin origin of frame respect to parent, in parent coords, alignment rotation of frame respect to parent, in parent coords.

## ◆ TransformLocalToParent() [2/2]

template<class Real = double>
 static ChVector chrono::ChTransform< Real >::TransformLocalToParent ( const ChVector< Real > & local, const ChVector< Real > & origin, const ChQuaternion< Real > & alignment )
inlinestatic

This function transforms a point from the local coordinate system to the parent coordinate system.

Relative position of local respect to parent is given by the 'origin' translation and 'alignment' quaternion rotation. Since the function is static, you do not need a ChTransform object, for example use it as: mresult=ChTransform<>::TransformLocalToParent(mloc, morig, malign)

Returns
The point in parent coordinate, as parent = origin + q'*(local)*q
Parameters
 local point to transform, given in local coordinates origin origin of frame respect to parent, in parent coords, alignment rotation of frame respect to parent, in parent coords.

## ◆ TransformParentToLocal() [1/2]

template<class Real = double>
 static ChVector chrono::ChTransform< Real >::TransformParentToLocal ( const ChVector< Real > & parent, const ChVector< Real > & origin, const ChMatrix33< Real > & alignment )
inlinestatic

This function transforms a point from the parent coordinate system to a local coordinate system, whose relative position is given by the 'origin' translation and 'alignment' rotation matrix.

Since the function is static, you do not need a ChTransform object, for example use it as: mresult=ChTransform<>::TransformParentToLocal(mpar, morig, malign) This function is optimized for fast execution.

Returns
The point in local coordinate, as local = [A]'*(parent-origin)
Parameters
 parent point to transform, given in parent coordinates; origin location of local frame with respect to parent, expressed in parent ref frame; alignment rotation of local frame with respect to parent, expressed in parent coords.

## ◆ TransformParentToLocal() [2/2]

template<class Real = double>
 static ChVector chrono::ChTransform< Real >::TransformParentToLocal ( const ChVector< Real > & parent, const ChVector< Real > & origin, const ChQuaternion< Real > & alignment )
inlinestatic

This function transforms a point from the parent coordinate system to a local coordinate system, whose relative position is given by the 'origin' translation and 'alignment' quaternion q.

Since the function is static, you do not need a ChTransform object, for example use it as: mresult=ChTransform<>::TransformParentToLocal(mpar, morig, malign)

Returns
The point in local coordinate, as local = q*[(parent-origin)]*q
Parameters
 parent point to transform, given in parent coordinates origin origin of frame respect to parent, in parent coords, alignment rotation of frame respect to parent, in parent coords.

The documentation for this class was generated from the following file:
• /builds/uwsbel/chrono/src/chrono/core/ChTransform.h