From c666734625238d6e4405ad5e42def3203503a137 Mon Sep 17 00:00:00 2001 From: Javier Sancho Date: Fri, 22 May 2020 08:11:33 +0200 Subject: [PATCH] add-cube-scene-node! --- irrlicht.scm | 1 + irrlicht/scene.scm | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/irrlicht.scm b/irrlicht.scm index 079268a..a6e3eb1 100644 --- a/irrlicht.scm +++ b/irrlicht.scm @@ -60,6 +60,7 @@ add-animator! add-camera-scene-node! add-camera-scene-node-fps! + add-cube-scene-node! add-custom-scene-node! add-file-archive! add-internal-point! diff --git a/irrlicht/scene.scm b/irrlicht/scene.scm index 2535200..34a11ea 100644 --- a/irrlicht/scene.scm +++ b/irrlicht/scene.scm @@ -104,6 +104,17 @@ #:jump-speed jump-speed #:invert-mouse invert-mouse #:make-active make-active)))) +(define-method (add-cube-scene-node! (scene-manager ) . rest) + (let-keywords rest #f + ((size 10) + (parent (make )) + (id -1) + (position '(0 0 0)) + (rotation '(0 0 0)) + (scale '(1 1 1))) + (let ((addCubeSceneNode (get-irrlicht-proc "addCubeSceneNode" scene-manager parent))) + (addCubeSceneNode scene-manager size parent id position rotation scale)))) + (define-method (add-custom-scene-node! (scene-manager ) proc-render proc-get-bounding-box proc-get-material-count proc-get-material . rest) @@ -173,7 +184,7 @@ (let ((getRootSceneNode (get-irrlicht-proc "getRootSceneNode" scene-manager))) (getRootSceneNode scene-manager))) -(export add-animated-mesh-scene-node! add-camera-scene-node! +(export add-animated-mesh-scene-node! add-cube-scene-node! add-camera-scene-node! add-camera-scene-node-fps! add-custom-scene-node! add-octree-scene-node! add-sphere-scene-node! create-rotation-animator draw-all get-root-scene-node get-mesh) -- 2.39.5