Mercurial > cortex
changeset 5:93ff2b4e7e6a
trying to resolve sensitivity bugs with tough implementation
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 22 Oct 2011 01:20:34 -0700 |
parents | 50c92af2018e |
children | e3c6d1c1cb00 |
files | org/skin.org |
diffstat | 1 files changed, 19 insertions(+), 75 deletions(-) [+] |
line wrap: on
line diff
1.1 --- a/org/skin.org Thu Oct 20 15:10:38 2011 -0700 1.2 +++ b/org/skin.org Sat Oct 22 01:20:34 2011 -0700 1.3 @@ -6,10 +6,22 @@ 1.4 #+INCLUDE: ../../aurellem/org/level-0.org 1.5 1.6 1.7 +let's see what checkboxes look like: 1.8 + 1.9 +* test [1/2] 1.10 + - [ ] item 1 1.11 + - [X] item 2 1.12 1.13 1.14 * skin! 1.15 1.16 + 1.17 + 1.18 + 1.19 + 1.20 + 1.21 + 1.22 + 1.23 #+srcname: skin-main 1.24 #+begin_src clojure 1.25 (ns body.skin) 1.26 @@ -85,12 +97,12 @@ 1.27 (.getTriangle mesh n tri) 1.28 (.calculateCenter tri) 1.29 (.calculateNormal tri) 1.30 - (println-repl tri) 1.31 - (println-repl (.get1 tri)) 1.32 - (println-repl (.get2 tri)) 1.33 - (println-repl (.get3 tri)) 1.34 - (println-repl (.getCenter tri)) 1.35 - (println-repl (.getNormal tri)) 1.36 +;; (println-repl tri) 1.37 +;; (println-repl (.get1 tri)) 1.38 +;; (println-repl (.get2 tri)) 1.39 +;; (println-repl (.get3 tri)) 1.40 +;; (println-repl (.getCenter tri)) 1.41 +;; (println-repl (.getNormal tri)) 1.42 (let [control 1.43 (doto 1.44 (GhostControl. 1.45 @@ -102,70 +114,10 @@ 1.46 (.setMargin 0) 1.47 )) 1.48 (.setApplyPhysicsLocal true))] 1.49 - 1.50 (.addControl geom control) 1.51 (conj! controls! control))))) 1.52 (persistent! controls!))) 1.53 1.54 -(defn make-fucked-touch [#^Geometry geom] 1.55 - (let [tri (Triangle.) 1.56 - mesh (.getMesh geom) 1.57 - controls! (transient [])] 1.58 - (dorun 1.59 - (for [n (range (.getTriangleCount mesh))] 1.60 - (do 1.61 - (.getTriangle mesh n tri) 1.62 - (.calculateCenter tri) 1.63 - (.calculateNormal tri) 1.64 - (println-repl tri) 1.65 - (println-repl (.get1 tri)) 1.66 - (println-repl (.get2 tri)) 1.67 - (println-repl (.get3 tri)) 1.68 - (println-repl (.getCenter tri)) 1.69 - (println-repl (.getNormal tri)) 1.70 - (let [control1 1.71 - (doto 1.72 - (GhostControl. 1.73 - (doto (CompoundCollisionShape.) 1.74 - (.addChildShape 1.75 - (SimplexCollisionShape. Vector3f/ZERO) 1.76 - (.get1 tri)))) 1.77 - (.setApplyPhysicsLocal true))] 1.78 - 1.79 - (.addControl geom control1) 1.80 - (conj! controls! control1) 1.81 - ) 1.82 - 1.83 - ;; (let [control1 1.84 - ;; (doto 1.85 - ;; (GhostControl. 1.86 - ;; (doto (CompoundCollisionShape.) 1.87 - ;; (.addChildShape 1.88 - ;; (SimplexCollisionShape. Vector3f/ZERO) 1.89 - ;; (.get2 tri)))) 1.90 - ;; (.setApplyPhysicsLocal true))] 1.91 - 1.92 - ;; (.addControl geom control1) 1.93 - ;; (conj! controls! control1) 1.94 - ;; ) 1.95 - 1.96 - ;; (let [control1 1.97 - ;; (doto 1.98 - ;; (GhostControl. 1.99 - ;; (doto (CompoundCollisionShape.) 1.100 - ;; (.addChildShape 1.101 - ;; (SimplexCollisionShape. Vector3f/ZERO) 1.102 - ;; (.get3 tri)))) 1.103 - ;; (.setApplyPhysicsLocal true))] 1.104 - 1.105 - ;; (.addControl geom control1) 1.106 - ;; (conj! controls! control1) 1.107 - 1.108 - ))) 1.109 - (persistent! controls!))) 1.110 - 1.111 - 1.112 - 1.113 (use 'hello.brick-wall) 1.114 1.115 (defn touch-reception [controls] 1.116 @@ -189,7 +141,6 @@ 1.117 ((fn [[r g b]] (ColorRGBA. r g b (float 1))) 1.118 (map #(float (/ (Integer/parseInt % 16) 255)) 1.119 (map (partial apply str) (partition 2 html-str))))) 1.120 - 1.121 1.122 (defn color-touch [controls] 1.123 (no-exceptions 1.124 @@ -216,13 +167,6 @@ 1.125 BulletAppState)) 1.126 (asset-manager))) 1.127 1.128 -(def with-debug 1.129 - '(1 1 1 1 0 1 2 0 2 0 1 1 1 1 0 2 0 2 2 1 0 0 0 1 0 0 0 0 1 0)) 1.130 -(def no-debug 1.131 - '(1 1 1 1 0 1 2 0 2 0 1 1 1 1 0 2 0 2 2 1 0 0 0 1 0 0 0 0 1 0)) 1.132 - 1.133 - 1.134 - 1.135 (defn transparent-sphere [] 1.136 (doto 1.137 (make-shape 1.138 @@ -301,7 +245,7 @@ 1.139 ) 1.140 1.141 (fn [& _] 1.142 - (touch-print controls) 1.143 + ;;(touch-print controls) 1.144 (color-touch controls) 1.145 )))) 1.146