예제 #1
0
 public void computeBoundingBox()
 {
     myBoundingBox_ = new ptsBoundingBox2d
     (point1.x, point1.y, point1.z,
     point1.x, point1.y, point1.z);
      myBoundingBox_.expandByPoint(point2.x, point2.y, point2.z);
      myBoundingBox_.expandByPoint(point3.x, point3.y, point3.z);
 }
예제 #2
0
 private ptsBoundingBox2d ComputeBB()
 {
     Debug.WriteLine("Starting ComputeBB on {0}.", Thread.CurrentThread.ManagedThreadId);
      Stopwatch sw = new Stopwatch(); sw.Start();
      var point1 = this.allPoints.FirstOrDefault().Value;
      var returnBB = new ptsBoundingBox2d(
     point1.x, point1.y, point1.z, point1.x, point1.y, point1.z);
      Parallel.ForEach(this.allPoints,
     p => returnBB.expandByPoint(p.Value.x, p.Value.y, p.Value.z)
     );
      sw.Stop();
      Debug.WriteLine(String.Format("Compute BB took {0}", sw.Elapsed));
      return returnBB;
 }