Completed ray picking logic for triangle meshes.