comparison org/movement.org @ 283:23aadf376e9d

upgraded to latest jMonkeyEngine, streamlined tests
author Robert McIntyre <rlm@mit.edu>
date Wed, 15 Feb 2012 16:56:01 -0700
parents 4c07724c4f0a
children e27a91b1f997
comparison
equal deleted inserted replaced
282:2ad29b68ff22 283:23aadf376e9d
181 181
182 #+attr_html: width=755 182 #+attr_html: width=755
183 #+caption: The node highlighted in orange is the parent node of all muscles in the worm. The arrow highlighted in yellow represents the creature's single muscle, which moves the top segment. The other nodes which are not highlighted are joints, eyes, and ears. 183 #+caption: The node highlighted in orange is the parent node of all muscles in the worm. The arrow highlighted in yellow represents the creature's single muscle, which moves the top segment. The other nodes which are not highlighted are joints, eyes, and ears.
184 [[../images/worm-with-muscle.png]] 184 [[../images/worm-with-muscle.png]]
185 185
186 #+begin_src clojure 186 #+name: test-movement
187 (defn test-movement 187 #+begin_src clojure
188 ([] (test-movement false)) 188 (defn test-worm-movement
189 ([] (test-worm-movement false))
189 ([record?] 190 ([record?]
190 (let [creature (doto (worm) (body!)) 191 (let [creature (doto (worm) (body!))
191 192
192 muscle-exertion (atom 0) 193 muscle-exertion (atom 0)
193 muscles (movement! creature) 194 muscles (movement! creature)
305 (:use cortex.test.body) 306 (:use cortex.test.body)
306 (:use clojure.contrib.def) 307 (:use clojure.contrib.def)
307 (:import java.io.File) 308 (:import java.io.File)
308 (:import java.awt.image.BufferedImage) 309 (:import java.awt.image.BufferedImage)
309 (:import com.jme3.scene.Node) 310 (:import com.jme3.scene.Node)
310 (:import com.jme3.math.Vector3f) 311 (:import (com.jme3.math Quaternion Vector3f))
311 (:import (com.aurellem.capture Capture RatchetTimer)) 312 (:import (com.aurellem.capture Capture RatchetTimer))
312 (:import com.jme3.bullet.control.RigidBodyControl)) 313 (:import com.jme3.bullet.control.RigidBodyControl))
313
314 (cortex.import/mega-import-jme3)
315 #+end_src 314 #+end_src
316 315
317 * Source Listing 316 * Source Listing
318 - [[../src/cortex/movement.clj][cortex.movement]] 317 - [[../src/cortex/movement.clj][cortex.movement]]
319 - [[../src/cortex/test/movement.clj][cortex.test.movement]] 318 - [[../src/cortex/test/movement.clj][cortex.test.movement]]