From df1088b80d2c90a390b0229ce5c6ffcc7665fda4 Mon Sep 17 00:00:00 2001 From: Javier Sancho Date: Sat, 16 May 2020 08:36:14 +0200 Subject: [PATCH] reset-box3d! --- examples/03-custom-scene-node.scm | 2 +- irrlicht.scm | 1 + irrlicht/core.scm | 6 +++++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/examples/03-custom-scene-node.scm b/examples/03-custom-scene-node.scm index 21e5be8..0476e72 100644 --- a/examples/03-custom-scene-node.scm +++ b/examples/03-custom-scene-node.scm @@ -75,7 +75,7 @@ (make-vertex3d '(-10 0 -10) '(0 0 1) '(255 0 255 0) '(0 0)))) (define material (make-material #:wireframe #f #:lighting #f)) -(box3d-reset! box (vertex3d-position (car vertices))) +(reset-box3d! box (vertex3d-position (car vertices))) (for-each (lambda (vertex) (box3d-add-internal-point! box (vertex3d-position vertex))) diff --git a/irrlicht.scm b/irrlicht.scm index 74a02d3..d68ec1b 100644 --- a/irrlicht.scm +++ b/irrlicht.scm @@ -53,6 +53,7 @@ make-box3d make-material make-vertex3d + reset-box3d! run set-material-flag! set-material-texture! diff --git a/irrlicht/core.scm b/irrlicht/core.scm index 0604076..7d97476 100644 --- a/irrlicht/core.scm +++ b/irrlicht/core.scm @@ -32,4 +32,8 @@ (let ((aabbox3d_make (get-irrlicht-proc "aabbox3d_make"))) (make #:irr-pointer (aabbox3d_make)))) -(export make-box3d) +(define-method (reset-box3d! (box3d ) init-value) + (let ((reset (get-irrlicht-proc "aabbox3d_reset"))) + (reset box3d init-value))) + +(export make-box3d reset-box3d!) -- 2.39.5