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

index 345a5c787e0271c2048e4301024fb14bd273e37a..11fcb966b753c8ebabbba9c19eafb21cd0b45642 100644 (file)
@@ -30,6 +30,7 @@
   #:use-module (irrlicht video)
   #:duplicates (merge-generics)
   #:re-export (add-animated-mesh-scene-node!
+               add-animator!
                add-camera-scene-node!
                add-camera-scene-node-fps!
                add-custom-scene-node!
index 45b2c9b4445aa69f21267e5dde15e527ee50e8e7..e084cccba4a0ba803c866249ccc1a3883d905aca 100644 (file)
 (export <animated-mesh>)
 
 
+;; ISceneNodeAnimator
+(define-class <scene-node-animator> (<attribute-exchanging-object> <event-receiver>)
+  (irr-class #:init-value "ISceneNodeAnimator"))
+
+(export <scene-node-animator>)
+
+
 ;; ISceneManager
 (define-class <scene-manager> (<reference-counted>)
   (irr-class #:init-value "ISceneManager"))
 (define-class <scene-node> (<attribute-exchanging-object>)
   (irr-class #:init-value "ISceneNode"))
 
+(define-method (add-animator! (node <scene-node>) (animator <scene-node-animator>))
+  (let ((addAnimator (get-irrlicht-proc "addAnimator" node)))
+    (addAnimator node animator)))
+
 (define-method (set-material-flag! (node <scene-node>) flag new-value)
   ((get-irrlicht-proc "setMaterialFlag" node)
    node
   (let ((setPosition (get-irrlicht-proc "setPosition" node)))
     (setPosition node new-pos)))
 
-(export <scene-node> set-material-flag! set-material-texture! set-position!)
+(export <scene-node> add-animator! set-material-flag! set-material-texture! set-position!)
 
 
 ;; IAnimatedMeshSceneNode
   (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>)