| 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. | 
| 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); |