11#ifndef QUGAR_IMPL_AFFINE_TRANSF_HPP
12#define QUGAR_IMPL_AFFINE_TRANSF_HPP
48 static constexpr int n_coefs = dim * (dim + 1);
75 template<
int dim_aux = dim>
76 requires(dim_aux == dim && dim == 2)
95 template<
int dim_aux = dim>
96 requires(dim_aux == dim && dim == 3)
110 template<
int dim_aux = dim>
111 requires(dim_aux == dim && dim == 2)
133 template<
int dim_aux = dim>
134 requires(dim_aux == dim && dim == 3)
220 template<
int dim_aux = dim>
221 requires(dim_aux == dim && dim == 3)
242 template<
int dim_aux = dim>
243 requires(dim_aux == dim && dim == 2)
Class for representing affine transformations.
Definition affine_transf.hpp:46
AffineTransf(const Point< dim > &origin, real scale)
Constructs a new affine transformation that first applies an isotropic scaling and then translates th...
Vector< T, dim > transform_point(const Vector< T, dim > &point) const
Transforms a point from the original to the new reference system.
AffineTransf(const Vector< real, n_coefs > &coefs)
Constructs a new object through its coefficients. a new Affine Transf object.
Vector< T, dim > transform_vector(const Vector< T, dim > &vector) const
Transforms a vector from the original to the new reference system (without translation).
AffineTransf(const Point< dim > &origin, const Point< dim > &axis_x, const Point< dim > &axis_y, real scale_x, real scale_y, real scale_z)
Constructs a new 3D affine transformation defined by an origin, a couple of directions that define th...
Tensor< T > transform_tensor(const Tensor< T > &tensor) const
Transforms a (second-order symmetric) tensor from the original to the new reference system (without t...
AffineTransf(const Point< dim > &origin)
Constructs a new affine tranformation that simply translates the origin.
AffineTransf()
Default constructor. Creates the identity transformation.
static Vector< real, n_coefs > compute_coefs(const Point< dim > &origin, const Point< dim > &axis_x=Point< dim >(numbers::one, numbers::zero, numbers::zero), const Point< dim > &axis_y=Point< dim >(numbers::zero, numbers::one, numbers::zero), real scale_x=numbers::one, real scale_y=numbers::one, real scale_z=numbers::one)
Computes the coefficients of a new 3D affine transformation defined by an origin, a couple of directi...
AffineTransf(const Point< dim > &origin, const Point< dim > &axis_x, real scale_x, real scale_y)
Constructs a new 2D affine transformation defined by an origin, the axis_x, and an orthotropic scalin...
AffineTransf< dim > inverse() const
Inverts the current transformation.
Vector< real, n_coefs > coefs_
Transformation coefficients.
Definition affine_transf.hpp:250
static constexpr int n_coefs
Definition affine_transf.hpp:48
AffineTransf< dim > operator*(const AffineTransf< dim > &rhs) const
Concatenates two affine transformation to generate a new one.
AffineTransf(const Point< dim > &origin, const Point< dim > &axis_x)
Constructs a new 2D affine transformation defined by an origin and the axis_x.
AffineTransf(const Point< dim > &origin, const Point< dim > &axis_x, const Point< dim > &axis_y)
Constructs a new 3D affine transformation defined by an origin and a couple of directions that define...
static Vector< real, n_coefs > compute_coefs(const Point< dim > &origin, real scale)
Computes the coefficients of a new 2D affine transformation that translates the origin and apply an i...
static Vector< real, n_coefs > compute_coefs(const Point< dim > &origin, const Point< dim > &axis_x=Point< dim >(numbers::one, numbers::zero), real scale_x=numbers::one, real scale_y=numbers::one)
Computes the coefficients of a new 2D affine transformation defined by an origin, the axis_x,...
Vector< T, dim *(dim+1)/2 > Tensor
Definition affine_transf.hpp:49
Definition affine_transf.hpp:28
std::pair< Point< 3 >, Point< 3 > > create_reference_system_around_axis(Point< 3 > axis_z)
constexpr real zero
Real zero value.
Definition numbers.hpp:20
constexpr real one
Real one value.
Definition numbers.hpp:22
double real
Definition types.hpp:18
::algoim::uvector< T, dim > Vector
Class representing a vector.
Definition vector.hpp:31
Vector< T, dim > Point
Class representing a dim-dimensional Point.
Definition point.hpp:34
Declaration of constant values.
Definition and implementation of Point class.