]> git.jsancho.org Git - guile-irrlicht.git/commitdiff
add-cube-scene-node!
authorJavier Sancho <jsf@jsancho.org>
Fri, 22 May 2020 06:11:33 +0000 (08:11 +0200)
committerJavier Sancho <jsf@jsancho.org>
Fri, 22 May 2020 06:11:33 +0000 (08:11 +0200)
irrlicht.scm
irrlicht/scene.scm

index 079268ae12599f89eb91899a62e49c65931faea7..a6e3eb12324d2b1eb50cf276289e9a3f1e6d6e9e 100644 (file)
@@ -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!
index 25352005aed785664215afa9ed9687cb41bf2a32..34a11eadd9ee8cc3d3560208b3e8c60cf9907405 100644 (file)
                              #:jump-speed jump-speed #:invert-mouse invert-mouse
                              #:make-active make-active))))
 
+(define-method (add-cube-scene-node! (scene-manager <scene-manager>) . rest)
+  (let-keywords rest #f
+        ((size 10)
+         (parent (make <scene-node>))
+         (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 <scene-manager>) proc-render
                                        proc-get-bounding-box  proc-get-material-count
                                        proc-get-material . rest)
   (let ((getRootSceneNode (get-irrlicht-proc "getRootSceneNode" scene-manager)))
     (getRootSceneNode scene-manager)))
 
-(export <scene-manager> add-animated-mesh-scene-node! add-camera-scene-node!
+(export <scene-manager> 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)