math/Vector: Add Vector3 rotation

This commit is contained in:
Léo Lam
2022-03-23 23:34:10 +01:00
parent cb6b94aab4
commit 1a419d0497
4 changed files with 54 additions and 3 deletions
+7 -1
View File
@@ -28,10 +28,16 @@ public:
static void add(Base& o, const Base& a, const Base& b);
static void sub(Base& o, const Base& a, const Base& b);
/// Apply a rotation `m` to the vector `a`.
static void mul(Base& o, const Mtx33& m, const Base& a);
/// Apply a transformation `m` (rotation + translation) to the vector `a`.
/// Apply a transformation `m` (rotation then translation) to the vector `a`.
static void mul(Base& o, const Mtx34& m, const Base& a);
/// Apply a rotation `m` to the vector `a`.
static void rotate(Base& o, const Mtx33& m, const Base& a);
/// Apply a rotation `m` to the vector `a`.
static void rotate(Base& o, const Mtx34& m, const Base& a);
static void cross(Base& o, const Base& a, const Base& b);
static T dot(const Base& a, const Base& b);
static T squaredLength(const Base& v);