27 #define FIRST_VOL_ID 81721 45 for (gvl = Vol_top; gvl; gvl = gvl->
next) {
69 for (pv = Vol_top; pv; pv = pv->
next) {
92 for (i = 0, gvl = Vol_top; gvl; gvl = gvl->
next, i++) {
109 for (i = 0, gvl = Vol_top; gvl; gvl = gvl->
next, i++) ;
111 G_debug(5,
"gvl_num_vols(): num=%d", i);
126 G_debug(5,
"gvl_get_last_vol");
132 for (lvl = Vol_top; lvl->
next; lvl = lvl->
next) ;
149 G_debug(5,
"gvl_get_new_vol()");
185 int rows,
int cols,
int depths,
double xres,
double yres,
205 gvl->
xmax = ox + (cols - 1) * xres;
208 gvl->
ymax = oy + (rows - 1) * yres;
211 gvl->
zmax = oz + (depths - 1) * zres;
273 if (fvl == Vol_top) {
286 for (gvl = Vol_top; gvl && !found; gvl = gvl->
next) {
289 if (gvl->
next == fvl) {
332 G_debug(5,
"ox: %lf oy: %lf oz: %lf", gvl->
ox, gvl->
oy, gvl->
oz);
416 for (gvl = Vol_top->
next; gvl; gvl = gvl->
next) {
453 for (gvl = Vol_top->
next; gvl; gvl = gvl->
next) {
490 for (gvl = Vol_top->
next; gvl; gvl = gvl->
next) {
522 G_debug(5,
"gvl_isosurf_init");
555 G_debug(5,
"gvl_isosurf_freemem");
582 G_debug(5,
"gvl_isosurf_get_isosurf(): id=%d isosurf=%d",
id, isosurf_id);
587 if ((isosurf_id < 0) || (isosurf_id > (gvl->
n_isosurfs - 1)))
590 return gvl->
isosurf[isosurf_id];
607 G_debug(5,
"isosurf_get_att_src");
632 G_debug(5,
"gvl_isosurf_set_att_src");
666 G_debug(5,
"gvl_isosurf_set_att_const(): att=%d, const=%f",
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];
int gvl_get_yrange(float *min, float *max)
Get volume y-range value.
int gvl_file_newh(const char *, IFLAG)
Get handle for given file name and type.
int gvl_getall_vols(geovol **gvols)
Get all volumes.
int gvl_file_free_datah(int)
Free geovol_file structure for given handle.
geovol * gvl_get_prev_vol(int id)
Get previous volume.
int gvl_get_xrange(float *min, float *max)
Get volume x-range value.
int Gvl_unload_colors_data(void *)
Unload color table.
int gvl_num_vols(void)
Get number of loaded volume sets.
void G_free(void *)
Free allocated memory.
int gvl_isosurf_set_att_map(geovol_isosurf *isosurf, int desc, const char *filename)
Set attribute map.
geovol_isosurf * isosurf[MAX_ISOSURFS]
int gvl_get_zrange(float *min, float *max)
Get volume z-range value.
int Gvl_load_colors_data(void **, const char *)
Load color table.
int gvl_isosurf_set_att_src(geovol_isosurf *isosurf, int desc, int src)
Set attribute source.
geovol * gvl_get_last_vol(void)
Get last volume set from the list.
geovol * gvl_get_new_vol(void)
Allocate new volume set and add it to the list.
int gvl_slice_init(geovol_slice *slice)
Initialize geovol_slice struct.
int gvl_isosurf_get_att_src(geovol_isosurf *isosurf, int desc)
Get attribute source.
geovol_isosurf_att att[MAX_ATTS]
void print_vol_fields(geovol *gvl)
Debug volume fields.
int gvl_isosurf_set_att_changed(geovol_isosurf *isosurf, int desc)
Set attribute changed.
geovol_slice * slice[MAX_SLICES]
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 * gvl_get_vol(int id)
Get volume set structure.
geovol_slice * gvl_slice_get_slice(int id, int slice_id)
Get geovol_slice struct.
int gvl_slice_freemem(geovol_slice *slice)
Free geovol_slice struct.
int gvl_free_vol(geovol *fvl)
Free geovol struct.
int gvl_get_xextents(geovol *gvl, float *min, float *max)
Get volume x-extent value.
void gvl_free_volmem(geovol *fvl)
Free geovol struct memory.
int gvl_get_zextents(geovol *gvl, float *min, float *max)
Get volume z-extent value.
int gvl_isosurf_init(geovol_isosurf *isosurf)
Initialize geovol_isosurf struct.
geovol_isosurf * gvl_isosurf_get_isosurf(int id, int isosurf_id)
Get isosurface of given volume set.
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_isosurf_freemem(geovol_isosurf *isosurf)
Free geovol_isosurf struct.
void G_zero(void *, int)
Zero out a buffer, buf, of length i.
#define VOL_FTYPE_RASTER3D
int G_debug(int, const char *,...) __attribute__((format(printf
void gvl_delete_vol(int id)
Remove volume set from list.