2 #include <mof/math/basic_matrix.hpp>
11 * @brief 2次元同次座標変換行列クラス
13 class matrix2 : public basic_matrix<2, matrix2, vector2>
19 * @note 効率のため,初期化は行われない
27 * @tparam T 配列型(operator[]をオーバーロードしていること)
28 * @param[in] arr 初期化用配列
31 explicit matrix2(const T& arr)
33 for (size_t i = 0; i < size(); ++i) {
34 components_[i] = arr[i];
43 float m11, float m12, float m13,
44 float m21, float m22, float m23
47 const float* table[] =
52 for (size_t i = 0; i < size(); ++i) {
53 components_[i] = *table[i];
58 //{{{ copy constructor
59 matrix2(const matrix2& rhs)
61 for (size_t i = 0; i < size(); ++i) {
62 components_[i] = rhs.components_[i];
67 matrix2& operator = (const matrix2& rhs)
70 for (size_t i = 0; i < size(); ++i) {
71 components_[i] = rhs.components_[i];
73 for (size_t i = 0; i <= last_index() - 1; ++i) {
74 elements_[i] = rhs.elements_[i];
75 >>>>>>> 01b4978a6b6cd046ad399644ea70ddec977a688a