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 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 63 | Line 63 | using namespace std;
63   using namespace OpenMD;
64   using namespace std;
65  
66 < ConvexHull::ConvexHull() : Hull(), dim_(3), options_("qhull Qt Pp") {
66 > ConvexHull::ConvexHull() : Hull(), dim_(3), options_("qhull FA Qt Pp") {
67   }
68  
69   void ConvexHull::computeHull(vector<StuntDouble*> bodydoubles) {
# Line 85 | Line 85 | void ConvexHull::computeHull(vector<StuntDouble*> body
85    // Copy the positon vector into a points vector for qhull.
86    vector<StuntDouble*>::iterator SD;
87    int i = 0;
88 <  
88 >
89    for (SD =bodydoubles.begin(); SD != bodydoubles.end(); ++SD){
90      Vector3d pos = (*SD)->getPos();      
91      ptArray[dim_ * i] = pos.x();
# Line 207 | Line 207 | void ConvexHull::computeHull(vector<StuntDouble*> body
207    // commented out below, so comment out here also.
208    // intPoint = qh interior_point;
209    // RealType calcvol = 0.0;
210 +  
211 +  qh_triangulate ();
212 +  int num_facets = qh num_facets;
213 +  int num_vertices = qh num_vertices;
214 +
215    FORALLfacets {  
216      Triangle face;
217      //Qhull sets the unit normal in facet->normal

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines