Make refraction_angle compatible with Ray3D and plane. [skip ci]