]> git.jsancho.org Git - guile-irrlicht.git/commitdiff
add-camera-scene-node-fps!
authorJavier Sancho <jsf@jsancho.org>
Fri, 15 May 2020 05:58:25 +0000 (07:58 +0200)
committerJavier Sancho <jsf@jsancho.org>
Fri, 15 May 2020 05:58:25 +0000 (07:58 +0200)
irrlicht.scm
irrlicht/irr.scm
irrlicht/scene.scm

index b347841375404ba3aa25c7276b31dc386172fc2a..2807ec84a519ceb3f845fe8695adc22ea5a3de76 100644 (file)
@@ -30,6 +30,7 @@
   #:duplicates (merge-generics)
   #:re-export (add-animated-mesh-scene-node!
                add-camera-scene-node!
+               add-camera-scene-node-fps!
                add-file-archive!
                add-octree-scene-node!
                add-static-text!
index b1ffdcc58e30748f58dd5cfb8cf1ce0557007d5c..2c883583d341008a4e814631d53fd66094d33d2f 100644 (file)
   (irr-class #:init-value "IEventReceiver"))
 
 (export <event-receiver>)
+
+
+;; SKeyMap
+(define-class <key-map> (<irrlicht-base>)
+  (irr-class #:init-value "SKeyMap"))
+
+(export <key-map>)
index 0d0618f8152d8088a19148af807c9792f266a623..260bf9b687f3dfd6969b444d357c448d40809eb9 100644 (file)
        id
        make-active))))
 
+(define-method (add-camera-scene-node-fps! (scene-manager <scene-manager>) . rest)
+  (let-keywords rest #f
+        ((parent (make <scene-node>))
+         (rotate-speed 100)
+         (move-speed 0.5)
+         (id -1)
+         (key-map-array (make <key-map>))
+         (key-map-size 0)
+         (no-vertical-movement #f)
+         (jump-speed 0)
+         (invert-mouse #f)
+         (make-active #t))
+    (let ((addCameraSceneNodeFPS (get-irrlicht-proc "addCameraSceneNodeFPS"
+                                                    scene-manager parent)))
+      (make <camera-scene-node>
+        #:irr-pointer
+        (addCameraSceneNodeFPS scene-manager #:parent parent #:rotate-speed rotate-speed
+                               #:move-speed move-speed #:id id #:key-map-array key-map-array
+                               #:key-map-size key-map-size
+                               #:no-vertical-movement no-vertical-movement
+                               #:jump-speed jump-speed #:invert-mouse invert-mouse
+                               #:make-active make-active)))))
+
 (define-method (add-octree-scene-node! (scene-manager <scene-manager>)
                                        (mesh <animated-mesh>)
                                        . rest)
      scene-manager
      filename)))
 
-(export <scene-manager> add-animated-mesh-scene-node! add-camera-scene-node! add-octree-scene-node!
-        draw-all get-mesh)
+(export <scene-manager> add-animated-mesh-scene-node! add-camera-scene-node!
+        add-camera-scene-node-fps! add-octree-scene-node! draw-all get-mesh)
 
 
 ;; ISceneNode