]> git.jsancho.org Git - guile-irrlicht.git/commitdiff
get-position add-internal-point!
authorJavier Sancho <jsf@jsancho.org>
Sat, 16 May 2020 06:45:21 +0000 (08:45 +0200)
committerJavier Sancho <jsf@jsancho.org>
Sat, 16 May 2020 06:45:21 +0000 (08:45 +0200)
examples/03-custom-scene-node.scm
irrlicht.scm
irrlicht/core.scm
irrlicht/video.scm

index 0476e729b149c02dfc5859439049b79e6d504dc7..e84f36abb4286dd7616b39d17b22eacf2559aadd 100644 (file)
         (make-vertex3d '(-10 0 -10) '(0 0 1) '(255 0 255 0) '(0 0))))
 (define material (make-material #:wireframe #f #:lighting #f))
 
-(reset-box3d! box (vertex3d-position (car vertices)))
+(reset-box3d! box (get-position (car vertices)))
 (for-each
  (lambda (vertex)
-   (box3d-add-internal-point! box (vertex3d-position vertex)))
+   (add-internal-point! box (get-position vertex)))
  (cdr vertices))
 
 (define (custom-render)
index d68ec1b5cd056617ce1ea60d4a2309709067fd76..87e029c158d6663427b7cb8ee62a041c5c1bda98 100644 (file)
@@ -33,6 +33,7 @@
                add-camera-scene-node!
                add-camera-scene-node-fps!
                add-file-archive!
+               add-internal-point!
                add-octree-scene-node!
                add-static-text!
                begin-scene
@@ -45,6 +46,7 @@
                get-gui-environment
                get-mesh
                get-name
+               get-position
                get-scene-manager
                get-texture
                get-video-driver
index 7d97476f35b156cdc8e7d919d2896067cf73a611..2b714727bd5ca4b342a7df72d35628f836ea465f 100644 (file)
 (define-class <box3d> (<irrlicht-base>)
   (irr-class #:init-value "aabbox3d"))
 
+(define-method (add-internal-point! (box3d <box3d>) point)
+  (let ((addInternalPoint (get-irrlicht-proc "aabbox3d_addInternalPoint")))
+    (addInternalPoint box3d point)))
+
 (define (make-box3d)
   (let ((aabbox3d_make (get-irrlicht-proc "aabbox3d_make")))
     (make <box3d> #:irr-pointer (aabbox3d_make))))
@@ -36,4 +40,4 @@
   (let ((reset (get-irrlicht-proc "aabbox3d_reset")))
     (reset box3d init-value)))
 
-(export <box3d> make-box3d reset-box3d!)
+(export <box3d> add-internal-point! make-box3d reset-box3d!)
index 9acfa1853c7cc3272286e5ee5d7ebcfb78f7f1a0..c6531f09edc9bdda8a962e4b687f0e314c949a50 100644 (file)
 (define-class <vertex3d> (<irrlicht-base>)
   (irr-class #:init-value "S3DVertex"))
 
+(define-method (get-position (vertex3d <vertex3d>))
+  (let ((S3DVertex_Pos (get-irrlicht-proc "S3DVertex_Pos")))
+    (S3DVertex_Pos vertex3d)))
+
 (define (make-vertex3d position normal color tcoords)
   (let ((S3DVertex_make (get-irrlicht-proc "S3DVertex_make")))
     (make <vertex3d>
       #:irr-pointer
       (S3DVertex_make position normal color tcoords))))
 
-(export <vertex3d> make-vertex3d)
+(export <vertex3d> get-position make-vertex3d)
 
 
 ;; SMaterial