21 #include <grass/glocale.h>
22 #include <grass/nviz.h>
47 int num_surfs, *surf_list;
57 if (type == MAP_OBJ_SURF) {
72 MAP_ATT, name, -1.0, data)) {
79 CONST_ATT,
NULL, value,
86 else if (type == MAP_OBJ_VECT) {
88 G_warning(_(
"Maximum vector line maps loaded!"));
97 G_warning(_(
"Error loading vector map <%s>"), name);
107 for (i = 0; i < num_surfs; i++) {
114 else if (type == MAP_OBJ_SITE) {
116 G_warning(_(
"Maximum vector point maps loaded!"));
128 G_warning(_(
"Error loading vector map <%s>"), name);
135 for (i = 0; i < num_surfs; i++) {
141 else if (type == MAP_OBJ_VOL) {
152 G_warning(_(
"Error loading 3d raster map <%s>"), name);
160 G_warning(_(
"Nviz_new_map_obj(): unsupported data type"));
181 const char *str_value,
double num_value, nv_data *
data)
187 case (MAP_OBJ_SURF):{
192 if (src == CONST_ATT) {
197 value = (double)atof(str_value);
205 if (desc == ATT_COLOR) {
220 else if (src == MAP_ATT) {
229 if (desc == ATT_TOPO) {
238 max = (rows >
cols) ? rows : cols;
246 max = max2 + max2 / 2;
276 float defs[MAX_ATTS];
279 defs[ATT_COLOR] = DEFAULT_SURF_COLOR;
281 defs[ATT_TRANSP] = 0;
282 defs[ATT_SHINE] = 60;
308 for (i = 0; i < GPT_MAX_ATTR; i++)
309 gp->use_attr[i] = ST_ATT_NONE;
324 int rows,
cols, depths;
328 max = (rows >
cols) ? rows : cols;
329 max = (depths >
max) ? depths : max;
364 if (type == MAP_OBJ_SURF) {