Mercurial > cortex
comparison org/body.org @ 313:b46ccfd128a2
fixed minor typo
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Tue, 21 Feb 2012 15:39:51 -0700 |
parents | 5d448182c807 |
children | 83dd76d9628e |
comparison
equal
deleted
inserted
replaced
312:e0e1561cbd22 | 313:b46ccfd128a2 |
---|---|
142 (.addControl geom physics-control))) | 142 (.addControl geom physics-control))) |
143 (filter #(isa? (class %) Geometry ) | 143 (filter #(isa? (class %) Geometry ) |
144 (node-seq creature))))) | 144 (node-seq creature))))) |
145 #+end_src | 145 #+end_src |
146 | 146 |
147 =physical!)= iterates through a creature's node structure, creating | 147 =physical!= iterates through a creature's node structure, creating |
148 CollisionShapes for each geometry with the mass specified in that | 148 CollisionShapes for each geometry with the mass specified in that |
149 geometry's meta-data. | 149 geometry's meta-data. |
150 | 150 |
151 #+name: test-2 | 151 #+name: test-2 |
152 #+begin_src clojure | 152 #+begin_src clojure |
154 | 154 |
155 (def gravity-control | 155 (def gravity-control |
156 {"key-g" (fn [world _] | 156 {"key-g" (fn [world _] |
157 (set-gravity world (Vector3f. 0 -9.81 0))) | 157 (set-gravity world (Vector3f. 0 -9.81 0))) |
158 "key-u" (fn [world _] (set-gravity world Vector3f/ZERO))}) | 158 "key-u" (fn [world _] (set-gravity world Vector3f/ZERO))}) |
159 | |
160 | 159 |
161 (defn floor [] | 160 (defn floor [] |
162 (box 10 3 10 :position (Vector3f. 0 -10 0) | 161 (box 10 3 10 :position (Vector3f. 0 -10 0) |
163 :color ColorRGBA/Gray :mass 0)) | 162 :color ColorRGBA/Gray :mass 0)) |
164 | 163 |