Move Vectormath main
C++20 game and graphics mathematics
Loading...
Searching...
No Matches
Matrices.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cstddef>
4#include <cstdint>
5#include <type_traits>
6
9
11{
12 enum class MatrixMajor : std::uint8_t
13 {
14 Row,
15 Column
16 };
17
18 template <MatrixMajor Major>
19 struct alignas(16) Mat3f16
20 {
22 };
23
24 template <MatrixMajor Major>
25 struct alignas(16) Mat4f16
26 {
28 };
29
34} // namespace mv::math::gpu
35
36static_assert(sizeof(mv::math::gpu::RowMajorMat3f16) == 48);
37static_assert(alignof(mv::math::gpu::RowMajorMat3f16) == 16);
38static_assert(sizeof(mv::math::gpu::ColumnMajorMat3f16) == 48);
39static_assert(alignof(mv::math::gpu::ColumnMajorMat3f16) == 16);
40static_assert(sizeof(mv::math::gpu::RowMajorMat4f16) == 64);
41static_assert(alignof(mv::math::gpu::RowMajorMat4f16) == 16);
42static_assert(sizeof(mv::math::gpu::ColumnMajorMat4f16) == 64);
43static_assert(alignof(mv::math::gpu::ColumnMajorMat4f16) == 16);
44static_assert(std::is_trivially_copyable_v<mv::math::gpu::RowMajorMat3f16>);
45static_assert(std::is_trivially_copyable_v<mv::math::gpu::RowMajorMat4f16>);
Mat3f16< MatrixMajor::Row > RowMajorMat3f16
Definition Matrices.hpp:30
Mat3f16< MatrixMajor::Column > ColumnMajorMat3f16
Definition Matrices.hpp:31
Mat4f16< MatrixMajor::Row > RowMajorMat4f16
Definition Matrices.hpp:32
Mat4f16< MatrixMajor::Column > ColumnMajorMat4f16
Definition Matrices.hpp:33
Float3Slot16 Vectors[3]
Definition Matrices.hpp:21
PackedVec4f Vectors[4]
Definition Matrices.hpp:27