From cda8d6e3636e9ad6878b8e6b0c4449f6f9c635f0 Mon Sep 17 00:00:00 2001 From: Javier Sancho Date: Mon, 11 May 2020 14:12:52 +0200 Subject: [PATCH] add-camera-scene-node! --- irrlicht.scm | 1 + irrlicht/scene.scm | 32 +++++++++++++++++++++++++++++--- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/irrlicht.scm b/irrlicht.scm index 60a4f35..9421ef6 100644 --- a/irrlicht.scm +++ b/irrlicht.scm @@ -25,6 +25,7 @@ #:use-module (irrlicht scene) #:use-module (irrlicht video) #:re-export (add-animated-mesh-scene-node! + add-camera-scene-node! add-static-text! create-device get-gui-environment diff --git a/irrlicht/scene.scm b/irrlicht/scene.scm index 3ca6326..c1fac94 100644 --- a/irrlicht/scene.scm +++ b/irrlicht/scene.scm @@ -46,7 +46,9 @@ (define-class () (irr-class #:init-value "ISceneManager" #:getter irr-class)) -(define-method (add-animated-mesh-scene-node! (scene-manager ) mesh . rest) +(define-method (add-animated-mesh-scene-node! (scene-manager ) + (mesh ) + . rest) (let-keywords rest #f ((parent (make )) (id -1) @@ -66,6 +68,23 @@ scale also-add-if-mesh-pointer-zero)))) +(define-method (add-camera-scene-node! (scene-manager ) . rest) + (let-keywords rest #f + ((parent (make )) + (position '(0 0 0)) + (lookat '(0 0 100)) + (id -1) + (make-active #t)) + (make + #:irr-pointer + ((get-irrlicht-proc "addCameraSceneNode" scene-manager parent) + (irr-pointer scene-manager) + (irr-pointer parent) + position + lookat + id + make-active)))) + (define-method (get-mesh (scene-manager ) filename) (make #:irr-pointer @@ -73,7 +92,7 @@ (irr-pointer scene-manager) filename))) -(export add-animated-mesh-scene-node! get-mesh) +(export add-animated-mesh-scene-node! add-camera-scene-node! get-mesh) ;; ISceneNode @@ -95,7 +114,7 @@ (export set-material-flag! set-material-texture!) -;; ISceneNode +;; IAnimatedMeshSceneNode (define-class () (irr-class #:init-value "IAnimatedMeshSceneNode" #:getter irr-class)) @@ -105,3 +124,10 @@ anim)) (export set-md2-animation!) + + +;; ICameraSceneNode +(define-class () + (irr-class #:init-value "ICameraSceneNode" #:getter irr-class)) + +(export ) -- 2.39.5