Entwickler: gamematrix.h aktualisiert
This commit is contained in:
parent
e4e3bcf558
commit
1c2af4eff0
@ -4,16 +4,20 @@
|
||||
#include <stdexcept>
|
||||
#include <cmath>
|
||||
|
||||
class gameMatrix
|
||||
namespace Matrix3D
|
||||
{
|
||||
public:
|
||||
// Matrix Multiplikation
|
||||
static std::array<std::array<double,4>,4> matmul(const std::array<std::array<double,4>,4>& A,
|
||||
const std::array<std::array<double,4>,4>& B);
|
||||
using Vec3 = std::array<double, 3>;
|
||||
using Vec4 = std::array<double, 4>;
|
||||
using Mat4 = std::array<std::array<double, 4>, 4>;
|
||||
|
||||
// Rotationsmatrix um Achse x/y/z
|
||||
static std::array<std::array<double,4>,4> rot3D(double angle_deg, char axis);
|
||||
|
||||
// Verschiebung
|
||||
static std::array<std::array<double,4>,4> translate(const std::array<double, 3>& pos);
|
||||
};
|
||||
class gameMatrix
|
||||
{
|
||||
public:
|
||||
static Mat4 identity();
|
||||
static Mat4 matmul(const Mat4& A, const Mat4& B);
|
||||
static Mat4 translate(const Vec3& pos);
|
||||
static Mat4 rot3D(double angle_deg, char axis);
|
||||
};
|
||||
Mat4 operator*(const Mat4& A, const Mat4& B);
|
||||
Vec3 operator*(const Mat4& m, const Vec3& v);
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user