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

Comparing branches/development/src/math/AlphaHull.cpp (file contents):
Revision 1858 by gezelter, Wed Apr 3 21:32:13 2013 UTC vs.
Revision 1866 by gezelter, Thu Apr 25 14:32:56 2013 UTC

# Line 80 | Line 80 | void AlphaHull::computeHull(vector<StuntDouble*> bodyd
80    pointT *interiorPoint;
81    int curlong, totlong;
82    
83  Vector3d boxMax;
84  Vector3d boxMin;
83    
84    vector<double> ptArray(numpoints*dim_);
85    
# Line 458 | Line 456 | void AlphaHull::computeHull(vector<StuntDouble*> bodyd
456    // qh_getarea(qh facet_list);
457    //volume_ = qh totvol;
458    // area_ = qh totarea;
461
462
463  int index = 0;
464  FORALLvertices {
465    Vector3d point(vertex->point[0], vertex->point[1], vertex->point[2]);
466    if (index == 0) {
467      boxMax = point;
468      boxMin = point;
469    } else {
470      for (int i = 0; i < 3; i++) {
471        boxMax[i] = max(boxMax[i], point[i]);
472        boxMin[i] = min(boxMin[i], point[i]);
473      }
474    }
475    index++;
476  }
477  boundingBox_ = Mat3x3d(0.0);
478  boundingBox_(0,0) = boxMax[0] - boxMin[0];
479  boundingBox_(1,1) = boxMax[1] - boxMin[1];
480  boundingBox_(2,2) = boxMax[2] - boxMin[2];
459  
460    qh_freeqhull(!qh_ALL);
461    qh_memfreeshort(&curlong, &totlong);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines