wuzp
Wrong Unit? Zero Points! Compile-time checks for units, coordinate systems and points vs. vectors.
Loading...
Searching...
No Matches
wuzp::PassiveTranslation< ValuesT_, DimensionV_, ValueT_, FromT_, ToT_, UnitsT_ > Class Template Reference

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>

Inherits wuzp::PassiveTransformation< PassiveTranslation< ValuesT_, DimensionV_, ValueT_, FromT_, ToT_, UnitsT_... >, FromT_, ToT_ >.

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.

Detailed Description

template<template< typename, int, int > typename ValuesT_, int DimensionV_, typename ValueT_, AnyCoordinateSystem FromT_, AnyCoordinateSystem ToT_, typename... UnitsT_>
requires AnyValueMatrix<ValuesT_>
class wuzp::PassiveTranslation< ValuesT_, DimensionV_, ValueT_, FromT_, ToT_, UnitsT_ >

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.

Member Typedef Documentation

◆ QuantitiesT

template<template< typename, int, int > typename ValuesT_, int DimensionV_, typename ValueT_, AnyCoordinateSystem FromT_, AnyCoordinateSystem ToT_, typename... UnitsT_>
using wuzp::PassiveTranslation< ValuesT_, DimensionV_, ValueT_, FromT_, ToT_, UnitsT_ >::QuantitiesT = Quantities<ValuesT, UnitsT>

Definition at line 39 of file PassiveTranslation.hpp.

◆ TensorT

template<template< typename, int, int > typename ValuesT_, int DimensionV_, typename ValueT_, AnyCoordinateSystem FromT_, AnyCoordinateSystem ToT_, typename... UnitsT_>
using wuzp::PassiveTranslation< ValuesT_, DimensionV_, ValueT_, FromT_, ToT_, UnitsT_ >::TensorT = Tensor<Indices<Up>, QuantitiesT, ToT_, Relative>

Definition at line 40 of file PassiveTranslation.hpp.

◆ UnitsT

template<template< typename, int, int > typename ValuesT_, int DimensionV_, typename ValueT_, AnyCoordinateSystem FromT_, AnyCoordinateSystem ToT_, typename... UnitsT_>
using wuzp::PassiveTranslation< ValuesT_, DimensionV_, ValueT_, FromT_, ToT_, UnitsT_ >::UnitsT = TypeMatrix<DimensionV_, 1, UnitsT_...>

Definition at line 38 of file PassiveTranslation.hpp.

◆ ValuesT

template<template< typename, int, int > typename ValuesT_, int DimensionV_, typename ValueT_, AnyCoordinateSystem FromT_, AnyCoordinateSystem ToT_, typename... UnitsT_>
using wuzp::PassiveTranslation< ValuesT_, DimensionV_, ValueT_, FromT_, ToT_, UnitsT_ >::ValuesT = ValuesT_<ValueT_, DimensionV_, 1>

Definition at line 37 of file PassiveTranslation.hpp.

◆ ValueT

template<template< typename, int, int > typename ValuesT_, int DimensionV_, typename ValueT_, AnyCoordinateSystem FromT_, AnyCoordinateSystem ToT_, typename... UnitsT_>
using wuzp::PassiveTranslation< ValuesT_, DimensionV_, ValueT_, FromT_, ToT_, UnitsT_ >::ValueT = ValueT_

Definition at line 36 of file PassiveTranslation.hpp.

Constructor & Destructor Documentation

◆ PassiveTranslation()

template<template< typename, int, int > typename ValuesT_, int DimensionV_, typename ValueT_, AnyCoordinateSystem FromT_, AnyCoordinateSystem ToT_, typename... UnitsT_>
template<typename... Args>
requires (!CopiesOrMoves<PassiveTranslation, Args...>)
wuzp::PassiveTranslation< ValuesT_, DimensionV_, ValueT_, FromT_, ToT_, UnitsT_ >::PassiveTranslation ( Args &&... args)
inlineexplicit

Definition at line 45 of file PassiveTranslation.hpp.

Member Function Documentation

◆ getQuantities()

template<template< typename, int, int > typename ValuesT_, int DimensionV_, typename ValueT_, AnyCoordinateSystem FromT_, AnyCoordinateSystem ToT_, typename... UnitsT_>
const QuantitiesT & wuzp::PassiveTranslation< ValuesT_, DimensionV_, ValueT_, FromT_, ToT_, UnitsT_ >::getQuantities ( ) const
inline

The components of the translation, like getQuantities() of the linear transformations.

Definition at line 50 of file PassiveTranslation.hpp.

◆ getTensor()

template<template< typename, int, int > typename ValuesT_, int DimensionV_, typename ValueT_, AnyCoordinateSystem FromT_, AnyCoordinateSystem ToT_, typename... UnitsT_>
const TensorT & wuzp::PassiveTranslation< ValuesT_, DimensionV_, ValueT_, FromT_, ToT_, UnitsT_ >::getTensor ( ) const
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.

◆ inverse()

template<template< typename, int, int > typename ValuesT_, int DimensionV_, typename ValueT_, AnyCoordinateSystem FromT_, AnyCoordinateSystem ToT_, typename... UnitsT_>
auto wuzp::PassiveTranslation< ValuesT_, DimensionV_, ValueT_, FromT_, ToT_, UnitsT_ >::inverse ( ) const
inline

The inverse translation, from To to From, whose vector from the origin of From to the origin of To is -t, expressed in From.

Definition at line 53 of file PassiveTranslation.hpp.

◆ isApprox()

template<template< typename, int, int > typename ValuesT_, int DimensionV_, typename ValueT_, AnyCoordinateSystem FromT_, AnyCoordinateSystem ToT_, typename... UnitsT_>
template<template< typename, int, int > typename ValuesOtherT_, int DimensionOtherV_, typename ValueOtherT_, typename FromOtherT_, typename ToOtherT_, typename... UnitsOtherT_>
bool wuzp::PassiveTranslation< ValuesT_, DimensionV_, ValueT_, FromT_, ToT_, UnitsT_ >::isApprox ( const PassiveTranslation< ValuesOtherT_, DimensionOtherV_, ValueOtherT_, FromOtherT_, ToOtherT_, UnitsOtherT_... > & other,
const ValueT precision = Precision<ValueT>::value() ) const
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.


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