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

An active translation, which moves points by a vector t, p' = p + t, and leaves vectors, covectors and tensors with two upper indices, e.g. covariances, unchanged (see the conventions in DESIGN.md). More...

#include <wuzp/trafo/ActiveTranslation.hpp>

Inherits wuzp::ActiveTransformation< ActiveTranslation< ValuesT_, DimensionV_, ValueT_, CoordinateSystemT_, UnitsT_... > >.

Public Types

using ValueT = ValueT_
using ValuesT = ValuesT_<ValueT_, DimensionV_, 1>
using UnitsT = TypeMatrix<DimensionV_, 1, UnitsT_...>
using QuantitiesT = Quantities<ValuesT, UnitsT>
using CoordinateSystemT = CoordinateSystemT_
using TensorT = Tensor<Indices<Up>, QuantitiesT, CoordinateSystemT, Relative>

Public Member Functions

template<typename... Args>
requires (!CopiesOrMoves<ActiveTranslation, Args...>)
 ActiveTranslation (Args &&... args)
const TensorT & getTensor () const
const QuantitiesT & getQuantities () const
 The components of the translation, like getQuantities() of the linear transformations.
ActiveTranslation inverse () const
 The inverse translation, by -t.
template<template< typename, int, int > typename ValuesOtherT_, int DimensionOtherV_, typename ValueOtherT_, typename CoordinateSystemOtherT_, typename... UnitsOtherT_>
bool isApprox (const ActiveTranslation< ValuesOtherT_, DimensionOtherV_, ValueOtherT_, CoordinateSystemOtherT_, UnitsOtherT_... > &other, const ValueT precision=Precision< ValueT >::value()) const
 Whether both translations, which must be expressed in the same coordinate system, are approximately equal: their vectors are compared like tensors (see Tensor::isApprox()).
Public Member Functions inherited from wuzp::ActiveTransformation< ActiveTranslation< ValuesT_, DimensionV_, ValueT_, CoordinateSystemT_, UnitsT_... > >
auto transform (ObjectT_ &&object) const
 The transformed object. A temporary is passed on as one, like with PassiveTransformation::transform().

Detailed Description

template<template< typename, int, int > typename ValuesT_, int DimensionV_, typename ValueT_, AnyCoordinateSystem CoordinateSystemT_, typename... UnitsT_>
requires AnyValueMatrix<ValuesT_>
class wuzp::ActiveTranslation< ValuesT_, DimensionV_, ValueT_, CoordinateSystemT_, UnitsT_ >

An active translation, which moves points by a vector t, p' = p + t, and leaves vectors, covectors and tensors with two upper indices, e.g. covariances, unchanged (see the conventions in DESIGN.md).

Other tensors are rejected, since they may depend on the origin, e.g. an inertia about it (see internal::isTranslationInvariant). It only transforms objects expressed in its coordinate system.

Definition at line 29 of file ActiveTranslation.hpp.

Member Typedef Documentation

◆ CoordinateSystemT

template<template< typename, int, int > typename ValuesT_, int DimensionV_, typename ValueT_, AnyCoordinateSystem CoordinateSystemT_, typename... UnitsT_>
using wuzp::ActiveTranslation< ValuesT_, DimensionV_, ValueT_, CoordinateSystemT_, UnitsT_ >::CoordinateSystemT = CoordinateSystemT_

Definition at line 35 of file ActiveTranslation.hpp.

◆ QuantitiesT

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

Definition at line 34 of file ActiveTranslation.hpp.

◆ TensorT

template<template< typename, int, int > typename ValuesT_, int DimensionV_, typename ValueT_, AnyCoordinateSystem CoordinateSystemT_, typename... UnitsT_>
using wuzp::ActiveTranslation< ValuesT_, DimensionV_, ValueT_, CoordinateSystemT_, UnitsT_ >::TensorT = Tensor<Indices<Up>, QuantitiesT, CoordinateSystemT, Relative>

Definition at line 36 of file ActiveTranslation.hpp.

◆ UnitsT

template<template< typename, int, int > typename ValuesT_, int DimensionV_, typename ValueT_, AnyCoordinateSystem CoordinateSystemT_, typename... UnitsT_>
using wuzp::ActiveTranslation< ValuesT_, DimensionV_, ValueT_, CoordinateSystemT_, UnitsT_ >::UnitsT = TypeMatrix<DimensionV_, 1, UnitsT_...>

Definition at line 33 of file ActiveTranslation.hpp.

◆ ValuesT

template<template< typename, int, int > typename ValuesT_, int DimensionV_, typename ValueT_, AnyCoordinateSystem CoordinateSystemT_, typename... UnitsT_>
using wuzp::ActiveTranslation< ValuesT_, DimensionV_, ValueT_, CoordinateSystemT_, UnitsT_ >::ValuesT = ValuesT_<ValueT_, DimensionV_, 1>

Definition at line 32 of file ActiveTranslation.hpp.

◆ ValueT

template<template< typename, int, int > typename ValuesT_, int DimensionV_, typename ValueT_, AnyCoordinateSystem CoordinateSystemT_, typename... UnitsT_>
using wuzp::ActiveTranslation< ValuesT_, DimensionV_, ValueT_, CoordinateSystemT_, UnitsT_ >::ValueT = ValueT_

Definition at line 31 of file ActiveTranslation.hpp.

Constructor & Destructor Documentation

◆ ActiveTranslation()

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

Definition at line 41 of file ActiveTranslation.hpp.

Member Function Documentation

◆ getQuantities()

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

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

Definition at line 45 of file ActiveTranslation.hpp.

◆ getTensor()

template<template< typename, int, int > typename ValuesT_, int DimensionV_, typename ValueT_, AnyCoordinateSystem CoordinateSystemT_, typename... UnitsT_>
const TensorT & wuzp::ActiveTranslation< ValuesT_, DimensionV_, ValueT_, CoordinateSystemT_, UnitsT_ >::getTensor ( ) const
inline

Definition at line 43 of file ActiveTranslation.hpp.

◆ inverse()

template<template< typename, int, int > typename ValuesT_, int DimensionV_, typename ValueT_, AnyCoordinateSystem CoordinateSystemT_, typename... UnitsT_>
ActiveTranslation wuzp::ActiveTranslation< ValuesT_, DimensionV_, ValueT_, CoordinateSystemT_, UnitsT_ >::inverse ( ) const
inline

The inverse translation, by -t.

Definition at line 48 of file ActiveTranslation.hpp.

◆ isApprox()

template<template< typename, int, int > typename ValuesT_, int DimensionV_, typename ValueT_, AnyCoordinateSystem CoordinateSystemT_, typename... UnitsT_>
template<template< typename, int, int > typename ValuesOtherT_, int DimensionOtherV_, typename ValueOtherT_, typename CoordinateSystemOtherT_, typename... UnitsOtherT_>
bool wuzp::ActiveTranslation< ValuesT_, DimensionV_, ValueT_, CoordinateSystemT_, UnitsT_ >::isApprox ( const ActiveTranslation< ValuesOtherT_, DimensionOtherV_, ValueOtherT_, CoordinateSystemOtherT_, UnitsOtherT_... > & other,
const ValueT precision = Precision<ValueT>::value() ) const
inline

Whether both translations, which must be expressed in the same coordinate system, are approximately equal: their vectors are compared like tensors (see Tensor::isApprox()).

Definition at line 54 of file ActiveTranslation.hpp.


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