vectorized code for tri-ray intersection, try to make boxtree to work now