summaryrefslogtreecommitdiff
path: root/assetFactory/mutation.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-10-20 16:24:14 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2024-10-20 16:24:14 +0100
commit5b6a6f3b241fea6d19521ddbb705e27d5e4c0268 (patch)
tree2c7fd705a6cff4be087f62b9ce940b413f8942b4 /assetFactory/mutation.cpp
parentMisc readability fixes (diff)
downloadilt-5b6a6f3b241fea6d19521ddbb705e27d5e4c0268.tar.bz2
ilt-5b6a6f3b241fea6d19521ddbb705e27d5e4c0268.tar.xz
ilt-5b6a6f3b241fea6d19521ddbb705e27d5e4c0268.zip
Move lots of maths helpers to inline, constexpr, templates
Always for working with different dimensions/types
Diffstat (limited to 'assetFactory/mutation.cpp')
-rw-r--r--assetFactory/mutation.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/assetFactory/mutation.cpp b/assetFactory/mutation.cpp
index 6695dff..2ab2a76 100644
--- a/assetFactory/mutation.cpp
+++ b/assetFactory/mutation.cpp
@@ -1,12 +1,11 @@
#include "mutation.h"
-#include <algorithm>
#include <glm/gtx/transform.hpp>
#include <maths.h>
Mutation::Matrix
Mutation::getMatrix() const
{
- return glm::translate(glm::identity<Matrix>(), position) * rotate_ypr(rotation)
+ return glm::translate(glm::identity<Matrix>(), position) * rotate_ypr<4>(rotation)
* glm::scale(glm::identity<Matrix>(), scale);
}
@@ -19,7 +18,7 @@ Mutation::getDeformationMatrix() const
Mutation::Matrix
Mutation::getLocationMatrix() const
{
- return glm::translate(glm::identity<Matrix>(), position) * rotate_ypr(rotation);
+ return glm::translate(glm::identity<Matrix>(), position) * rotate_ypr<4>(rotation);
}
bool