 (def ^{:const true :private true} qt-children [nil nil nil nil])
 (def ^{:const true :private true} ot-children [nil nil nil nil nil nil nil nil])
 
-(defrecord QuadtreeNode [x y w h children data]
+(defrecord QuadtreeNode [^double x ^double y ^double w ^double h children data]
   TreeOps
   (child-index-for-point [this [px py]]
     (if (< px (+ x w))

              cz (if (pos? (bit-and idx 4)) (+ z d) z)]
          [(OctreeNode. cx cy cz (* 0.5 w) (* 0.5 h) (* 0.5 d) nil (if add? p)) idx]))))
  (node-bounds [this]
    (thi.ng.geom.types.AABB. (g/vec3 x y z) (g/vec3 (* w 2) (* h 2) (* d 2))))
  (split-node [this]
    (assoc this :children ot-children :data nil))
  (add-point

              cy (if (pos? (bit-and idx 2)) (+ y h) y)]
          [(QuadtreeNode. cx cy (* 0.5 w) (* 0.5 h) nil (if add? p)) idx]))))
  (node-bounds [this]
    (thi.ng.geom.types.Rect. (g/vec2 x y) (* w 2.0) (* h 2.0)))
  (split-node [this]
    (assoc this :children qt-children :data nil))
  (add-point
