MeshLib
 
Loading...
Searching...
No Matches
MR::AffineXf< V > Struct Template Reference

#include <MRAffineXf.h>

Public Types

using T = typename V::ValueType
 
using M = typename V::MatrixType
 

Public Member Functions

constexpr AffineXf () noexcept=default
 
constexpr AffineXf (const M &A, const V &b) noexcept
 
template<typename U >
constexpr AffineXf (const AffineXf< U > &xf) noexcept
 
constexpr V operator() (const V &x) const noexcept
 application of the transformation to a point
 
constexpr V linearOnly (const V &x) const noexcept
 
constexpr AffineXf inverse () const noexcept
 computes inverse transformation
 

Static Public Member Functions

static constexpr AffineXf translation (const V &b) noexcept
 creates translation-only transformation (with identity linear component)
 
static constexpr AffineXf linear (const M &A) noexcept
 creates linear-only transformation (without translation)
 
static constexpr AffineXf xfAround (const M &A, const V &stable) noexcept
 creates transformation with given linear part with given stable point
 

Public Attributes

M A
 
b
 

Related Symbols

(Note that these are not member symbols.)

template<typename V >
AffineXf< V > operator* (const AffineXf< V > &u, const AffineXf< V > &v)
 
template<typename V >
bool operator== (const AffineXf< V > &a, const AffineXf< V > &b)
 
template<typename V >
bool operator!= (const AffineXf< V > &a, const AffineXf< V > &b)
 

Detailed Description

template<typename V>
struct MR::AffineXf< V >

affine transformation: y = A*x + b, where A in VxV, and b in V

Member Typedef Documentation

◆ M

template<typename V >
using MR::AffineXf< V >::M = typename V::MatrixType

◆ T

template<typename V >
using MR::AffineXf< V >::T = typename V::ValueType

Constructor & Destructor Documentation

◆ AffineXf() [1/3]

template<typename V >
constexpr MR::AffineXf< V >::AffineXf ( )
constexprdefaultnoexcept

◆ AffineXf() [2/3]

template<typename V >
constexpr MR::AffineXf< V >::AffineXf ( const M & A,
const V & b )
inlineconstexprnoexcept

◆ AffineXf() [3/3]

template<typename V >
template<typename U >
constexpr MR::AffineXf< V >::AffineXf ( const AffineXf< U > & xf)
inlineexplicitconstexprnoexcept

Member Function Documentation

◆ inverse()

template<typename V >
constexpr AffineXf MR::AffineXf< V >::inverse ( ) const
constexprnoexcept

computes inverse transformation

◆ linear()

template<typename V >
static constexpr AffineXf MR::AffineXf< V >::linear ( const M & A)
inlinestaticconstexprnoexcept

creates linear-only transformation (without translation)

◆ linearOnly()

template<typename V >
constexpr V MR::AffineXf< V >::linearOnly ( const V & x) const
inlineconstexprnoexcept

applies only linear part of the transformation to given vector (e.g. to normal) skipping adding shift (b) for example if this is a rigid transformation, then only rotates input vector

◆ operator()()

template<typename V >
constexpr V MR::AffineXf< V >::operator() ( const V & x) const
inlineconstexprnoexcept

application of the transformation to a point

◆ translation()

template<typename V >
static constexpr AffineXf MR::AffineXf< V >::translation ( const V & b)
inlinestaticconstexprnoexcept

creates translation-only transformation (with identity linear component)

◆ xfAround()

template<typename V >
static constexpr AffineXf MR::AffineXf< V >::xfAround ( const M & A,
const V & stable )
inlinestaticconstexprnoexcept

creates transformation with given linear part with given stable point

Friends And Related Symbol Documentation

◆ operator!=()

template<typename V >
bool operator!= ( const AffineXf< V > & a,
const AffineXf< V > & b )
related

◆ operator*()

template<typename V >
AffineXf< V > operator* ( const AffineXf< V > & u,
const AffineXf< V > & v )
related

composition of two transformations:  y = (u * v) ( x ) = u( v( x ) ) = ( u.A * ( v.A * x + v.b ) + u.b ) = ( u.A * v.A ) * x + ( u.A * v.b + u.b )

◆ operator==()

template<typename V >
bool operator== ( const AffineXf< V > & a,
const AffineXf< V > & b )
related

Member Data Documentation

◆ A

template<typename V >
M MR::AffineXf< V >::A

◆ b

template<typename V >
V MR::AffineXf< V >::b

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