Adding random dalek generation
[lambdamundo.git] / lambdamundo-test.lisp
blobe52ca0e5b5dca58e57260c996a65ef2439da5400
4 (in-package :lambdamundo)
6 (defparameter
7 *turtle*
8 (make-actor 'turtle
9 :location (make-vertex3d* 1.5 1.5 0.0 1.0)
10 :orientation (make-quaternion* 0.0 0.0 0.0 1.0)))
13 (defparameter *dalek-mesh* (mixamesh:make-mesh 'lodematron:md2-mesh))
15 (defparameter *compiled-dalek-mesh* nil) ;; (mixamesh:mesh-compile *dalek-mesh*))
17 ;; (one-shot-compile #P"mesh-compiler.lisp")
19 (defparameter *dalek* nil)
21 (defparameter *dalek-md2*
22 (setf *dalek*
23 (with-open-file
24 (dalek-md2
25 (merge-pathnames #P"dalekx/tris.md2")
26 :direction :input
27 :element-type '(unsigned-byte 8))
28 (lodematron:parse-md2-file dalek-md2))))
30 (lodematron::pose *dalek-md2* (gethash *dalek-mesh* *meshes*) "stand16" "brit")
32 (bound-mesh *dalek-mesh*)
34 (one-shot (mixamesh::make-compiled-mesh *dalek-mesh* :skin (lodematron::skin-of (gethash *dalek-mesh* *meshes*))))
36 (defparameter *dalek-actor*
37 (make-actor 'npc
38 :mesh *dalek-mesh*
39 :location (make-vertex3d (location-of (gethash *turtle* *actors*)))
40 :orientation (make-quaternion (orientation-of (gethash *turtle* *actors*)))))
42 (defparameter *dalek-actor* (make-npc *dalek-mesh*))
44 (destroy-actor *dalek-actor*)
47 (up *turtle* 0.5)