From f417d2b047369cac234c471ef37ab8281181d69f Mon Sep 17 00:00:00 2001 From: sanine-a Date: Wed, 2 Dec 2020 01:42:21 -0600 Subject: create basic scene tree node --- demo/main.lua | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'demo') diff --git a/demo/main.lua b/demo/main.lua index 3fabe00..ec0bac1 100644 --- a/demo/main.lua +++ b/demo/main.lua @@ -1,9 +1,19 @@ +local root = honey.node(nil, + honey.glm.vec3{0,0,0}, + honey.glm.vec3{0,0,0}, + honey.glm.vec3{1,1,1}) + +local child = honey.node(root, + honey.glm.vec3{0,0,0}, + honey.glm.vec3{0,0,0}, + honey.glm.vec3{1,1,1}) + local v = honey.glm.vec3{1, 2, 3} -local M = honey.glm.mat3() +local M = honey.glm.mat4() M:set(1,3, 1) -print(M:mulv(v)) +print(M:mul(M)) print(v) print(honey.glm.vec3{2, 0.001, 0}) -- cgit v1.2.1