Mercurial > cortex
comparison org/util.org @ 297:d1206b11ae2d
creating final video
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Thu, 16 Feb 2012 12:48:51 -0700 |
parents | f5ea63245b3b |
children | 7e7f8d6d9ec5 |
comparison
equal
deleted
inserted
replaced
296:1eed471e2ebf | 297:d1206b11ae2d |
---|---|
111 instead to whatever terminal started the JVM process. This function | 111 instead to whatever terminal started the JVM process. This function |
112 will always output to the REPL") | 112 will always output to the REPL") |
113 | 113 |
114 (defn position-camera | 114 (defn position-camera |
115 "Change the position of the in-world camera." | 115 "Change the position of the in-world camera." |
116 ([world position direction up] | 116 [world #^Vector3f position #^Quaternion rotation] |
117 (doto (.getCamera world) | 117 (doto (.getCamera world) |
118 (.setLocation ) | 118 (.setLocation position) |
119 (.lookAt direction up))) | 119 (.setRotation rotation))) |
120 ([world position direction] | |
121 (position-camera | |
122 world position direction Vector3f/UNIT_Y))) | |
123 | 120 |
124 (defn enable-debug | 121 (defn enable-debug |
125 "Turn on debug wireframes for every object in this simulation." | 122 "Turn on debug wireframes for every object in this simulation." |
126 [world] | 123 [world] |
127 (.enableDebug | 124 (.enableDebug |
217 | 214 |
218 | 215 |
219 #+end_src | 216 #+end_src |
220 | 217 |
221 #+results: util | 218 #+results: util |
222 : #'cortex.util/apply-map | 219 : #'cortex.util/runonce |
223 | 220 |
224 | 221 |
225 *** Creating Basic Shapes | 222 *** Creating Basic Shapes |
226 | 223 |
227 #+name: shapes | 224 #+name: shapes |