Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
TMatrix3.h
Go to the documentation of this file.
1#pragma once
2
4#include "Math/math_fwd.h"
5
6#include <string>
7#include <array>
8
9namespace ph::math
10{
11
14template<typename T>
15class TMatrix3 final : public TMatrixNBase<TMatrix3<T>, T, 3>
16{
17private:
18 using Base = TMatrixNBase<TMatrix3<T>, T, 3>;
19
20protected:
21 using Base::m;
22
23public:
24 inline TMatrix3() = default;
25 inline TMatrix3(const TMatrix3& other) = default;
26 inline TMatrix3(TMatrix3&& other) = default;
27 inline TMatrix3& operator = (const TMatrix3& rhs) = default;
28 inline TMatrix3& operator = (TMatrix3&& rhs) = default;
29 inline ~TMatrix3() = default;
30
31 using Base::Base;
32
33 template<typename U>
34 explicit TMatrix3(const TMatrix3<U>& other);
35
37 T m00, T m01, T m02,
38 T m10, T m11, T m12,
39 T m20, T m21, T m22);
40
41public:
42 TVector3<T> mul(const TVector3<T>& rhsColVector) const;
43
44 TMatrix3 inverse() const;
45 T determinant() const;
46
47 TVector3<T> operator * (const TVector3<T>& rhsColVector) const;
48
49 using Base::mul;
50};
51
52}// end namespace ph::math
53
54#include "Math/TMatrix3.ipp"
Represents a 3x3 matrix.
Definition TMatrix3.h:16
TMatrix3 & operator=(const TMatrix3 &rhs)=default
TVector3< T > operator*(const TVector3< T > &rhsColVector) const
Definition TMatrix3.ipp:74
T determinant() const
Definition TMatrix3.ipp:60
TMatrix3(const TMatrix3 &other)=default
TMatrix3(TMatrix3 &&other)=default
TVector3< T > mul(const TVector3< T > &rhsColVector) const
Definition TMatrix3.ipp:68
TMatrix3 inverse() const
Definition TMatrix3.ipp:36
TRawMatrix< T, M, N > m
Definition TMatrixMxNBase.h:77
A base for general N dimensional row-major square matrices.
Definition TMatrixNBase.h:17
TMatrix3< T > mul(const TMatrix3< T > &rhsMatrix) const
Definition TMatrixNBase.ipp:41
Represents a 3-D vector.
Definition TVector3.h:17
Math functions and utilities.
Definition TransformInfo.h:10