|
Photon Engine 2.0.0-beta
A physically based renderer.
|
Represents a 2x2 matrix. More...
#include <TMatrix2.h>
Public Types | |
| using | Elements = std::array<std::array<T, 2>, 2> |
Public Member Functions | |
| TMatrix2 ()=default | |
| TMatrix2 (T value) | |
| TMatrix2 (T m00, T m01, T m10, T m11) | |
| TMatrix2 (const TVector2< T > &m00m01, const TVector2< T > &m10m11) | |
| TMatrix2 (const TMatrix2 &other)=default | |
| template<typename U > | |
| TMatrix2 (const TMatrix2< U > &other) | |
| TMatrix2 & | initIdentity () |
| TMatrix2 | mul (const TMatrix2 &rhs) const |
| TMatrix2 | mul (T value) const |
| void | mul (const TMatrix2 &rhs, TMatrix2 *out_result) const |
| TMatrix2 & | mulLocal (T value) |
| TMatrix2 | inverse () const |
| T | determinant () const |
| bool | solve (const std::array< T, 2 > &b, std::array< T, 2 > *out_x) const |
| Solves linear systems of the form Ax = b. | |
| bool | solve (const TVector2< T > &b, TVector2< T > *out_x) const |
| Solves linear systems of the form Ax = b. | |
| template<std::size_t N> | |
| bool | solve (const std::array< std::array< T, 2 >, N > &bs, std::array< std::array< T, 2 >, N > *out_xs) const |
| Solve N linear systems of the form Ax = b. | |
| std::string | toString () const |
Static Public Member Functions | |
| static TMatrix2 | makeIdentity () |
Public Attributes | |
| Elements | m |
Represents a 2x2 matrix.
| using ph::math::TMatrix2< T >::Elements = std::array<std::array<T, 2>, 2> |
|
inlinedefault |
|
inlineexplicit |
|
inline |
|
inline |
|
inlinedefault |
|
inlineexplicit |
|
inline |
|
inline |
|
inline |
|
inlinestatic |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Solve N linear systems of the form Ax = b.
Treating this matrix as A, linear systems A*x_i = b_i (0 <= i < N) are solved. This is equivalent to having bs as a 2 by N matrix and passing them in column-major (out_xs follows similarly, except it's for outputs).
| A | A 2x2 matrix. | |
| bs | N 2x1 vectors (or a 2xN matrix in column-major). | |
| [out] | out_xs | N 2x1 vectors (or a 2xN matrix in column-major). |
true and out_xs stores the answer; otherwise, false is returned and what out_xs stores is undefined.
|
inline |
Solves linear systems of the form Ax = b.
Treating this matrix as A.
| b | A 2x1 vector. | |
| [out] | out_x | A 2x1 vector. |
true and out_x stores the answer; otherwise, false is returned and what out_x stores is undefined.
|
inline |
Solves linear systems of the form Ax = b.
See solve(const std::array<T, 2>&, std::array<T, 2>*) for details.
|
inline |
| Elements ph::math::TMatrix2< T >::m |