From ace8386881644858f698721372167ba146987367 Mon Sep 17 00:00:00 2001 From: Javier Sancho Date: Fri, 22 May 2020 08:20:33 +0200 Subject: [PATCH] create-fly-circle-animator --- irrlicht.scm | 1 + irrlicht/scene.scm | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/irrlicht.scm b/irrlicht.scm index a6e3eb1..964c91a 100644 --- a/irrlicht.scm +++ b/irrlicht.scm @@ -69,6 +69,7 @@ add-static-text! begin-scene create-device + create-fly-circle-animator create-rotation-animator draw-vertex-primitive-list drop! diff --git a/irrlicht/scene.scm b/irrlicht/scene.scm index 34a11ea..cfb4da2 100644 --- a/irrlicht/scene.scm +++ b/irrlicht/scene.scm @@ -164,6 +164,18 @@ (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-rotation-animator (scene-manager ) rotation-speed) (let ((createRotationAnimator (get-irrlicht-proc "createRotationAnimator" scene-manager))) (createRotationAnimator scene-manager rotation-speed))) @@ -186,7 +198,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-rotation-animator draw-all + get-root-scene-node get-mesh) ;; ISceneNode -- 2.39.2