util for ray to triangle intersection