summaryrefslogtreecommitdiff
path: root/honey/glm.lua
diff options
context:
space:
mode:
Diffstat (limited to 'honey/glm.lua')
-rw-r--r--honey/glm.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/honey/glm.lua b/honey/glm.lua
index 3357815..c950b9a 100644
--- a/honey/glm.lua
+++ b/honey/glm.lua
@@ -167,6 +167,7 @@ end
function Vec3.normalize(self)
glm.vec3_normalize(self.data)
+ return self
end
function Vec3.normalizeTo(self, dest)
glm.vec3_normalize_to(self.data, dest.data)
@@ -288,6 +289,11 @@ function Mat4.mul(self, other)
glm.mat4_mul(self.data, other.data, self.data)
return self
end
+function Mat4.mulv3(self, v)
+ local dest = Vec3()
+ glm.mat4_mulv3(self.data, v.data, 1.0, dest.data)
+ return dest
+end
function Mat4.translate(self, vec)