MeshLib C++ Docs
Loading...
Searching...
No Matches

#include <MRMesh/MRSymMatrix2.h>

Public Types

using ValueType = T

Public Member Functions

constexpr SymMatrix2 () noexcept=default
template<typename U>
 MR_REQUIRES_IF_SUPPORTED (!std::is_same_v< T, U >) const expr explicit SymMatrix2(const SymMatrix2< U > &m)
constexpr T trace () const noexcept
 computes trace of the matrix
constexpr T normSq () const noexcept
 computes the squared norm of the matrix, which is equal to the sum of 4 squared elements
constexpr T det () const noexcept
 computes determinant of the matrix
constexpr SymMatrix2< T > inverse () const noexcept
 computes inverse matrix
constexpr SymMatrix2< T > inverse (T det) const noexcept
 computes inverse matrix given determinant of this
SymMatrix2operator+= (const SymMatrix2< T > &b)
SymMatrix2operator-= (const SymMatrix2< T > &b)
SymMatrix2operator*= (T b)
SymMatrix2operator/= (T b)

Static Public Member Functions

static constexpr SymMatrix2 identity () noexcept
static constexpr SymMatrix2 diagonal (T diagVal) noexcept

Public Attributes

xx = 0
 zero matrix by default
xy = 0
yy = 0

(Note that these are not member symbols.)

template<typename T>
Vector2< T > operator* (const SymMatrix2< T > &a, const Vector2< T > &b)
 x = a * b
template<typename T>
SymMatrix2< T > outerSquare (const Vector2< T > &a)
 x = a * a^T
template<typename T>
SymMatrix2< T > outerSquare (T k, const Vector2< T > &a)
 x = k * a * a^T

Detailed Description

template<typename T>
struct MR::SymMatrix2< T >

symmetric 2x2 matrix


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