From: Javier Sancho Date: Mon, 11 May 2020 06:52:16 +0000 (+0200) Subject: add-animated-mesh-scene-node! X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=f87cd7913fc377761f6212859d84e0369b64fa49;p=guile-irrlicht.git add-animated-mesh-scene-node! --- diff --git a/irrlicht.scm b/irrlicht.scm index 2930493..dcb4de5 100644 --- a/irrlicht.scm +++ b/irrlicht.scm @@ -23,7 +23,8 @@ #:use-module (irrlicht device) #:use-module (irrlicht gui) #:use-module (irrlicht scene) - #:re-export (add-static-text! + #:re-export (add-animated-mesh-scene-node! + add-static-text! create-device get-gui-environment get-mesh diff --git a/irrlicht/scene.scm b/irrlicht/scene.scm index 6f6d5e9..da0336b 100644 --- a/irrlicht/scene.scm +++ b/irrlicht/scene.scm @@ -20,8 +20,10 @@ (define-module (irrlicht scene) #:use-module (oop goops) + #:use-module (ice-9 optargs) #:use-module (irrlicht base) #:use-module (irrlicht foreign) + #:use-module (irrlicht io) #:use-module (irrlicht irr)) @@ -43,6 +45,26 @@ (define-class () (irr-class #:init-value "ISceneManager" #:getter irr-class)) +(define-method (add-animated-mesh-scene-node! (scene-manager ) mesh . rest) + (let-keywords rest #f + ((parent (make )) + (id -1) + (position '(0 0 0)) + (rotation '(0 0 0)) + (scale '(1 1 1)) + (also-add-if-mesh-pointer-zero #f)) + (make + #:irr-pointer + ((get-irrlicht-proc "addAnimatedMeshSceneNode" scene-manager parent) + (irr-pointer scene-manager) + (irr-pointer mesh) + (irr-pointer parent) + id + position + rotation + scale + also-add-if-mesh-pointer-zero)))) + (define-method (get-mesh (scene-manager ) filename) (make #:irr-pointer @@ -50,4 +72,18 @@ (irr-pointer scene-manager) filename))) -(export get-mesh) +(export add-animated-mesh-scene-node! get-mesh) + + +;; ISceneNode +(define-class () + (irr-class #:init-value "ISceneNode" #:getter irr-class)) + +(export ) + + +;; ISceneNode +(define-class () + (irr-class #:init-value "IAnimatedMeshSceneNode" #:getter irr-class)) + +(export )