(define-module (irrlicht)
+ #:use-module (irrlicht base)
#:use-module (irrlicht device)
#:use-module (irrlicht gui)
+ #:use-module (irrlicht scene)
#:re-export (add-static-text!
create-device
get-gui-environment
+ get-mesh
get-scene-manager
get-video-driver
+ is-empty?
set-window-caption!))
#:use-module (system foreign)
#:export (<irrlicht-base>
irr-class
- irr-pointer))
+ irr-pointer
+ is-empty?))
(define-class <irrlicht-base> ()
(irr-class #:init-value "" #:getter irr-class)
(irr-pointer #:init-value %null-pointer #:getter irr-pointer #:init-keyword #:irr-pointer))
+
+(define-method (is-empty? (obj <irrlicht-base>))
+ (equal? (irr-pointer obj) %null-pointer))
(define-module (irrlicht scene)
#:use-module (oop goops)
+ #:use-module (irrlicht base)
#:use-module (irrlicht foreign)
#:use-module (irrlicht irr))
+;; IMesh
+(define-class <mesh> (<reference-counted>)
+ (irr-class #:init-value "IMesh" #:getter irr-class))
+
+(export <mesh>)
+
+
+;; IAnimatedMesh
+(define-class <animated-mesh> (<mesh>)
+ (irr-class #:init-value "IAnimatedMesh" #:getter irr-class))
+
+(export <animated-mesh>)
+
+
;; ISceneManager
(define-class <scene-manager> (<reference-counted>)
(irr-class #:init-value "ISceneManager" #:getter irr-class))
-(export <scene-manager>)
+(define-method (get-mesh (scene-manager <scene-manager>) filename)
+ (make <animated-mesh>
+ #:irr-pointer
+ ((get-irrlicht-proc "getMesh" scene-manager)
+ (irr-pointer scene-manager)
+ filename)))
+
+(export <scene-manager> get-mesh)