Mercurial > cortex
comparison org/skin.org @ 59:63951929fe44
cleaned up imports for skin
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 19 Nov 2011 23:59:12 -0700 |
parents | 25142dad240a |
children | 1381a6ebd08b |
comparison
equal
deleted
inserted
replaced
58:25142dad240a | 59:63951929fe44 |
---|---|
106 * Example | 106 * Example |
107 | 107 |
108 #+srcname: touch-test | 108 #+srcname: touch-test |
109 #+begin_src clojure | 109 #+begin_src clojure |
110 (ns test.touch | 110 (ns test.touch |
111 (:use (cortex import world util touch))) | 111 (:use (cortex world util touch)) |
112 | 112 (:import |
113 (cortex.import/mega-import-jme3) | 113 com.jme3.scene.shape.Sphere |
114 | 114 com.jme3.math.ColorRGBA |
115 com.jme3.math.Vector3f | |
116 com.jme3.material.RenderState$BlendMode | |
117 com.jme3.renderer.queue.RenderQueue$Bucket | |
118 com.jme3.scene.shape.Box | |
119 com.jme3.scene.Node | |
120 )) | |
121 | |
115 | 122 |
116 | 123 |
117 (defn ray-origin-debug | 124 (defn ray-origin-debug |
118 [ray color] | 125 [ray color] |
119 (make-shape | 126 (make-shape |
157 (.setLocalTranslation origin (.getOrigin ray)) | 164 (.setLocalTranslation origin (.getOrigin ray)) |
158 (.setColor (.getMaterial origin) "Color" (contact-color contacts)))) | 165 (.setColor (.getMaterial origin) "Color" (contact-color contacts)))) |
159 | 166 |
160 (defn init-node | 167 (defn init-node |
161 [debug-node rays] | 168 [debug-node rays] |
162 (println-repl "Init touch debug node.") | |
163 (.detachAllChildren debug-node) | 169 (.detachAllChildren debug-node) |
164 (dorun | 170 (dorun |
165 (for [ray rays] | 171 (for [ray rays] |
166 (do | 172 (do |
167 (.attachChild | 173 (.attachChild |