瀏覽代碼

m.nviz.image: added flag to draw volume box

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@58456 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 11 年之前
父節點
當前提交
718d0f8a70
共有 3 個文件被更改,包括 10 次插入0 次删除
  1. 6 0
      misc/m.nviz.image/args.c
  2. 1 0
      misc/m.nviz.image/local_proto.h
  3. 3 0
      misc/m.nviz.image/volume.c

+ 6 - 0
misc/m.nviz.image/args.c

@@ -706,6 +706,12 @@ void args_volume(struct GParams *params)
 	_("Toggles normal direction of all isosurfaces (changes light effect)");
     params->isosurf_toggle_norm_dir->guisection = _("Volumes");
 
+    params->draw_volume_box = G_define_flag();
+    params->draw_volume_box->key = 'b';
+    params->draw_volume_box->description =
+	_("Draw volume box");
+    params->draw_volume_box->guisection = _("Volumes");
+
     /* slices */
     /* slice axis */
     params->slice = G_define_option();

+ 1 - 0
misc/m.nviz.image/local_proto.h

@@ -8,6 +8,7 @@ struct GParams
 {
     struct Flag *mode_all;
     struct Flag *isosurf_toggle_norm_dir;
+    struct Flag *draw_volume_box;
 
     struct Option 
     /* surface */

+ 3 - 0
misc/m.nviz.image/volume.c

@@ -61,6 +61,9 @@ int load_rasters3d(const struct GParams *params, nv_data *data)
 	}
     
 	GVL_set_trans(id, x, y, z);
+	if (params->draw_volume_box->answer) {
+	    GVL_set_draw_wire(id, 1);
+	}
     }
 
     return 1;