From: Javier Sancho Date: Fri, 22 May 2020 06:06:33 +0000 (+0200) Subject: add-sphere-scene-node! X-Git-Url: https://git.jsancho.org/?p=guile-irrlicht.git;a=commitdiff_plain;h=d7e2210af78f247a1422fe095c047982631ce95a add-sphere-scene-node! --- diff --git a/irrlicht.scm b/irrlicht.scm index 73ab60d..079268a 100644 --- a/irrlicht.scm +++ b/irrlicht.scm @@ -64,6 +64,7 @@ add-file-archive! add-internal-point! add-octree-scene-node! + add-sphere-scene-node! add-static-text! begin-scene create-device diff --git a/irrlicht/scene.scm b/irrlicht/scene.scm index 0ac4484..2535200 100644 --- a/irrlicht/scene.scm +++ b/irrlicht/scene.scm @@ -141,6 +141,18 @@ (addOctreeSceneNode scene-manager mesh parent id minimal-polys-per-node also-add-if-mesh-pointer-zero)))) +(define-method (add-sphere-scene-node! (scene-manager ) . rest) + (let-keywords rest #f + ((radius 5) + (poly-count 16) + (parent (make )) + (id -1) + (position '(0 0 0)) + (rotation '(0 0 0)) + (scale '(1 1 1))) + (let ((addSphereSceneNode (get-irrlicht-proc "addSphereSceneNode" scene-manager parent))) + (addSphereSceneNode scene-manager radius poly-count parent id position rotation scale)))) + (define-method (create-rotation-animator (scene-manager ) rotation-speed) (let ((createRotationAnimator (get-irrlicht-proc "createRotationAnimator" scene-manager))) (createRotationAnimator scene-manager rotation-speed))) @@ -163,7 +175,7 @@ (export add-animated-mesh-scene-node! add-camera-scene-node! add-camera-scene-node-fps! add-custom-scene-node! add-octree-scene-node! - create-rotation-animator draw-all get-root-scene-node get-mesh) + add-sphere-scene-node! create-rotation-animator draw-all get-root-scene-node get-mesh) ;; ISceneNode