Project Chrono: chrono::ChCoordsys< Real > Class Template Reference

Public Member Functions | Public Attributes | List of all members
chrono::ChCoordsys< Real > Class Template Reference

## Description

template<class Real = double>
class chrono::ChCoordsys< Real >

Representation of a transform with translation and rotation.

A 'coordinate system' contains both translational variable (the origin of the axis) and rotational variable (the unit quaternion which represent the special-orthogonal transformation matrix). Basic features for point-coordinate transformations are provided.

See Coordinate Systems manual page.

`#include <ChCoordsys.h>`

Collaboration diagram for chrono::ChCoordsys< Real >:
[legend]

## Public Member Functions
| ChCoordsys (const ChVector3< Real > &v, const ChQuaternion< Real > &q=ChQuaternion< Real >(1, 0, 0, 0))
| ChCoordsys (const ChVector3< Real > &v, const Real alpha, const ChVector3< Real > &u)
| ChCoordsys (const ChCoordsys< Real > &other)
| Copy constructor.
template<typename Derived>
| ChCoordsys (const Eigen::MatrixBase< Derived > &vec, typename std::enable_if<(Derived::MaxRowsAtCompileTime==1||Derived::MaxColsAtCompileTime==1), Derived >::type *=0)
| Construct a coordinate system from an Eigen vector expression.
template<typename Derived>
ChCoordsys & | operator= (const Eigen::MatrixBase< Derived > &vec)
| Assign an Eigen vector expression to this coordinate system.
ChCoordsys< Real > & | operator= (const ChCoordsys< Real > &other)
| Assignment operator: copy from another coordinate system.
bool | operator<= (const ChCoordsys< Real > &other) const
bool | operator>= (const ChCoordsys< Real > &other) const
bool | operator== (const ChCoordsys< Real > &other) const
bool | operator!= (const ChCoordsys< Real > &other) const
ChCoordsys< Real > | operator>> (const ChCoordsys< Real > &F) const
| Transform another coordinate system through this coordinate system.
ChCoordsys< Real > | operator* (const ChCoordsys< Real > &F) const
| Transform another coordinate system through this coordinate system.
ChVector3< Real > | operator/ (const ChVector3< Real > &v) const
| Transform a vector through this coordinate system (express from parent coordinate system).
ChCoordsys< Real > & | operator>>= (const ChCoordsys< Real > &F)
| Transform this coordinate system by pre-multiplication with another coordinate system.
ChCoordsys< Real > & | operator*= (const ChCoordsys< Real > &F)
| Transform this coordinate system by post-multiplication with another coordinate system.
ChCoordsys< Real > & | operator>>= (const ChVector3< Real > &v)
| Performs pre-multiplication of this frame by a vector D, to 'move' by a displacement v.
ChCoordsys< Real > & | operator>>= (const ChQuaternion< Real > &q)
| Performs pre-multiplication of this frame by a quaternion R, to 'rotate' it by q.
void | Force2D ()
| Force to z=0, and z rotation only. No normalization to quaternion, however.
bool | Equals (const ChCoordsys< Real > &other) const
| Return true if this coordinate system is identical to other coordsys.
bool | Equals (const ChCoordsys< Real > &other, Real tol) const
| Return true if thsi coordinate system is equal to other coordsys, within a tolerance 'tol'.
void | SetIdentity ()
| Set to no translation and no rotation.
void | ConcatenatePreTransformation (const ChCoordsys< Real > &F)
| Apply a transformation (rotation and translation) represented by another coordinate system.
void | ConcatenatePostTransformation (const ChCoordsys< Real > &F)
| Apply a transformation (rotation and translation) represented by another coordinate system F in local coordinate.
ChVector3< Real > | TransformPointLocalToParent (const ChVector3< Real > &v) const
| Transform a point from the local coordinate system to the parent coordinate system.
ChVector3< Real > | TransformPointParentToLocal (const ChVector3< Real > &v) const
| Transforms a point from the parent coordinate system to local coordinate system.
ChVector3< Real > | TransformDirectionLocalToParent (const ChVector3< Real > &d) const
| Transform a direction from the parent coordinate system to 'this' local coordinate system.
ChVector3< Real > | TransformDirectionParentToLocal (const ChVector3< Real > &d) const
| Transforms a direction from 'this' local coordinate system to parent coordinate system.
ChWrench< Real > | TransformWrenchLocalToParent (const ChWrench< Real > &w) const
| Transform a wrench from the local coordinate system to the parent coordinate system.
ChWrench< Real > | TransformWrenchParentToLocal (const ChWrench< Real > &w) const
| Transform a wrench from the parent coordinate system to the local coordinate system.
ChCoordsys< Real > | TransformLocalToParent (const ChCoordsys< Real > &F) const
| Transform a coordinate system from 'this' local coordinate system to parent coordinate system.
ChCoordsys< Real > | TransformParentToLocal (const ChCoordsys< Real > &F) const
| Transform a coordinate system from the parent coordinate system to 'this' local coordinate system.
void | ArchiveOut (ChArchiveOut &archive_out)
| Method to allow serialization of transient data in archives.
void | ArchiveIn (ChArchiveIn &archive_in)
| Method to allow de-serialization of transient data from archives.

