X-Git-Url: https://git.jsancho.org/?p=guile-irrlicht.git;a=blobdiff_plain;f=irrlicht%2Fscene.scm;h=25352005aed785664215afa9ed9687cb41bf2a32;hp=0ac44842f5fff33f744506b1f4864839dc22426d;hb=d7e2210af78f247a1422fe095c047982631ce95a;hpb=5d5dfa18d1acb2c3fa05df26b285ff430c9aff89 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