Exemplo n.º 1
0
 private void worker()
 {
     TalReader tr = new TalReader();
     try
     {
         tr.Read(talfile);
         ToyTracerLibrary.ToyTracer tt = tr.CreateSceneRenderer();
         lastRendered = tt;
         tt.OnProgress += new ProgressEventHandler(DrawPix);
         PixelMap map = tt.Trace();
         DrawPix(map, map.Height, -1);
     }
     catch (Exception e)
     {
         this.Invoke(new DisplayExceptionDel(DisplayException), e);
         return;
     }
     finally
     {
         working = false;
     }
 }
Exemplo n.º 2
0
 protected abstract void SetTracerChildren(ToyTracer tt, int threadCount);
Exemplo n.º 3
0
 protected override void SetTracerChildren(ToyTracer tt, int threadCount)
 {
 }
Exemplo n.º 4
0
 public void SetTracer(ToyTracer tt, int threadCount)
 {
     SetTracerChildren(tt, threadCount);
     owner = tt;
     inCacheTag = new int[threadCount];
     inCache = new bool[threadCount];
     intersectCacheTag = new int[threadCount];
     intersectCache = new HitInfo[threadCount];
     allIntersectCacheTag = new int[threadCount];
     allIntersectCache = new List<HitInfo>[threadCount];
     intersectCacheTagShadow = new int[threadCount];
     intersectCacheShadow = new HitInfo[threadCount];
     allIntersectCacheTagShadow = new int[threadCount];
     allIntersectCacheShadow = new List<HitInfo>[threadCount];
     if (Bounds != null && Bounds != this)
         Bounds.SetTracer(tt, threadCount);
 }