;;; guile-irrlicht --- FFI bindings for Irrlicht Engine
-;;; Copyright (C) 2019 Javier Sancho <jsf@jsancho.org>
+;;; Copyright (C) 2020 Javier Sancho <jsf@jsancho.org>
;;;
;;; This file is part of guile-irrlicht.
;;;
(define-module (irrlicht core)
- #:use-module ((irrlicht bindings core) #:prefix ffi-core:)
- #:re-export ((ffi-core:make-aabbox3df . make-aabbox3df)))
+ #:use-module (oop goops)
+ #:use-module (irrlicht base)
+ #:use-module (irrlicht foreign))
+
+
+;; aabbox3d
+(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")))
+ (aabbox3d_make)))
+
+(define-method (reset-box3d! (box3d <box3d>) init-value)
+ (let ((reset (get-irrlicht-proc "aabbox3d_reset")))
+ (reset box3d init-value)))
+
+(export <box3d> add-internal-point! make-box3d reset-box3d!)