MeshLib Documentation
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
 

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
 

Friends

constexpr AffineXf inverse() const noexcept MR_REQUIRES_IF_SUPPORTED(!std friend AffineXf< V > operator* (const AffineXf< V > &u, const AffineXf< V > &v)
 computes inverse transformation
 
bool operator== (const AffineXf< V > &a, const AffineXf< V > &b)
 
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 >
MR::AffineXf< V >::AffineXf ( )
constexprdefaultnoexcept

◆ AffineXf() [2/3]

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

◆ AffineXf() [3/3]

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

Member Function Documentation

◆ linear()

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

creates linear-only transformation (without translation)

◆ linearOnly()

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

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 >
V MR::AffineXf< V >::operator() ( const V & x) const
inlinenodiscardconstexprnoexcept

application of the transformation to a point

◆ translation()

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

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 )
inlinestaticnodiscardconstexprnoexcept

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 )
friend

◆ operator*

template<typename V >
AffineXf inverse() const noexcept MR_REQUIRES_IF_SUPPORTED(!std friend AffineXf< V > operator* ( const AffineXf< V > & u,
const AffineXf< V > & v )
friend

computes inverse transformation

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 )
friend

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: