--- trunk/SHAPES/visualizer.cpp 2004/06/24 13:44:53 1294 +++ trunk/SHAPES/visualizer.cpp 2004/06/24 15:31:52 1295 @@ -2,10 +2,10 @@ #include #include #include +#include #include "visualizerCmd.h" +#include "SHAPE.hpp" - -int count_tokens(char *line, char *delimiters); using namespace std; int main(int argc, char* argv[]){ @@ -18,28 +18,32 @@ int main(int argc, char* argv[]){ double r, theta, phi, f, s, w, w0; double fp, sp, wp, tot; double rup, ru, rlow; - FILE *my_file; + char* shapeFileName; + SHAPE* shape; + FILE* my_file; //parse the command line options if (cmdline_parser (argc, argv, &args_info) != 0) exit(1) ; - if (args_info.input_given){ - shapeFileName = args_info.input_arg; + if (args_info.shape_given){ + shapeFileName = args_info.shape_arg; } else{ std::cerr << "Does not have shape file name" << endl; exit(1); } + + shape = new SHAPE(); + shape->readSHAPEfile(shapeFileName); + // grid has a default value (default=51), so it is always given npts = args_info.grid_arg; - printf ("opening %s\n", shapeFileName); - shapeFile = fopen( shapeFileName, "r" ); + - my_file = fopen("junk.dat", "w"); if (my_file == NULL) { (void) fprintf(stderr, "No File\n");