Exemplo n.º 1
0
        public void TaskMethod(List <LightSource> lights, List <Triangle> triangles)
        {
            Point  ray    = Point.GeneratePointOnSphere(Origin);
            Vector vector = new Vector(Origin, ray);
            float  a      = Trace(lights, triangles, vector, MaxDept);

            ray.MultiplyByLambda(a);
            if (!LookDirections.Contains(vector.GetEndPoint()))
            {
                lock (lockObj)
                {
                    LookDirections.Add(vector.GetEndPoint());
                }
            }
        }
Exemplo n.º 2
0
 private void StartSequential(List <LightSource> lights, List <Triangle> triangles)
 {
     for (int i = 0; i < Sampling; i++)
     {
         Point  ray    = Point.GeneratePointOnSphere(Origin);
         Vector vector = new Vector(Origin, ray);
         float  a      = Trace(lights, triangles, vector, MaxDept);
         ray.MultiplyByLambda(a);
         if (!LookDirections.Contains(vector.GetEndPoint()))
         {
             LookDirections.Add(vector.GetEndPoint());
         }
     }
     bs.Close();
 }