Calculating intersection point of ray and triangle