| 2397 | |
| 2398 | template <typename type_struct> |
| 2399 | class Mat3D |
| 2400 | { |
| 2401 | public: |
| 2402 | |
| 2403 | typedef typename type_struct::component_type component_type; |
| 2404 | typedef typename type_struct::column_type_struct column_type_struct; |
| 2405 | typedef typename type_struct::row_type_struct row_type_struct; |
| 2406 | |
| 2407 | union |
| 2408 | { |
| 2409 | Component<type_struct, 9, 0> m00; |
| 2410 | Component<type_struct, 9, 1> m10; |
| 2411 | Component<type_struct, 9, 2> m20; |
| 2412 | Component<type_struct, 9, 3> m01; |
| 2413 | Component<type_struct, 9, 4> m11; |
| 2414 | Component<type_struct, 9, 5> m21; |
| 2415 | Component<type_struct, 9, 6> m02; |
| 2416 | Component<type_struct, 9, 7> m12; |
| 2417 | Component<type_struct, 9, 8> m22; |
| 2418 | Subvec3D<column_type_struct, false, 9, 0, 1, 2> col0; |
| 2419 | Subvec3D<column_type_struct, false, 9, 3, 4, 5> col1; |
| 2420 | Subvec3D<column_type_struct, false, 9, 6, 7, 8> col2; |
| 2421 | Subvec3D<row_type_struct, true, 9, 0, 3, 6> row0; |
| 2422 | Subvec3D<row_type_struct, true, 9, 1, 4, 7> row1; |
| 2423 | Subvec3D<row_type_struct, true, 9, 2, 5, 8> row2; |
| 2424 | Submat2D<type_struct, 9, 0, 3, 1, 4> matrix2D; |
| 2425 | Submat2D<type_struct, 9, 0, 1, 3, 4> transpose2D; |
| 2426 | Submat3D<type_struct, 9, 0, 3, 6, 1, 4, 7, 2, 5, 8> matrix; |
| 2427 | Submat3D<type_struct, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8> transpose; |
| 2428 | }; |
| 2429 | |
| 2430 | protected: |
| 2431 | |
| 2432 | inline Mat3D() = default; |
| 2433 | |
| 2434 | Mat3D(const Mat3D& m) |
| 2435 | { |
| 2436 | matrix = m.matrix; |
| 2437 | } |
| 2438 | |
| 2439 | Mat3D(const component_type& n00, const component_type& n01, const component_type& n02, const component_type& n10, const component_type& n11, const component_type& n12, const component_type& n20, const component_type& n21, const component_type& n22) |
| 2440 | { |
| 2441 | matrix.Set(n00, n01, n02, n10, n11, n12, n20, n21, n22); |
| 2442 | } |
| 2443 | |
| 2444 | public: |
| 2445 | |
| 2446 | component_type& operator ()(machine i, machine j) |
| 2447 | { |
| 2448 | return (matrix.data[j * 3 + i]); |
| 2449 | } |
| 2450 | |
| 2451 | const component_type& operator ()(machine i, machine j) const |
| 2452 | { |
| 2453 | return (matrix.data[j * 3 + i]); |
| 2454 | } |
| 2455 | |
| 2456 | typename column_type_struct::vector3D_type& operator [](machine j) |
nothing calls this directly
no outgoing calls
no test coverage detected