MeshLib Documentation
Loading...
Searching...
No Matches
MRRigidScaleXf3.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRRigidXf3.h"
4
5namespace MR
6{
7
10template <typename T>
12{
13 using V = Vector3<T>;
14
15 V a;
16 V b;
17 T s = 1;
18
19 constexpr RigidScaleXf3() noexcept = default;
20 constexpr RigidScaleXf3( const V & a, const V & b, T s ) noexcept : a( a ), b( b ), s( s ) { }
21 template <typename U>
22 constexpr explicit RigidScaleXf3( const RigidScaleXf3<U> & xf ) noexcept : a( xf.a ), b( xf.b ), s( T( xf.s ) ) { }
23 template <typename U>
24 constexpr explicit RigidScaleXf3( const RigidXf3<U> & xf ) noexcept : a( xf.a ), b( xf.b ), s( 1 ) { }
25
27 [[nodiscard]] AffineXf3<T> rigidScaleXf() const { return { s * Matrix3<T>( Quaternion<T>( a, a.length() ) ), b }; }
28
31};
32
33} // namespace MR
Definition MRCameraOrientationPlugin.h:8
Definition MRMesh/MRAffineXf.h:14
Definition MRMesh/MRMatrix3.h:13
Definition MRQuaternion.h:13
Definition MRRigidScaleXf3.h:12
AffineXf3< T > linearXf() const
converts this into not-rigid transformation but with matrix, which linearly depends on angles
Definition MRRigidScaleXf3.h:30
constexpr RigidScaleXf3(const RigidXf3< U > &xf) noexcept
Definition MRRigidScaleXf3.h:24
constexpr RigidScaleXf3() noexcept=default
T s
scaling
Definition MRRigidScaleXf3.h:17
V b
shift
Definition MRRigidScaleXf3.h:16
V a
rotation angles relative to x,y,z axes
Definition MRRigidScaleXf3.h:15
constexpr RigidScaleXf3(const RigidScaleXf3< U > &xf) noexcept
Definition MRRigidScaleXf3.h:22
AffineXf3< T > rigidScaleXf() const
converts this into rigid (with scale) transformation, which non-linearly depends on angles
Definition MRRigidScaleXf3.h:27
Definition MRRigidXf3.h:13
Definition MRMesh/MRVector3.h:19
auto length() const
Definition MRMesh/MRVector3.h:47