Changeset 333
- Timestamp:
- 03/26/08 17:39:03 (8 months ago)
- Files:
-
- 1 modified
-
trunk/matml/src/ternary/qhull.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/matml/src/ternary/qhull.c
r331 r333 11 11 #include <qhull/qhull.h> 12 12 #include <stdlib.h> 13 #include <math.h> 13 14 14 15 … … 103 104 j++; 104 105 } 105 i++; 106 106 107 /* Remove non-simplical facets */ 107 108 if (j>3) 108 109 { 109 110 (*numfacets)--; 110 i--;111 111 } 112 /* TODO: remove the trivial three-corners facet */ 112 113 /* Remove facet with the three corners using an area test */ 114 else 115 { 116 coordT x0 = qpoints [3* (*facetverts) [3*i]], 117 y0 = qpoints [3* (*facetverts) [3*i]+1], 118 x1 = qpoints [3* (*facetverts) [3*i+1]], 119 y1 = qpoints [3* (*facetverts) [3*i+1]+1], 120 x2 = qpoints [3* (*facetverts) [3*i+2]], 121 y2 = qpoints [3* (*facetverts) [3*i+2]+1]; 122 #ifdef DEBUG 123 printf (" xyarea %g\n", 124 fabs ((x1-x0)*(y2-y0) - (x2-x0)*(y1-y0))); 125 #endif 126 if (fabs ((x1-x0)*(y2-y0) - (x2-x0)*(y1-y0)) == 1.) 127 (*numfacets)--; 128 129 else 130 i++; 131 } 113 132 } 114 133 115 134 #ifdef DEBUG 116 printf ("%d total facets\n", *numfacets);117 135 printf ("After loop: numfacets=%d, i=%d\n", *numfacets, i); 118 136 #endif