#:use-module (irrlicht device)
#:use-module (irrlicht gui)
#:use-module (irrlicht scene)
- #:re-export (add-static-text!
+ #:re-export (add-animated-mesh-scene-node!
+ add-static-text!
create-device
get-gui-environment
get-mesh
(define-module (irrlicht scene)
#:use-module (oop goops)
+ #:use-module (ice-9 optargs)
#:use-module (irrlicht base)
#:use-module (irrlicht foreign)
+ #:use-module (irrlicht io)
#:use-module (irrlicht irr))
(define-class <scene-manager> (<reference-counted>)
(irr-class #:init-value "ISceneManager" #:getter irr-class))
+(define-method (add-animated-mesh-scene-node! (scene-manager <scene-manager>) mesh . rest)
+ (let-keywords rest #f
+ ((parent (make <scene-node>))
+ (id -1)
+ (position '(0 0 0))
+ (rotation '(0 0 0))
+ (scale '(1 1 1))
+ (also-add-if-mesh-pointer-zero #f))
+ (make <animated-mesh-scene-node>
+ #:irr-pointer
+ ((get-irrlicht-proc "addAnimatedMeshSceneNode" scene-manager parent)
+ (irr-pointer scene-manager)
+ (irr-pointer mesh)
+ (irr-pointer parent)
+ id
+ position
+ rotation
+ scale
+ also-add-if-mesh-pointer-zero))))
+
(define-method (get-mesh (scene-manager <scene-manager>) filename)
(make <animated-mesh>
#:irr-pointer
(irr-pointer scene-manager)
filename)))
-(export <scene-manager> get-mesh)
+(export <scene-manager> add-animated-mesh-scene-node! get-mesh)
+
+
+;; ISceneNode
+(define-class <scene-node> (<attribute-exchanging-object>)
+ (irr-class #:init-value "ISceneNode" #:getter irr-class))
+
+(export <scene-node>)
+
+
+;; ISceneNode
+(define-class <animated-mesh-scene-node> (<scene-node>)
+ (irr-class #:init-value "IAnimatedMeshSceneNode" #:getter irr-class))
+
+(export <animated-mesh-scene-node>)