28 #define FIRST_VOL_ID 81721
46 for (gvl = Vol_top; gvl; gvl = gvl->
next) {
70 for (pv = Vol_top; pv; pv = pv->
next) {
93 for (i = 0, gvl = Vol_top; gvl; gvl = gvl->
next, i++) {
110 for (i = 0, gvl = Vol_top; gvl; gvl = gvl->
next, i++)
113 G_debug(5,
"gvl_num_vols(): num=%d", i);
128 G_debug(5,
"gvl_get_last_vol");
134 for (lvl = Vol_top; lvl->
next; lvl = lvl->
next)
152 G_debug(5,
"gvl_get_new_vol()");
188 int cols,
int depths,
double xres,
double yres,
double zres)
207 gvl->
xmax = ox + (cols - 1) * xres;
210 gvl->
ymax = oy + (rows - 1) * yres;
213 gvl->
zmax = oz + (depths - 1) * zres;
275 if (fvl == Vol_top) {
288 for (gvl = Vol_top; gvl && !found; gvl = gvl->
next) {
291 if (gvl->
next == fvl) {
334 G_debug(5,
"ox: %lf oy: %lf oz: %lf", gvl->
ox, gvl->
oy, gvl->
oz);
418 for (gvl = Vol_top->
next; gvl; gvl = gvl->
next) {
455 for (gvl = Vol_top->
next; gvl; gvl = gvl->
next) {
492 for (gvl = Vol_top->
next; gvl; gvl = gvl->
next) {
524 G_debug(5,
"gvl_isosurf_init");
557 G_debug(5,
"gvl_isosurf_freemem");
584 G_debug(5,
"gvl_isosurf_get_isosurf(): id=%d isosurf=%d",
id, isosurf_id);
589 if ((isosurf_id < 0) || (isosurf_id > (gvl->
n_isosurfs - 1)))
592 return gvl->
isosurf[isosurf_id];
609 G_debug(5,
"isosurf_get_att_src");
634 G_debug(5,
"gvl_isosurf_set_att_src");
667 G_debug(5,
"gvl_isosurf_set_att_const(): att=%d, const=%f", desc, constant);
691 const char *filename)
695 G_debug(5,
"gvl_isosurf_set_att_map(): att=%d map=%s", desc, filename);
727 G_debug(5,
"gvl_isosurf_set_att_changed");
784 G_debug(5,
"gvl_slice_freemem");
810 if ((slice_id < 0) || (slice_id > (gvl->
n_slices - 1)))
813 return gvl->
slice[slice_id];
void G_zero(void *, int)
Zero out a buffer, buf, of length i.
void G_free(void *)
Free allocated memory.
int G_debug(int, const char *,...) __attribute__((format(printf
int gvl_file_newh(const char *, IFLAG)
Get handle for given file name and type.
int Gvl_load_colors_data(void **, const char *)
Load color table.
int Gvl_unload_colors_data(void *)
Unload color table.
int gvl_file_free_datah(int)
Free geovol_file structure for given handle.
geovol_slice * gvl_slice_get_slice(int id, int slice_id)
Get geovol_slice struct.
void gvl_free_volmem(geovol *fvl)
Free geovol struct memory.
int gvl_get_yrange(float *min, float *max)
Get volume y-range value.
int gvl_get_xextents(geovol *gvl, float *min, float *max)
Get volume x-extent value.
int gvl_isosurf_init(geovol_isosurf *isosurf)
Initialize geovol_isosurf struct.
int gvl_init_vol(geovol *gvl, double ox, double oy, double oz, int rows, int cols, int depths, double xres, double yres, double zres)
Initialize geovol structure.
geovol_isosurf * gvl_isosurf_get_isosurf(int id, int isosurf_id)
Get isosurface of given volume set.
int gvl_getall_vols(geovol **gvols)
Get all volumes.
void print_vol_fields(geovol *gvl)
Debug volume fields.
int gvl_isosurf_set_att_map(geovol_isosurf *isosurf, int desc, const char *filename)
Set attribute map.
int gvl_slice_freemem(geovol_slice *slice)
Free geovol_slice struct.
geovol * gvl_get_prev_vol(int id)
Get previous volume.
int gvl_isosurf_get_att_src(geovol_isosurf *isosurf, int desc)
Get attribute source.
int gvl_isosurf_freemem(geovol_isosurf *isosurf)
Free geovol_isosurf struct.
geovol * gvl_get_last_vol(void)
Get last volume set from the list.
int gvl_get_zrange(float *min, float *max)
Get volume z-range value.
int gvl_isosurf_set_att_src(geovol_isosurf *isosurf, int desc, int src)
Set attribute source.
geovol * gvl_get_new_vol(void)
Allocate new volume set and add it to the list.
geovol * gvl_get_vol(int id)
Get volume set structure.
int gvl_get_xrange(float *min, float *max)
Get volume x-range value.
int gvl_isosurf_set_att_changed(geovol_isosurf *isosurf, int desc)
Set attribute changed.
int gvl_get_zextents(geovol *gvl, float *min, float *max)
Get volume z-extent value.
int gvl_isosurf_set_att_const(geovol_isosurf *isosurf, int desc, float constant)
Set isosurface attribute constant.
int gvl_get_yextents(geovol *gvl, float *min, float *max)
Get volume y-extent value.
int gvl_slice_init(geovol_slice *slice)
Initialize geovol_slice struct.
void gvl_delete_vol(int id)
Remove volume set from list.
int gvl_num_vols(void)
Get number of loaded volume sets.
int gvl_free_vol(geovol *fvl)
Free geovol struct.
#define VOL_FTYPE_RASTER3D
geovol_slice * slice[MAX_SLICES]
geovol_isosurf * isosurf[MAX_ISOSURFS]
geovol_isosurf_att att[MAX_ATTS]