15 #include <grass/nviz.h>
30 float longdim, exag, texag, hmin, hmax, fmin, fmax;
31 int nsurfs, i, *surf_list;
39 for (i = 0; i < nsurfs; i++) {
42 exag = texag > exag ? texag : exag;
47 fmin = hmin - (2. * longdim / exag);
48 fmax = hmin + (3 * longdim / exag);
55 *val = fmin + (fmax - fmin) / 2.0;
63 G_debug(1,
"Nviz_get_exag_height(): value = %f min = %f max = %f",
64 *val, min ? *min : 0.0 , max ? *max : 0.0);
79 int nsurfs, i, *surf_list;
84 for (i = 0; i < nsurfs; i++) {
87 exag = (texag > exag) ? texag : exag;
97 G_debug(1,
"Nviz_get_exag(): value = %f", exag);
void G_free(void *buf)
Free allocated memory.
int Nviz_get_exag_height(double *val, double *min, double *max)
Get view height.
void GS_get_zrange_nz(float *min, float *max)
Get Z extents for all loaded surfaces.
int G_debug(int level, const char *msg,...)
Print debugging message.
int GS_get_longdim(float *dim)
Get largest dimension.
int * GS_get_surf_list(int *numsurfs)
Get surface list.
int GS_get_exag_guess(int id, float *exag)
Get exag-value guess.
double Nviz_get_exag()
Get view z-exag value.