X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;ds=sidebyside;f=irrlicht%2Fscene.scm;h=a20b78c0ef564d5bebc33183ef64d1bb5038c29f;hb=ab54371cc4ae479cf31149e184bf6978db8ae4ad;hp=34a11eadd9ee8cc3d3560208b3e8c60cf9907405;hpb=c666734625238d6e4405ad5e42def3203503a137;p=guile-irrlicht.git diff --git a/irrlicht/scene.scm b/irrlicht/scene.scm index 34a11ea..a20b78c 100644 --- a/irrlicht/scene.scm +++ b/irrlicht/scene.scm @@ -164,6 +164,27 @@ (let ((addSphereSceneNode (get-irrlicht-proc "addSphereSceneNode" scene-manager parent))) (addSphereSceneNode scene-manager radius poly-count parent id position rotation scale)))) +(define-method (create-fly-circle-animator (scene-manager ) . rest) + (let-keywords rest #f + ((center '(0 0 0)) + (radius 100) + (speed 0.001) + (direction '(0 1 0)) + (start-position 0) + (radius-ellipsoid 0)) + (let ((createFlyCircleAnimator (get-irrlicht-proc "createFlyCircleAnimator" scene-manager))) + (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))) @@ -186,7 +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-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 @@ -225,12 +247,16 @@ (define-class () (irr-class #:init-value "IAnimatedMeshSceneNode")) +(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-frame-loop! set-md2-animation!) ;; ICameraSceneNode