Changeset 329
- Timestamp:
- 03/26/08 15:14:16 (8 months ago)
- Files:
-
- 1 modified
-
trunk/matml/src/ternary/qhull.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/matml/src/ternary/qhull.c
r328 r329 50 50 qpoints[3*i] = (coordT) points[i].C2; 51 51 qpoints[3*i+1] = (coordT) points[i].C3; 52 /* TODO: find corners and clip at that plane, not just G=0 */ 52 53 qpoints[3*i+2] = (coordT) fmin (points[i].G, 0.); 53 54 } … … 63 64 printf ("%d total facets\n", *numfacets); 64 65 printf ("facetverts: pre-realloc 0x%lx, ", *facetverts); 65 if (!(*facetverts = realloc (*facetverts, *numfacets * sizeof (int))))66 if (!(*facetverts = realloc (*facetverts, *numfacets * 3 * sizeof (int)))) 66 67 { printf ("qhullCalcHull: could not reallocate memory for vertices\n"); 67 68 return -1; } … … 83 84 84 85 if (j<3) 85 facetverts[3*i+j] = thepoint;86 (*facetverts) [3*i+j] = thepoint; 86 87 #ifdef DEBUG 87 88 printf (" vertex %d, coords %g %g %g\n", thepoint,