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