15#include "wuzp/trafo/internal/translate.hpp"
26template <
template <
typename,
int,
int>
typename ValuesT_,
int DimensionV_,
typename ValueT_,
AnyCoordinateSystem CoordinateSystemT_,
32 using ValuesT = ValuesT_<ValueT_, DimensionV_, 1>;
39 template <
typename... Args>
52 template <
template <
typename,
int,
int>
typename ValuesOtherT_,
int DimensionOtherV_,
typename ValueOtherT_,
53 typename CoordinateSystemOtherT_,
typename... UnitsOtherT_>
56 return tensor_.isApprox(other.
getTensor(), precision);
64template <
template <
typename,
int,
int>
typename ValuesT_,
int DimensionV_,
typename ValueT_,
typename CoordinateSystemT_,
67 using type = CoordinateSystemT_;
73template <
template <
typename,
int,
int>
typename ValuesT_,
int DimensionV_,
typename ValueT_,
typename CoordinateSystemT_,
74 typename... UnitsT_,
typename IndicesOtherT_,
typename QuantitiesOtherT_,
typename CoordinateSystemOtherT_,
75 typename AbsoluteOtherT_>
77 Tensor<IndicesOtherT_, QuantitiesOtherT_, CoordinateSystemOtherT_, AbsoluteOtherT_>> {
79 template <
typename ObjectT_>
80 requires std::is_same_v<std::remove_cvref_t<ObjectT_>,
ObjectT>
83 static_assert(std::is_same_v<CoordinateSystemT_, CoordinateSystemOtherT_>,
"Coordinate systems do not match.");
84 return internal::translate<CoordinateSystemT_>(std::forward<ObjectT_>(
object), transformation.
getQuantities());
89template <
template <
typename,
int,
int>
typename ValuesT_,
int DimensionV_,
typename ValueT_,
typename CoordinateSystemT_,
90 typename... UnitsT_,
template <
typename,
int,
int>
typename ValuesOtherT_,
int DimensionOtherV_,
typename ValueOtherT_,
91 typename CoordinateSystemOtherT_,
typename... UnitsOtherT_>
93 ActiveTranslation<ValuesOtherT_, DimensionOtherV_, ValueOtherT_, CoordinateSystemOtherT_, UnitsOtherT_...>> {
97 return ActiveTranslation<ValuesOtherT_, DimensionOtherV_, ValueOtherT_, CoordinateSystemOtherT_, UnitsOtherT_...>(
98 transformation.
transform(
object.getTensor()));
103template <
template <
typename,
int,
int>
typename ValuesLhsT_,
int DimensionLhsV_,
typename ValueLhsT_,
typename CoordinateSystemLhsT_,
104 typename... UnitsLhsT_,
template <
typename,
int,
int>
typename ValuesRhsT_,
int DimensionRhsV_,
typename ValueRhsT_,
105 typename CoordinateSystemRhsT_,
typename... UnitsRhsT_>
107 ActiveTranslation<ValuesRhsT_, DimensionRhsV_, ValueRhsT_, CoordinateSystemRhsT_, UnitsRhsT_...>> {
115template <
template <
typename,
int,
int>
typename ValuesLhsT_,
int DimensionLhsV_,
typename ValueLhsT_,
typename CoordinateSystemLhsT_,
116 typename... UnitsLhsT_,
template <
typename,
int,
int>
typename ValuesRhsT_,
int DimensionRhsV_,
typename ValueRhsT_,
117 typename CoordinateSystemRhsT_,
typename... UnitsRhsT_>
123template <
template <
typename,
int,
int>
typename ValuesLhsT_,
int DimensionLhsV_,
typename ValueLhsT_,
typename CoordinateSystemLhsT_,
124 typename... UnitsLhsT_,
template <
typename,
int,
int>
typename ValuesRhsT_,
int DimensionRhsV_,
typename ValueRhsT_,
125 typename CoordinateSystemRhsT_,
typename... UnitsRhsT_>
128 return !(lhs == rhs);
131template <
template <
typename,
int,
int>
typename ValuesT_,
int DimensionV_,
typename ValueT_,
typename CoordinateSystemT_,
138template <
template <
typename,
int,
int>
typename ValuesT_,
int DimensionV_,
typename ValueT_,
typename CoordinateSystemT_>
141template <
template <
typename,
int,
int>
typename ValuesT_,
typename ValueT_,
typename CoordinateSystemT_>
143template <
template <
typename,
int,
int>
typename ValuesT_,
typename ValueT_,
typename CoordinateSystemT_>
An active translation, which moves points by a vector t, p' = p + t, and leaves vectors,...
CoordinateSystemT_ CoordinateSystemT
const QuantitiesT & getQuantities() const
The components of the translation, like getQuantities() of the linear transformations.
Quantities< ValuesT, UnitsT > QuantitiesT
const TensorT & getTensor() const
ActiveTranslation inverse() const
The inverse translation, by -t.
Tensor< Indices< Up >, QuantitiesT, CoordinateSystemT, Relative > TensorT
ActiveTranslation(Args &&... args)
ValuesRhsT_< ValueRhsT_, DimensionV_, 1 > ValuesT
TypeMatrix< DimensionV_, 1, UnitsT_... > UnitsT
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 e...
Container to store quantities.
A tensor of rank 0, 1 or 2, whose components are quantities, expressed in a coordinate system,...
Any coordinate system: a specialization of CoordinateSystem, including the intermediate ones of trans...
The alias template ValueMatrix<ValueT_, RowsV_, ColsV_> of any value matrix backend,...
Whether constructing a Class from the arguments copies or moves it, i.e. whether they are a single Cl...
bool operator!=(const Quantities< ValuesLhsT_, UnitsLhsT_ > &lhs, const Quantities< ValuesRhsT_, UnitsRhsT_ > &rhs)
std::ostream & operator<<(std::ostream &lhs, const Quantities< ValuesT_, UnitsT_ > &rhs)
ActiveTranslation< ValuesT_, DimensionV_, ValueT_, CoordinateSystemT_, typename AccessUnits< AccessImplementation< ValueT_ > >::Length > ActiveSpatialTranslation
internal::AbsoluteImpl< false > Relative
bool operator==(const Quantities< ValuesLhsT_, UnitsLhsT_ > &lhs, const Quantities< ValuesRhsT_, UnitsRhsT_ > &rhs)
typename CreateTypeMatrix< RowsV_, ColsV_, Types... >::type TypeMatrix
A matrix storing types at compile-time.
ActiveSpatialTranslation< ValuesT_, 3, ValueT_, CoordinateSystemT_ > ActiveSpatialTranslation3
ActiveSpatialTranslation< ValuesT_, 2, ValueT_, CoordinateSystemT_ > ActiveSpatialTranslation2
static auto compose(const ActiveTranslation< ValuesLhsT_, DimensionLhsV_, ValueLhsT_, CoordinateSystemLhsT_, UnitsLhsT_... > &lhs, const ActiveTranslation< ValuesRhsT_, DimensionRhsV_, ValueRhsT_, CoordinateSystemRhsT_, UnitsRhsT_... > &rhs)
The composition lhs * rhs of two transformations, which applies rhs first, then lhs: (lhs * rhs)....
static constexpr ValueT_ value()