comparison org/test-creature.org @ 175:0b9ae09eaec3

renamed functions in body
author Robert McIntyre <rlm@mit.edu>
date Sat, 04 Feb 2012 06:47:07 -0700
parents 1943b3f581c2
children 6fba17a74a57
comparison
equal deleted inserted replaced
174:136349ac6972 175:0b9ae09eaec3
68 [^String model] 68 [^String model]
69 (.loadModel 69 (.loadModel
70 (doto (asset-manager) 70 (doto (asset-manager)
71 (.registerLoader BlenderModelLoader (into-array String ["blend"]))) 71 (.registerLoader BlenderModelLoader (into-array String ["blend"])))
72 model)) 72 model))
73
74 (declare blender-creature)
75
76 (defn blender-creature
77 "Return a creature with all joints in place."
78 [blender-path]
79 (let [model (load-blender-model blender-path)
80 joints (creature-joints model)]
81 (assemble-creature model joints)))
82 73
83 (def hand "Models/creature1/one.blend") 74 (def hand "Models/creature1/one.blend")
84 75
85 (def worm "Models/creature1/try-again.blend") 76 (def worm "Models/creature1/try-again.blend")
86 77
176 (box 1 0.01 0.01 :physical? false :color ColorRGBA/Red) 167 (box 1 0.01 0.01 :physical? false :color ColorRGBA/Red)
177 y-axis 168 y-axis
178 (box 0.01 1 0.01 :physical? false :color ColorRGBA/Green) 169 (box 0.01 1 0.01 :physical? false :color ColorRGBA/Green)
179 z-axis 170 z-axis
180 (box 0.01 0.01 1 :physical? false :color ColorRGBA/Blue) 171 (box 0.01 0.01 1 :physical? false :color ColorRGBA/Blue)
181 creature (blender-creature thing) 172 creature (doto
173 (load-blender-model thing)
174 (body!))
182 touch-nerves (touch creature) 175 touch-nerves (touch creature)
183 touch-debug-windows (map (fn [_] (debug-touch-window)) touch-nerves) 176 touch-debug-windows (map (fn [_] (debug-touch-window)) touch-nerves)
184 vision-data (vision! creature) 177 vision-data (vision! creature)
185 vision-debug (map (fn [_] (debug-vision-window)) vision-data) 178 vision-debug (map (fn [_] (debug-vision-window)) vision-data)
186 me (sphere 0.5 :color ColorRGBA/Blue :physical? false) 179 me (sphere 0.5 :color ColorRGBA/Blue :physical? false)