(define-foreign add-animated-mesh-scene-node
'* "irr_scene_addAnimatedMeshSceneNode" (list '* '* '* int '* '* '* int))
+(define-foreign add-animator
+ void "irr_scene_addAnimator" (list '* '*))
+
(define-foreign add-camera-scene-node
'* "irr_scene_addCameraSceneNode" (list '* '* '* '* int int))
(define-foreign add-octree-scene-node
'* "irr_scene_addOctreeSceneNode" (list '* '* '* int int int))
+(define-foreign create-rotation-animator
+ '* "irr_scene_createRotationAnimator" (list '* '*))
+
(define-foreign draw-all
void "irr_scene_drawAll" (list '*))
#:use-module ((irrlicht bindings video) #:prefix ffi-video:)
#:use-module (irrlicht util)
#:export (add-animated-mesh-scene-node
+ add-animator!
add-camera-scene-node!
add-camera-scene-node-fps!
add-custom-scene-node!
add-octree-scene-node
+ create-rotation-animator
get-mesh
get-root-scene-node
scene-draw-all
(bool->integer also-add-if-mesh-pointer-zero))))
(if (null-pointer? node) #f node)))
+(define (add-animator! node animator)
+ (ffi-scene:add-animator node animator))
+
(define* (add-camera-scene-node! scene-manager
#:key
(parent %null-pointer)
minimal-polys-per-node
(bool->integer also-add-if-mesh-pointer-zero)))
+(define (create-rotation-animator scene-manager rotation-speed)
+ (let ((animator (ffi-scene:create-rotation-animator
+ scene-manager
+ (ffi-core:vector3df->pointer rotation-speed))))
+ (if (null-pointer? animator) #f animator)))
+
(define (get-mesh scene-manager filename)
(let ((mesh (ffi-scene:get-mesh scene-manager (string->pointer filename))))
(if (null-pointer? mesh) #f mesh)))