kd tree construction, aabb fix)