## Public Attributes
ChVector3< Real > | pos
ChQuaternion< Real > | rot

## Member Function Documentation

## ◆ ConcatenatePostTransformation()

template<class Real = double>

void chrono::ChCoordsys< Real >::ConcatenatePostTransformation | ( | const ChCoordsys< Real > & | F | ) |
| inline

Apply a transformation (rotation and translation) represented by another coordinate system F in local coordinate.

This is equivalent to post-multiply this coordinate system by the other coordinate system F: this'= this * F or this'= F >> this

## ◆ ConcatenatePreTransformation()

template<class Real = double>

void chrono::ChCoordsys< Real >::ConcatenatePreTransformation | ( | const ChCoordsys< Real > & | F | ) |
| inline

Apply a transformation (rotation and translation) represented by another coordinate system.

This is equivalent to pre-multiply this coordinate system by the other coordinate system F: this'= F * this or this' = this >> F

## ◆ operator*()

template<class Real = double>

ChCoordsys< Real > chrono::ChCoordsys< Real >::operator* | ( | const ChCoordsys< Real > & | F | ) | const
| inline

Transform another coordinate system through this coordinate system.

If A is this coordinate system and F another coordinate system expressed in A, then G = A * F is the coordinate system F expresssed in the parent coordinate system of A. For a sequence of transformations, i.e. a chain of coordinate systems, one can also write: G = F_1to0 * F_2to1 * F_3to2 * F; i.e., just like done with a sequence of Denavitt-Hartemberg matrix multiplications. This operation is not commutative.

## ◆ operator*=()

template<class Real = double>

ChCoordsys< Real > & chrono::ChCoordsys< Real >::operator*= | ( | const ChCoordsys< Real > & | F | ) |
| inline

Transform this coordinate system by post-multiplication with another coordinate system.

If A is this csys, then A *= F means A' = A * F or A' = F >> A.

## ◆ operator/()

template<class Real = double>

ChVector3< Real > chrono::ChCoordsys< Real >::operator/ | ( | const ChVector3< Real > & | v | ) | const
| inline

Transform a vector through this coordinate system (express from parent coordinate system).

If A is this coordinate system and v a vector expressed in the parent coordinate system of A, then w = A / v is the vector expressed in A. In other words, w = A * v implies v = A/w.

## ◆ operator>>()

template<class Real = double>

ChCoordsys< Real > chrono::ChCoordsys< Real >::operator>> | ( | const ChCoordsys< Real > & | F | ) | const
| inline

Transform another coordinate system through this coordinate system.

If A is this coordinate system and F another coordinate system expressed in A, then G = F >> A is the coordinate system F expresssed in the parent coordinate system of A. For a sequence of transformations, i.e. a chain of coordinate systems, one can also write: G = F >> F_3to2 >> F_2to1 >> F_1to0; i.e., just like done with a sequence of Denavitt-Hartemberg matrix multiplications (but reverting order). This operation is not commutative.

## ◆ operator>>=()

template<class Real = double>

ChCoordsys< Real > & chrono::ChCoordsys< Real >::operator>>= | ( | const ChCoordsys< Real > & | F | ) |
| inline

Transform this coordinate system by pre-multiplication with another coordinate system.

If A is this frame, then A >>= F means A' = F * A or A' = A >> F.

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

- D:/W/B/src/chrono-9.0.1/src/chrono/core/ChCoordsys.h