42 bool operator ==( const
SymMatrix4<T> & ) const = default;
54 a.xx * b.
x + a.xy * b.y + a.xz * b.z + a.xw * b.w,
55 a.xy * b.x + a.yy * b.y + a.yz * b.z + a.yw * b.w,
56 a.xz * b.x + a.yz * b.y + a.zz * b.z + a.zw * b.w,
57 a.xw * b.x + a.yw * b.y + a.zw * b.z + a.ww * b.w
66 res.
xx = a.
x * a.
x; res.
xy = a.
x * a.
y; res.
xz = a.
x * a.
z; res.
xw = a.
x * a.
w;
67 res.
yy = a.
y * a.
y; res.
yz = a.
y * a.
z; res.
yw = a.
y * a.
w;
68 res.
zz = a.
z * a.
z; res.
zw = a.
z * a.
w;
77 const auto ka = k * a;
79 res.
xx = ka.x * a.
x; res.
xy = ka.x * a.
y; res.
xz = ka.x * a.
z; res.
xw = ka.x * a.
w;
80 res.
yy = ka.y * a.
y; res.
yz = ka.y * a.
z; res.
yw = ka.y * a.
w;
81 res.
zz = ka.z * a.
z; res.
zw = ka.z * a.
w;
104 { b /= a;
return b; }
116 xx += b.xx;
xy += b.xy;
xz += b.xz;
xw += b.xw;
117 yy += b.yy;
yz += b.yz;
yw += b.yw;
118 zz += b.zz;
zw += b.zw;
126 xx -= b.xx;
xy -= b.xy;
xz -= b.xz;
xw -= b.xw;
127 yy -= b.yy;
yz -= b.yz;
yw -= b.yw;
128 zz -= b.zz;
zw -= b.zw;
137 yy *= b;
yz *= b;
yw *= b;
146 if constexpr ( std::is_integral_v<T> )
149 yy /= b;
yz /= b;
yw /= b;
BitSet operator-(const BitSet &a, const BitSet &b)
Definition MRMesh/MRBitSet.h:342
Definition MRCameraOrientationPlugin.h:8
constexpr T sqr(T x) noexcept
Definition MRMesh/MRMeshFwd.h:600
Color operator/(const Color &b, float a)
Definition MRColor.h:128
Color operator+(const Color &a, const Color &b)
Definition MRColor.h:108
Definition MRSymMatrix4.h:13
T xz
Definition MRSymMatrix4.h:17
SymMatrix4 & operator-=(const SymMatrix4< T > &b)
SymMatrix4< T > outerSquare(const Vector4< T > &a)
x = a * a^T
Definition MRSymMatrix4.h:63
SymMatrix4 & operator+=(const SymMatrix4< T > &b)
constexpr T normSq() const noexcept
computes the squared norm of the matrix, which is equal to the sum of 16 squared elements
static constexpr SymMatrix4 diagonal(T diagVal) noexcept
Definition MRSymMatrix4.h:30
T zw
Definition MRSymMatrix4.h:19
T xx
zero matrix by default
Definition MRSymMatrix4.h:17
T ww
Definition MRSymMatrix4.h:20
SymMatrix4< T > outerSquare(T k, const Vector4< T > &a)
x = k * a * a^T
Definition MRSymMatrix4.h:75
T zz
Definition MRSymMatrix4.h:19
T xy
Definition MRSymMatrix4.h:17
constexpr SymMatrix4() noexcept=default
T ValueType
Definition MRSymMatrix4.h:14
SymMatrix4 & operator*=(T b)
constexpr T trace() const noexcept
computes trace of the matrix
Definition MRSymMatrix4.h:33
T yz
Definition MRSymMatrix4.h:18
T xw
Definition MRSymMatrix4.h:17
T yy
Definition MRSymMatrix4.h:18
SymMatrix4 & operator/=(T b)
T yw
Definition MRSymMatrix4.h:18
static constexpr SymMatrix4 identity() noexcept
Definition MRSymMatrix4.h:29
Vector4< T > operator*(const SymMatrix4< T > &a, const Vector4< T > &b)
x = a * b
Definition MRSymMatrix4.h:50
Definition MRVector4.h:13
T y
Definition MRVector4.h:19
T z
Definition MRVector4.h:19
T x
Definition MRVector4.h:19
T w
Definition MRVector4.h:19