]> git.jsancho.org Git - guile-irrlicht.git/commitdiff
create-rotation-animator
authorJavier Sancho <jsf@jsancho.org>
Sun, 17 May 2020 06:14:19 +0000 (08:14 +0200)
committerJavier Sancho <jsf@jsancho.org>
Sun, 17 May 2020 06:14:19 +0000 (08:14 +0200)
irrlicht.scm
irrlicht/scene.scm

index 7427cad2a6fdc619228742545083ba28b245e844..345a5c787e0271c2048e4301024fb14bd273e37a 100644 (file)
@@ -39,6 +39,7 @@
                add-static-text!
                begin-scene
                create-device
+               create-rotation-animator
                drop!
                end-scene
                get-cursor-control
index 6c55a3d0cda9c2c7729a84484c216e851ed4d294..45b2c9b4445aa69f21267e5dde15e527ee50e8e7 100644 (file)
         (addOctreeSceneNode scene-manager mesh parent id minimal-polys-per-node
                             also-add-if-mesh-pointer-zero)))))
 
+(define-method (create-rotation-animator (scene-manager <scene-manager>) rotation-speed)
+  (let ((createRotationAnimator (get-irrlicht-proc "createRotationAnimator" scene-manager)))
+    (make <scene-node-animator>
+      #:irr-pointer
+      (createRotationAnimator scene-manager rotation-speed))))
+
 (define-method (draw-all (scene-manager <scene-manager>))
   ((get-irrlicht-proc "drawAll" scene-manager)
    scene-manager))
     (make <scene-node> #:irr-pointer (getRootSceneNode scene-manager))))
 
 (export <scene-manager> add-animated-mesh-scene-node! add-camera-scene-node!
-        add-camera-scene-node-fps! add-custom-scene-node! add-octree-scene-node! draw-all
-        get-root-scene-node get-mesh)
+        add-camera-scene-node-fps! add-custom-scene-node! add-octree-scene-node!
+        create-rotation-animator draw-all get-root-scene-node get-mesh)
 
 
 ;; ISceneNode
   (irr-class #:init-value "IMeshSceneNode"))
 
 (export <mesh-scene-node>)
+
+
+;; ISceneNodeAnimator
+(define-class <scene-node-animator> (<attribute-exchanging-object> <event-receiver>)
+  (irr-class #:init-value "ISceneNodeAnimator"))
+
+(export <scene-node-animator>)