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) { |
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(); |
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 |