Changeset 1453 for trunk/packages
- Timestamp:
- May 19, 2009, 10:31:04 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/vizservers/nanovis/Unirect.cpp
r1452 r1453 55 55 /* Default order is z, y, x. */ 56 56 int axis1, axis2, axis3; 57 axis1 = 2; /* Z-axis */57 axis1 = 0; /* X-axis */ 58 58 axis2 = 1; /* Y-axis */ 59 axis3 = 0; /* X-axis */59 axis3 = 2; /* Z-axis */ 60 60 61 61 values = NULL; … … 186 186 "wrong number of values: must be xnum*ynum*znum*extents", 187 187 (char *)NULL); 188 188 return TCL_ERROR; 189 189 } 190 190 191 if ((axis1 != 2) || (axis2 != 1) || (axis3 != 0)) { 191 #ifdef notdef 192 if ((axis1 != 0) || (axis2 != 1) || (axis3 != 2)) { 192 193 // Reorder the data into x, y, z where x varies fastest and so on. 193 194 int z; … … 216 217 values = data; 217 218 } 218 219 #endif 219 220 _values = values; 220 221 _nValues = nValues; … … 241 242 } 242 243 _initialized = true; 244 { 245 FILE *f; 246 f = fopen("/tmp/unirect3d.txt", "w"); 247 fprintf(f, "unirect3d xmin %g xmax %g xnum %d ", _xMin, _xMax, _xNum); 248 fprintf(f, "ymin %g ymax %g ynum %d ", _yMin, _yMax, _yNum); 249 fprintf(f, "zmin %g zmax %g znum %d ", _zMin, _zMax, _zNum); 250 fprintf(f, "components %d values {\n", _nComponents); 251 for (size_t i = 0; i < _nValues; i+= 3) { 252 fprintf(f, "%g %g %g\n", _values[i], _values[i+1], _values[i+2]); 253 } 254 fprintf(f, "}\n"); 255 fclose(f); 256 } 243 257 return TCL_OK; 244 258 } … … 554 568 _nValues *= _nComponents; 555 569 _initialized = true; 556 fprintf(stderr, "xMin %g xMax %g xNum %d\n", _xMin, _xMax, _xNum); 557 fprintf(stderr, "yMin %g yMay %g yNum %d\n", _yMin, _yMax, _yNum); 558 fprintf(stderr, "zMin %g zMaz %g zNum %d\n", _zMin, _zMax, _zNum); 559 fprintf(stderr, "nValues %d components %d values {\n", 560 _nValues, _nComponents); 561 for (size_t i = 0; i < _nValues; i+= 3) { 562 fprintf(stderr, "%g %g %g\n", _values[i], _values[i+1], _values[i+2]); 563 } 564 fprintf(stderr, "}\n"); 570 #ifdef notdef 571 { 572 FILE *f; 573 f = fopen("/tmp/dx.txt", "w"); 574 fprintf(f, "unirect3d xmin %g xmax %g xnum %d ", _xMin, _xMax, _xNum); 575 fprintf(f, "ymin %g ymax %g ynum %d ", _yMin, _yMax, _yNum); 576 fprintf(f, "zmin %g zmax %g znum %d ", _zMin, _zMax, _zNum); 577 fprintf(f, "components %d values {\n", _nComponents); 578 for (size_t i = 0; i < _nValues; i+= 3) { 579 fprintf(f, "%g %g %g\n", _values[i], _values[i+1], _values[i+2]); 580 } 581 fprintf(f, "}\n"); 582 fclose(f); 583 } 584 #endif 565 585 return true; 566 586 }
Note: See TracChangeset
for help on using the changeset viewer.