コード例 #1
0
 private IRay[,] GetRays(ICamera camera, List <Vector3> listOfCentersOnScreen, Image image)
 {
     IRay[,] screenRays = new IRay[image.Width, image.Height];
     for (int i = 0; i < screenRays.GetLength(0); i++)
     {
         for (int j = 0; j < screenRays.GetLength(1); j++)
         {
             screenRays[i, j] = new Ray(camera.Origin,
                                        (listOfCentersOnScreen[(i * screenRays.GetLength(1)) + j] - camera.Origin));
         }
     }
     return(screenRays);
 }