X-Git-Url: https://git.jsancho.org/?p=guile-irrlicht.git;a=blobdiff_plain;f=irrlicht%2Fscene.scm;h=34853d3967db097b13be70c33d70b4ae9105bbac;hp=cfb4da2e5509dab6b84260277cc660090f170441;hb=06d4163c5154f0fd2e934e197bb55d06e1a2b0fa;hpb=ace8386881644858f698721372167ba146987367 diff --git a/irrlicht/scene.scm b/irrlicht/scene.scm index cfb4da2..34853d3 100644 --- a/irrlicht/scene.scm +++ b/irrlicht/scene.scm @@ -176,6 +176,15 @@ (createFlyCircleAnimator scene-manager center radius speed direction start-position radius-ellipsoid)))) +(define-method (create-fly-straight-animator (scene-manager ) + start-point end-point time-for-way . rest) + (let-keywords rest #f + ((loop #f) + (pingpong #f)) + (let ((createFlyStraightAnimator (get-irrlicht-proc "createFlyStraightAnimator" scene-manager))) + (createFlyStraightAnimator scene-manager start-point end-point time-for-way + loop pingpong)))) + (define-method (create-rotation-animator (scene-manager ) rotation-speed) (let ((createRotationAnimator (get-irrlicht-proc "createRotationAnimator" scene-manager))) (createRotationAnimator scene-manager rotation-speed))) @@ -198,8 +207,8 @@ (export 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-fly-circle-animator create-rotation-animator draw-all - get-root-scene-node get-mesh) + add-sphere-scene-node! create-fly-circle-animator create-fly-straight-animator + create-rotation-animator draw-all get-root-scene-node get-mesh) ;; ISceneNode @@ -238,12 +247,20 @@ (define-class () (irr-class #:init-value "IAnimatedMeshSceneNode")) +(define-method (set-animation-speed! (node ) frames-per-second) + (let ((setAnimationSpeed (get-irrlicht-proc "setAnimationSpeed" node))) + (setAnimationSpeed node frames-per-second))) + +(define-method (set-frame-loop! (node ) begin end) + (let ((setFrameLoop (get-irrlicht-proc "setFrameLoop" node))) + (setFrameLoop node begin end))) + (define-method (set-md2-animation! (node ) anim) ((get-irrlicht-proc "setMD2Animation" node) node anim)) -(export set-md2-animation!) +(export set-animation-speed! set-frame-loop! set-md2-animation!) ;; ICameraSceneNode