Exemple #1
0
        public void Update()
        {
            // updating is a cheaper alternative to constructing the tree
            sw.Restart();
            // update KDOPs
            Parallel.ForEach(b24, k => k.UpdateTentative(k.elem));

            // update
            root.Update();
            sw.Stop();
            cf.BVHConstructOrUpdate += sw.ElapsedMilliseconds;
//            Trace.WriteLine($"BVH Update {sw.ElapsedMilliseconds}");
        }
Exemple #2
0
 public void Update()
 {
     // traverse the tree, but simply update the values bottom->up
     if (!child1.isLeaf)
     {
         child1.Update();
     }
     if (!child2.isLeaf)
     {
         child2.Update();
     }
     box.Reset();
     box.Expand(child1.box);
     box.Expand(child2.box);
     //            foreach (kDOP24 bv in bvs) box.Expand(bv);
 }