コード例 #1
0
 /// <summary>
 /// Calculates the direction of a specular reflection.
 /// </summary>
 /// <param name="R"></param>
 /// <param name="u"></param>
 /// <param name="v"></param>
 /// <param name="Face_ID"></param>
 public static void SpecularReflection(ref Hare.Geometry.Vector R, ref Environment.Scene Room, ref double u, ref double v, ref int Face_ID)
 {
     Hare.Geometry.Vector local_N = Room.Normal(Face_ID, u, v);
     R -= local_N * Hare.Geometry.Hare_math.Dot(R, local_N) * 2;
 }