/* * visualize3D.h - Create a grid structure and declare functions * * Author: Jon Todd * */ #ifndef __visualize3D_h #define __visualize3D_h // grid structure // typedef struct grid_t { char*name; // File name (path) int**data; // Data int ncols; // Number of columns int nrows; // Number of rows float x; // x lat lon corner float y; // y lat lon corner int cellsize; // Cell size int nodata; // No data value int max; // Max elevation int min; // Min elevation } Grid; // forward declarations of functions // void display(void); void keypress(unsigned char key, int x, int y); void main_menu(int value); int min(int x, int y); void color_map(int h); float z_map(int h); void mouse(int x, int y); void reshape(int w, int h); // printGrid - Print the grid info void printGrid(Grid *g); // importGrid - brings grid file into an array Grid *importGrid(char *path); // rescaleGrid - multiply each value by factor void rescaleGrid(Grid *g, int factor); // writeGrid - write grid structure to file path void writeGrid(Grid *g,char *path); #endif