diff org/util.org @ 460:763d13f77e03

merge in laptop changes.
author Robert McIntyre <rlm@mit.edu>
date Thu, 27 Mar 2014 17:57:01 -0400
parents a86555b02916 0a4362d1f138
children 01934317b25b
line wrap: on
line diff
     1.1 --- a/org/util.org	Thu Mar 27 17:56:26 2014 -0400
     1.2 +++ b/org/util.org	Thu Mar 27 17:57:01 2014 -0400
     1.3 @@ -129,10 +129,13 @@
     1.4  
     1.5  (defn position-camera
     1.6    "Change the position of the in-world camera."
     1.7 -  [world #^Vector3f position #^Quaternion rotation]
     1.8 +  ([world #^Vector3f position #^Quaternion rotation]
     1.9       (doto (.getCamera world)
    1.10         (.setLocation position)
    1.11         (.setRotation rotation)))
    1.12 +  ([world [position rotation]]
    1.13 +     (position-camera world position rotation)))
    1.14 +     
    1.15  
    1.16  (defn enable-debug 
    1.17    "Turn on debug wireframes for every object in this simulation."
    1.18 @@ -146,13 +149,13 @@
    1.19  
    1.20  (defn speed-up 
    1.21    "Increase the dismally slow speed of the world's camera."
    1.22 -  [world]
    1.23 -  (.setMoveSpeed (.getFlyByCamera world)
    1.24 -                 (float 60))
    1.25 -  (.setRotationSpeed (.getFlyByCamera world)
    1.26 -                     (float 3))
    1.27 -  world)
    1.28 -
    1.29 +  ([world] (speed-up world 1))
    1.30 +  ([world amount]
    1.31 +     (.setMoveSpeed (.getFlyByCamera world)
    1.32 +                    (float (* amount 60)))
    1.33 +     (.setRotationSpeed (.getFlyByCamera world)
    1.34 +                        (float (* amount 3)))
    1.35 +     world))
    1.36  
    1.37  (defn no-logging 
    1.38    "Disable all of jMonkeyEngine's logging."
    1.39 @@ -682,7 +685,7 @@
    1.40  #+end_src
    1.41  
    1.42  
    1.43 -* COMMENT code generation
    1.44 +* code generation
    1.45  #+begin_src clojure :tangle ../src/cortex/import.clj
    1.46  <<import>>
    1.47  #+end_src