3#include "_cexports/c_core_3d.h"
6#include "matrix_3d.hpp"
78 inline AffineMatrix3D
operator+(
const AffineMatrix3D &lhs,
const AffineMatrix3D &rhs)
noexcept;
89 inline AffineMatrix3D
operator-(
const AffineMatrix3D &lhs,
const AffineMatrix3D &rhs)
noexcept;
100 inline AffineMatrix3D
operator*(
const AffineMatrix3D &lhs,
const AffineMatrix3D &rhs);
111 inline AffineMatrix3D
operator*(
const AffineMatrix3D &lhs,
const double &rhs)
noexcept;
122 inline AffineMatrix3D
operator*(
const double &lhs,
const AffineMatrix3D &rhs)
noexcept;
133 inline AffineMatrix3D
operator/(
const AffineMatrix3D &lhs,
const double &rhs);
166 , translation_(translation)
207 translation_ = translation;
227 return Internal::DoResCallValueOut<double>([&](
double &value) {
228 auto thisData =
reinterpret_cast<const CExports::CVC3DTransformation *
>(
this);
229 return CVB_CALL_CAPI(CVC3DTransformationDeterminant(*thisData, value));
241 Internal::DoResCall([&]() {
242 auto data =
reinterpret_cast<const CExports::CVC3DTransformation *
>(
this);
243 auto dataInv =
reinterpret_cast<CExports::CVC3DTransformation *
>(
this);
244 return CVB_CALL_CAPI(CVC3DInvertTransformation(*data, *dataInv));
270 return translation_ == transformation.translation_ && matrix_ == transformation.matrix_;
281 return !(*
this == transformation);
292 *
this = *
this + transformation;
304 *
this = *
this - transformation;
316 *
this = *
this * transformation;
328 *
this = *
this * value;
340 *
this = *
this / value;
351 return AffineMatrix3D(lhs.Matrix() + rhs.Matrix(), lhs.Translation() + rhs.Translation());
356 return AffineMatrix3D(lhs.Matrix() - rhs.Matrix(), lhs.Translation() - rhs.Translation());
362 return Internal::DoResCallValueOut<AffineMatrix3D>([&](
AffineMatrix3D &value) {
363 auto valueData =
reinterpret_cast<CExports::CVC3DTransformation *
>(&value);
364 auto lhsData =
reinterpret_cast<const CExports::CVC3DTransformation *
>(&lhs);
365 auto rhsData =
reinterpret_cast<const CExports::CVC3DTransformation *
>(&rhs);
366 return CVB_CALL_CAPI(CVC3DMultiplyTransformations(*lhsData, *rhsData, *valueData));
372 return AffineMatrix3D(lhs.Matrix() * rhs, lhs.Translation() * rhs);
AffineMatrix3D Inverse()
Gets the inverse of this transformation if possible.
Definition affine_matrix_3d.hpp:255
bool operator==(const AffineMatrix3D &transformation) const noexcept
Compares to an other transformation.
Definition affine_matrix_3d.hpp:268
AffineMatrix3D & operator*=(const double &value) noexcept
Multiplies and assigns to this transformation.
Definition affine_matrix_3d.hpp:326
static AffineMatrix3D Identity() noexcept
The identity element.
Definition affine_matrix_3d.hpp:147
Vector3D< double > Translation() const noexcept
Gets the translation part of the transformation.
Definition affine_matrix_3d.hpp:195
Matrix3D Matrix() const noexcept
Gets the matrix part of the transformation.
Definition affine_matrix_3d.hpp:175
AffineMatrix3D & operator*=(const AffineMatrix3D &transformation)
Multiplies and assigns to this transformation.
Definition affine_matrix_3d.hpp:314
AffineMatrix3D & operator/=(const double &value) noexcept
Divides each element of this transformation by the given value.
Definition affine_matrix_3d.hpp:338
AffineMatrix3D() noexcept=default
Default constructor for empty transformation.
bool IsTranslation() const noexcept
Checks if this transformation describes a translation.
Definition affine_matrix_3d.hpp:215
double Det() const
Transformation determinant.
Definition affine_matrix_3d.hpp:225
bool operator!=(const AffineMatrix3D &transformation) const noexcept
Compares to an other transformation.
Definition affine_matrix_3d.hpp:279
void SetTranslation(Vector3D< double > translation) noexcept
Sets the translation part of the transformation.
Definition affine_matrix_3d.hpp:205
AffineMatrix3D & operator-=(const AffineMatrix3D &transformation) noexcept
Subtracts and assigns to this transformation.
Definition affine_matrix_3d.hpp:302
void SetMatrix(Matrix3D matrix) noexcept
Sets the matrix part of the transformation.
Definition affine_matrix_3d.hpp:185
void Invert()
Inverts this transformation in-place if possible.
Definition affine_matrix_3d.hpp:239
AffineMatrix3D & operator+=(const AffineMatrix3D &transformation) noexcept
Adds and assigns to this affine matrix.
Definition affine_matrix_3d.hpp:290
Double precision 3x3 matrix class.
Definition matrix_3d.hpp:54
static Matrix3D Identity() noexcept
The identity element.
Definition matrix_3d.hpp:61
Root namespace for the Image Manager interface.
Definition c_bayer_to_rgb.h:17
AffineMatrix2D operator+(const AffineMatrix2D &lhs, const AffineMatrix2D &rhs) noexcept
Add two affine matrices.
Definition affine_matrix_2d.hpp:223
AffineMatrix2D operator*(const AffineMatrix2D &lhs, const AffineMatrix2D &rhs) noexcept
Multiply two affine matrices.
Definition affine_matrix_2d.hpp:251
Point3D< T > Vector3D
Alias for Point3D.
Definition point_3d.hpp:363
AffineMatrix2D operator/(const AffineMatrix2D &lhs, const double &rhs)
Divide affine matrix by scalar.
Definition affine_matrix_2d.hpp:307
AffineMatrix2D operator-(const AffineMatrix2D &lhs, const AffineMatrix2D &rhs) noexcept
Subtract two affine matrices.
Definition affine_matrix_2d.hpp:237
Factor components to be applied in the 3D domain.
Definition core_3d.hpp:16