From 4dafa2b53578c8d82eec6c3363568b5bfd7ac183 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 23 Apr 2023 21:08:41 +0100 Subject: Add getTransform to Location; wraps the standard mat4 calculations --- lib/location.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 lib/location.cpp (limited to 'lib/location.cpp') diff --git a/lib/location.cpp b/lib/location.cpp new file mode 100644 index 0000000..bff27a2 --- /dev/null +++ b/lib/location.cpp @@ -0,0 +1,9 @@ +#include "location.hpp" +#include "maths.h" +#include + +glm::mat4 +Location::getTransform() const +{ + return glm::translate(pos) * rotate_ypr(rot); +} -- cgit v1.2.3