ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/math/ConvexHull.cpp
(Generate patch)

Comparing branches/development/src/math/ConvexHull.cpp (file contents):
Revision 1866 by gezelter, Thu Apr 25 14:32:56 2013 UTC vs.
Revision 1867 by gezelter, Mon Apr 29 17:53:48 2013 UTC

# Line 77 | Line 77 | void ConvexHull::computeHull(vector<StuntDouble*> body
77    setT *vertices;
78    int curlong, totlong;
79  
80  Vector3d boxMax;
81  Vector3d boxMin;
82  
80    vector<double> ptArray(numpoints*dim_);
81  
82    // Copy the positon vector into a points vector for qhull.
# Line 288 | Line 285 | void ConvexHull::computeHull(vector<StuntDouble*> body
285    qh_getarea(qh facet_list);
286    volume_ = qh totvol;
287    area_ = qh totarea;
291
292  int index = 0;
293  FORALLvertices {
294    Vector3d point(vertex->point[0], vertex->point[1], vertex->point[2]);
295    if (index == 0) {
296      boxMax = point;
297      boxMin = point;
298    } else {
299      for (int i = 0; i < 3; i++) {
300        boxMax[i] = max(boxMax[i], point[i]);
301        boxMin[i] = min(boxMin[i], point[i]);
302      }
303    }
304    index++;
305  }
306  boundingBox_ = Mat3x3d(0.0);
307  boundingBox_(0,0) = boxMax[0] - boxMin[0];
308  boundingBox_(1,1) = boxMax[1] - boxMin[1];
309  boundingBox_(2,2) = boxMax[2] - boxMin[2];
288      
289    qh_freeqhull(!qh_ALL);
290    qh_memfreeshort(&curlong, &totlong);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines