Speed up ray-triangle intersection

By using ugly but inline methods.