|
wuzp
Wrong Unit? Zero Points! Compile-time checks for units, coordinate systems and points vs. vectors.
|
A passive translation from the coordinate system From to the coordinate system To, which have the same axes but different origins: a point p in From is the point p + t in To, and vectors, covectors and tensors with two upper indices, e.g. covariances, keep their components. More...
#include <wuzp/trafo/PassiveTranslation.hpp>
Public Types | |
| using | ValueT = ValueT_ |
| using | ValuesT = ValuesT_<ValueT_, DimensionV_, 1> |
| using | UnitsT = TypeMatrix<DimensionV_, 1, UnitsT_...> |
| using | QuantitiesT = Quantities<ValuesT, UnitsT> |
| using | TensorT = Tensor<Indices<Up>, QuantitiesT, ToT_, Relative> |
| Public Types inherited from wuzp::PassiveTransformation< PassiveTranslation< ValuesT_, DimensionV_, ValueT_, FromT_, ToT_, UnitsT_... >, FromT_, ToT_ > | |
| using | From |
| using | To |
Public Member Functions | |
| template<typename... Args> requires (!CopiesOrMoves<PassiveTranslation, Args...>) | |
| PassiveTranslation (Args &&... args) | |
| const TensorT & | getTensor () const |
| The vector t from the origin of To to the origin of From, expressed in To. | |
| const QuantitiesT & | getQuantities () const |
| The components of the translation, like getQuantities() of the linear transformations. | |
| auto | inverse () const |
| The inverse translation, from To to From, whose vector from the origin of From to the origin of To is -t, expressed in From. | |
| template<template< typename, int, int > typename ValuesOtherT_, int DimensionOtherV_, typename ValueOtherT_, typename FromOtherT_, typename ToOtherT_, typename... UnitsOtherT_> | |
| bool | isApprox (const PassiveTranslation< ValuesOtherT_, DimensionOtherV_, ValueOtherT_, FromOtherT_, ToOtherT_, UnitsOtherT_... > &other, const ValueT precision=Precision< ValueT >::value()) const |
| Whether both translations, which must transform between the same coordinate systems, are approximately equal: their vectors are compared like tensors (see Tensor::isApprox()). | |
| Public Member Functions inherited from wuzp::PassiveTransformation< PassiveTranslation< ValuesT_, DimensionV_, ValueT_, FromT_, ToT_, UnitsT_... >, FromT_, ToT_ > | |
| auto | transform (ObjectT_ &&object) const |
| The object in To. | |
A passive translation from the coordinate system From to the coordinate system To, which have the same axes but different origins: a point p in From is the point p + t in To, and vectors, covectors and tensors with two upper indices, e.g. covariances, keep their components.
Other tensors are rejected, since they may depend on the origin, e.g. an inertia about it (see internal::isTranslationInvariant). Spatial vectors, e.g. SpatialVelocity, keep their components too, since the point they are about is a tag rather than the origin. The objects it transforms must be expressed in From. Its vector t is the vector from the origin of To to the origin of From, expressed in To, i.e. p_AoBo_A of X_AB in the monogram notation of Drake (https://drake.mit.edu/doxygen_cxx/group__multibody__notation.html) for From = B and To = A. From and To have the same axes, so it has the same components in From.
Definition at line 33 of file PassiveTranslation.hpp.
| using wuzp::PassiveTranslation< ValuesT_, DimensionV_, ValueT_, FromT_, ToT_, UnitsT_ >::QuantitiesT = Quantities<ValuesT, UnitsT> |
Definition at line 39 of file PassiveTranslation.hpp.
| using wuzp::PassiveTranslation< ValuesT_, DimensionV_, ValueT_, FromT_, ToT_, UnitsT_ >::TensorT = Tensor<Indices<Up>, QuantitiesT, ToT_, Relative> |
Definition at line 40 of file PassiveTranslation.hpp.
| using wuzp::PassiveTranslation< ValuesT_, DimensionV_, ValueT_, FromT_, ToT_, UnitsT_ >::UnitsT = TypeMatrix<DimensionV_, 1, UnitsT_...> |
Definition at line 38 of file PassiveTranslation.hpp.
| using wuzp::PassiveTranslation< ValuesT_, DimensionV_, ValueT_, FromT_, ToT_, UnitsT_ >::ValuesT = ValuesT_<ValueT_, DimensionV_, 1> |
Definition at line 37 of file PassiveTranslation.hpp.
| using wuzp::PassiveTranslation< ValuesT_, DimensionV_, ValueT_, FromT_, ToT_, UnitsT_ >::ValueT = ValueT_ |
Definition at line 36 of file PassiveTranslation.hpp.
|
inlineexplicit |
Definition at line 45 of file PassiveTranslation.hpp.
|
inline |
The components of the translation, like getQuantities() of the linear transformations.
Definition at line 50 of file PassiveTranslation.hpp.
|
inline |
The vector t from the origin of To to the origin of From, expressed in To.
Definition at line 48 of file PassiveTranslation.hpp.
|
inline |
|
inline |
Whether both translations, which must transform between the same coordinate systems, are approximately equal: their vectors are compared like tensors (see Tensor::isApprox()).
Definition at line 59 of file PassiveTranslation.hpp.