[GRASS-SVN] r42366 -
grass/branches/develbranch_6/visualization/nviz2/cmd
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri May 28 12:56:29 EDT 2010
Author: martinl
Date: 2010-05-28 12:56:24 -0400 (Fri, 28 May 2010)
New Revision: 42366
Modified:
grass/branches/develbranch_6/visualization/nviz2/cmd/args.c
grass/branches/develbranch_6/visualization/nviz2/cmd/main.c
grass/branches/develbranch_6/visualization/nviz2/cmd/surface.c
grass/branches/develbranch_6/visualization/nviz2/cmd/vector.c
grass/branches/develbranch_6/visualization/nviz2/cmd/volume.c
grass/branches/develbranch_6/visualization/nviz2/cmd/write_img.c
Log:
nviz_cmd: guisections cosmetics
(merge r42365 from devbr6)
Modified: grass/branches/develbranch_6/visualization/nviz2/cmd/args.c
===================================================================
--- grass/branches/develbranch_6/visualization/nviz2/cmd/args.c 2010-05-28 16:51:55 UTC (rev 42365)
+++ grass/branches/develbranch_6/visualization/nviz2/cmd/args.c 2010-05-28 16:56:24 UTC (rev 42366)
@@ -1,19 +1,17 @@
/*!
- \file args.c
+ \file args.c
+
+ \brief Parse command
+
+ (C) 2008, 2010 by the GRASS Development Team
+
+ This program is free software under the GNU General Public
+ License (>=v2). Read the file COPYING that comes with GRASS
+ for details.
+
+ \author Martin Landa <landa.martin gmail.com> (Google SoC 2008/2010)
+*/
- \brief Parse command
-
- (C) 2008 by the GRASS Development Team
-
- This program is free software under the GNU General Public
- License (>=v2). Read the file COPYING that comes with GRASS
- for details.
-
- \author Martin Landa <landa.martin gmail.com> (Google SoC 2008)
-
- \date 2008
- */
-
#include <stdlib.h>
#include <string.h>
@@ -33,21 +31,22 @@
static void args_volume(struct GParams *);
/*!
- \brief Parse command
-
- \param argc number of arguments
- \param argv arguments array
- \param params GRASS parameters
-
- \return 1
- */
+ \brief Parse command
+
+ \param argc number of arguments
+ \param argv arguments array
+ \param params GRASS parameters
+
+ \return 1
+*/
void parse_command(int argc, char *argv[], struct GParams *params)
{
params->mode_all = G_define_flag();
params->mode_all->key = 'a';
params->mode_all->description =
_("Use draw mode for all loaded surfaces");
-
+ params->mode_all->guisection = _("Surfaces");
+
/*** surface attributes ***/
args_surface(params);
@@ -71,7 +70,7 @@
/* output */
params->output = G_define_standard_option(G_OPT_F_OUTPUT);
params->output->description =
- _("Name for output file (do not add extension)");
+ _("Name for output file (without extension)");
params->output->guisection = _("Image");
/* format */
@@ -112,7 +111,7 @@
params->elev_map->required = NO;
params->elev_map->multiple = YES;
params->elev_map->description = _("Name of raster map(s) for elevation");
- params->elev_map->guisection = _("Surface");
+ params->elev_map->guisection = _("Surfaces");
params->elev_const = G_define_option();
params->elev_const->key = "elevation_value";
@@ -121,20 +120,20 @@
params->elev_const->required = NO;
params->elev_const->multiple = YES;
params->elev_const->description = _("Elevation value(s)");
- params->elev_const->guisection = _("Surface");
+ params->elev_const->guisection = _("Surfaces");
/* color */
params->color_map = G_define_standard_option(G_OPT_R_MAP);
params->color_map->multiple = YES;
params->color_map->required = NO;
params->color_map->description = _("Name of raster map(s) for color");
- params->color_map->guisection = _("Surface");
+ params->color_map->guisection = _("Surfaces");
params->color_map->key = "color_map";
params->color_const = G_define_standard_option(G_OPT_C_FG);
params->color_const->multiple = YES;
params->color_const->label = _("Color value(s)");
- params->color_const->guisection = _("Surface");
+ params->color_const->guisection = _("Surfaces");
params->color_const->key = "color_value";
params->color_const->answer = NULL;
@@ -143,7 +142,7 @@
params->mask_map->multiple = YES;
params->mask_map->required = NO;
params->mask_map->description = _("Name of raster map(s) for mask");
- params->mask_map->guisection = _("Surface");
+ params->mask_map->guisection = _("Surfaces");
params->mask_map->key = "mask_map";
/* transparency */
@@ -152,7 +151,7 @@
params->transp_map->required = NO;
params->transp_map->description =
_("Name of raster map(s) for transparency");
- params->transp_map->guisection = _("Surface");
+ params->transp_map->guisection = _("Surfaces");
params->transp_map->key = "transparency_map";
params->transp_const = G_define_option();
@@ -162,7 +161,7 @@
params->transp_const->required = NO;
params->transp_const->multiple = YES;
params->transp_const->description = _("Transparency value(s)");
- params->transp_const->guisection = _("Surface");
+ params->transp_const->guisection = _("Surfaces");
params->transp_const->options = "0-255";
/* shininess */
@@ -170,7 +169,7 @@
params->shine_map->multiple = YES;
params->shine_map->required = NO;
params->shine_map->description = _("Name of raster map(s) for shininess");
- params->shine_map->guisection = _("Surface");
+ params->shine_map->guisection = _("Surfaces");
params->shine_map->key = "shininess_map";
params->shine_const = G_define_option();
@@ -180,7 +179,7 @@
params->shine_const->required = NO;
params->shine_const->multiple = YES;
params->shine_const->description = _("Shininess value(s)");
- params->shine_const->guisection = _("Surface");
+ params->shine_const->guisection = _("Surfaces");
params->shine_const->options = "0-255";
/* emission */
@@ -188,7 +187,7 @@
params->emit_map->multiple = YES;
params->emit_map->required = NO;
params->emit_map->description = _("Name of raster map(s) for emission");
- params->emit_map->guisection = _("Surface");
+ params->emit_map->guisection = _("Surfaces");
params->emit_map->key = "emission_map";
params->emit_const = G_define_option();
@@ -198,7 +197,7 @@
params->emit_const->required = NO;
params->emit_const->multiple = YES;
params->emit_const->description = _("Emission value(s)");
- params->emit_const->guisection = _("Surface");
+ params->emit_const->guisection = _("Surfaces");
params->emit_const->options = "0-255";
/*
@@ -209,7 +208,7 @@
params->mode->key = "mode";
params->mode->key_desc = "string";
params->mode->type = TYPE_STRING;
- params->mode->required = YES;
+ params->mode->required = NO;
params->mode->multiple = YES;
params->mode->description = _("Draw mode");
params->mode->options = "coarse,fine,both";
@@ -221,7 +220,7 @@
params->res_fine->key = "resolution_fine";
params->res_fine->key_desc = "value";
params->res_fine->type = TYPE_INTEGER;
- params->res_fine->required = YES;
+ params->res_fine->required = NO;
params->res_fine->multiple = YES;
params->res_fine->description = _("Fine resolution");
params->res_fine->answer = "6";
@@ -232,7 +231,7 @@
params->res_coarse->key = "resolution_coarse";
params->res_coarse->key_desc = "value";
params->res_coarse->type = TYPE_INTEGER;
- params->res_coarse->required = YES;
+ params->res_coarse->required = NO;
params->res_coarse->multiple = YES;
params->res_coarse->description = _("Coarse resolution");
params->res_coarse->answer = "9";
@@ -243,7 +242,7 @@
params->style->key = "style";
params->style->key_desc = "string";
params->style->type = TYPE_STRING;
- params->style->required = YES;
+ params->style->required = NO;
params->style->multiple = YES;
params->style->description = _("Draw style");
params->style->options = "wire,surface";
@@ -255,7 +254,7 @@
params->shade->key = "shading";
params->shade->key_desc = "string";
params->shade->type = TYPE_STRING;
- params->shade->required = YES;
+ params->shade->required = NO;
params->shade->multiple = YES;
params->shade->description = _("Shading");
params->shade->options = "flat,gouraud";
@@ -265,7 +264,7 @@
/* wire color */
params->wire_color = G_define_standard_option(G_OPT_C_FG);
params->wire_color->multiple = YES;
- params->wire_color->required = YES;
+ params->wire_color->required = NO;
params->wire_color->label = _("Wire color");
params->wire_color->key = "wire_color";
params->wire_color->answer = "136:136:136";
@@ -276,7 +275,7 @@
params->shade->key = "shading";
params->shade->key_desc = "string";
params->shade->type = TYPE_STRING;
- params->shade->required = YES;
+ params->shade->required = NO;
params->shade->multiple = YES;
params->shade->description = _("Shading");
params->shade->options = "flat,gouraud";
@@ -288,7 +287,7 @@
params->surface_pos->key = "position";
params->surface_pos->key_desc = "x,y,z";
params->surface_pos->type = TYPE_INTEGER;
- params->surface_pos->required = YES;
+ params->surface_pos->required = NO;
params->surface_pos->multiple = YES;
params->surface_pos->description = _("Position");
params->surface_pos->guisection = _("Draw");
@@ -332,7 +331,7 @@
params->vline_mode->key = "vline_mode";
params->vline_mode->key_desc = "string";
params->vline_mode->type = TYPE_STRING;
- params->vline_mode->required = YES;
+ params->vline_mode->required = NO;
params->vline_mode->multiple = YES;
params->vline_mode->description = _("Vector line display mode");
params->vline_mode->options = "surface,flat";
@@ -356,7 +355,7 @@
params->vline_pos->key = "vline_position";
params->vline_pos->key_desc = "x,y,z";
params->vline_pos->type = TYPE_INTEGER;
- params->vline_pos->required = YES;
+ params->vline_pos->required = NO;
params->vline_pos->multiple = YES;
params->vline_pos->description = _("Position");
params->vline_pos->guisection = _("Vector lines");
@@ -412,7 +411,7 @@
params->vpoint_marker->key = "vpoint_marker";
params->vpoint_marker->key_desc = "string";
params->vpoint_marker->type = TYPE_STRING;
- params->vpoint_marker->required = YES;
+ params->vpoint_marker->required = NO;
params->vpoint_marker->multiple = YES;
params->vpoint_marker->description = _("Icon marker");
params->vpoint_marker->options =
@@ -425,7 +424,7 @@
params->vpoint_pos->key = "vpoint_position";
params->vpoint_pos->key_desc = "x,y,z";
params->vpoint_pos->type = TYPE_INTEGER;
- params->vpoint_pos->required = YES;
+ params->vpoint_pos->required = NO;
params->vpoint_pos->multiple = YES;
params->vpoint_pos->description = _("Position");
params->vpoint_pos->guisection = _("Vector points");
@@ -498,7 +497,7 @@
{
params->volume = G_define_standard_option(G_OPT_R3_MAPS);
params->volume->required = NO;
- params->volume->guisection = _("Volume");
+ params->volume->guisection = _("Volumes");
params->volume->key = "volume";
/* mode */
@@ -506,7 +505,7 @@
params->volume_mode->key = "volume_mode";
params->volume_mode->key_desc = "string";
params->volume_mode->type = TYPE_STRING;
- params->volume_mode->required = YES;
+ params->volume_mode->required = NO;
params->volume_mode->multiple = YES;
params->volume_mode->description = _("Volume draw mode");
params->volume_mode->options = "isosurface,slice";
@@ -518,7 +517,7 @@
params->volume_shade->key = "volume_shading";
params->volume_shade->key_desc = "string";
params->volume_shade->type = TYPE_STRING;
- params->volume_shade->required = YES;
+ params->volume_shade->required = NO;
params->volume_shade->multiple = YES;
params->volume_shade->description = _("Volume shading");
params->volume_shade->options = "flat,gouraud";
@@ -530,10 +529,10 @@
params->volume_pos->key = "volume_position";
params->volume_pos->key_desc = "x,y,z";
params->volume_pos->type = TYPE_INTEGER;
- params->volume_pos->required = YES;
+ params->volume_pos->required = NO;
params->volume_pos->multiple = YES;
params->volume_pos->description = _("Volume position");
- params->volume_pos->guisection = _("Volume");
+ params->volume_pos->guisection = _("Volumes");
params->volume_pos->answer = "0,0,0";
/* resolution */
@@ -541,11 +540,11 @@
params->volume_res->key = "volume_resolution";
params->volume_res->key_desc = "value";
params->volume_res->type = TYPE_INTEGER;
- params->volume_res->required = YES;
+ params->volume_res->required = NO;
params->volume_res->multiple = YES;
params->volume_res->description = _("Volume resolution");
params->volume_res->answer = "3";
- params->volume_res->guisection = _("Volume");
+ params->volume_res->guisection = _("Volumes");
/* isosurface level */
params->isosurf_level = G_define_option();
@@ -555,7 +554,7 @@
params->isosurf_level->required = NO;
params->isosurf_level->multiple = YES;
params->isosurf_level->description = _("Isosurface level");
- params->isosurf_level->guisection = _("Volume");
+ params->isosurf_level->guisection = _("Volumes");
return;
}
@@ -583,9 +582,9 @@
}
/*!
- \brief Check parameters consistency
-
- \param params module parameters
+ \brief Check parameters consistency
+
+ \param params module parameters
*/
void check_parameters(const struct GParams *params)
{
Modified: grass/branches/develbranch_6/visualization/nviz2/cmd/main.c
===================================================================
--- grass/branches/develbranch_6/visualization/nviz2/cmd/main.c 2010-05-28 16:51:55 UTC (rev 42365)
+++ grass/branches/develbranch_6/visualization/nviz2/cmd/main.c 2010-05-28 16:56:24 UTC (rev 42366)
@@ -3,15 +3,15 @@
*
* MODULE: nviz_cmd
*
- * AUTHOR(S): Martin Landa <landa.martin gmail.com> (Google SoC 2008)
+ * AUTHOR(S): Martin Landa <landa.martin gmail.com> (Google SoC 2008/2010)
*
* PURPOSE: Experimental NVIZ CLI prototype
*
- * COPYRIGHT: (C) 2008 by the GRASS Development Team
+ * COPYRIGHT: (C) 2008,2010 by the GRASS Development Team
*
- * This program is free software under the GNU General Public
- * License (>=v2). Read the file COPYING that comes with GRASS
- * for details.
+ * This program is free software under the GNU General
+ * Public License (>=v2). Read the file COPYING that
+ * comes with GRASS for details.
*
*****************************************************************************/
Modified: grass/branches/develbranch_6/visualization/nviz2/cmd/surface.c
===================================================================
--- grass/branches/develbranch_6/visualization/nviz2/cmd/surface.c 2010-05-28 16:51:55 UTC (rev 42365)
+++ grass/branches/develbranch_6/visualization/nviz2/cmd/surface.c 2010-05-28 16:56:24 UTC (rev 42366)
@@ -1,19 +1,17 @@
/*!
- \file surface.c
+ \file surface.c
+
+ \brief Surface subroutines
+
+ (C) 2008, 2010 by the GRASS Development Team
+
+ This program is free software under the GNU General Public
+ License (>=v2). Read the file COPYING that comes with GRASS
+ for details.
+
+ \author Martin Landa <landa.martin gmail.com> (Google SoC 2008/2010)
+*/
- \brief Surface subroutines
-
- (C) 2008 by the GRASS Development Team
-
- This program is free software under the GNU General Public
- License (>=v2). Read the file COPYING that comes with GRASS
- for details.
-
- \author Martin Landa <landa.martin gmail.com> (Google SoC 2008)
-
- \date 2008
- */
-
#include <stdlib.h>
#include <string.h>
@@ -22,11 +20,11 @@
#include "local_proto.h"
/*!
- \brief Load raster maps/constants and set surface attributes
-
- \param params module parameters
- \param data nviz data
- */
+ \brief Load raster maps/constants and set surface attributes
+
+ \param params module parameters
+ \param data nviz data
+*/
int load_rasters(const struct GParams *params, nv_data * data)
{
char *mapset;
@@ -182,10 +180,10 @@
}
/*!
- \brief Set draw mode for loaded surfaces
-
- \param params module parameters
- */
+ \brief Set draw mode for loaded surfaces
+
+ \param params module parameters
+*/
void surface_set_draw_mode(const struct GParams *params)
{
int *surf_list, nsurfs;
Modified: grass/branches/develbranch_6/visualization/nviz2/cmd/vector.c
===================================================================
--- grass/branches/develbranch_6/visualization/nviz2/cmd/vector.c 2010-05-28 16:51:55 UTC (rev 42365)
+++ grass/branches/develbranch_6/visualization/nviz2/cmd/vector.c 2010-05-28 16:56:24 UTC (rev 42366)
@@ -1,19 +1,17 @@
/*!
- \file vector.c
+ \file vector.c
+
+ \brief Vector subroutines
+
+ (C) 2008, 2010 by the GRASS Development Team
- \brief Vector subroutines
+ This program is free software under the GNU General Public
+ License (>=v2). Read the file COPYING that comes with GRASS
+ for details.
+
+ \author Martin Landa <landa.martin gmail.com> (Google SoC 2008/2010)
+*/
- (C) 2008 by the GRASS Development Team
-
- This program is free software under the GNU General Public
- License (>=v2). Read the file COPYING that comes with GRASS
- for details.
-
- \author Martin Landa <landa.martin gmail.com> (Google SoC 2008)
-
- \date 2008
- */
-
#include <stdlib.h>
#include <string.h>
@@ -25,13 +23,13 @@
const struct Option *, const struct Option *, int, nv_data *);
/*!
- \brief Load vector maps (lines)
-
- \param params module parameters
- \param data nviz data
-
- \return number of loaded vectors
- */
+ \brief Load vector maps (lines)
+
+ \param params module parameters
+ \param data nviz data
+
+ \return number of loaded vectors
+*/
int load_vlines(const struct GParams *params, nv_data * data)
{
return load_vectors(params->elev_map, params->elev_const,
@@ -40,13 +38,13 @@
}
/*!
- \brief Load vector maps (points)
-
- \param params module parameters
- \param data nviz data
-
- \return number of loaded vectors
- */
+ \brief Load vector maps (points)
+
+ \param params module parameters
+ \param data nviz data
+
+ \return number of loaded vectors
+*/
int load_vpoints(const struct GParams *params, nv_data * data)
{
return load_vectors(params->elev_map, params->elev_const,
@@ -103,13 +101,13 @@
}
/*!
- \brief Set vector lines mode
-
- \param params parameters
-
- \return 1 on success
- \return 0 on failure
- */
+ \brief Set vector lines mode
+
+ \param params parameters
+
+ \return 1 on success
+ \return 0 on failure
+*/
int vlines_set_attrb(const struct GParams *params)
{
int i, color, width, flat, height;
@@ -138,13 +136,13 @@
}
/*!
- \brief Set vector points mode
-
- \param params parameters
-
- \return 1 on success
- \return 0 on failure
- */
+ \brief Set vector points mode
+
+ \param params parameters
+
+ \return 1 on success
+ \return 0 on failure
+*/
int vpoints_set_attrb(const struct GParams *params)
{
int i;
Modified: grass/branches/develbranch_6/visualization/nviz2/cmd/volume.c
===================================================================
--- grass/branches/develbranch_6/visualization/nviz2/cmd/volume.c 2010-05-28 16:51:55 UTC (rev 42365)
+++ grass/branches/develbranch_6/visualization/nviz2/cmd/volume.c 2010-05-28 16:56:24 UTC (rev 42366)
@@ -1,19 +1,17 @@
/*!
- \file volume.c
+ \file volume.c
+
+ \brief Volume subroutines
+
+ (C) 2008, 2010 by the GRASS Development Team
- \brief Volume subroutines
+ This program is free software under the GNU General Public
+ License (>=v2). Read the file COPYING that comes with GRASS
+ for details.
+
+ \author Martin Landa <landa.martin gmail.com> (Google SoC 2008/2010)
+*/
- (C) 2008 by the GRASS Development Team
-
- This program is free software under the GNU General Public
- License (>=v2). Read the file COPYING that comes with GRASS
- for details.
-
- \author Martin Landa <landa.martin gmail.com> (Google SoC 2008)
-
- \date 2008
- */
-
#include <stdlib.h>
#include <grass/G3d.h>
@@ -22,13 +20,13 @@
#include "local_proto.h"
/*!
- \brief Load 3d raster map layers -> volume
+ \brief Load 3d raster map layers -> volume
+
+ \param params module parameters
+ \param data nviz data
- \param params module parameters
- \param data nviz data
-
- \return number of loaded volumes
- */
+ \return number of loaded volumes
+*/
int load_rasters3d(const struct GParams *params, nv_data *data)
{
int i, nvol, id;
@@ -54,7 +52,7 @@
/*!
\brief Add isosurfaces and set their attributes
-
+
\param params module parameters
\param data nviz data
Modified: grass/branches/develbranch_6/visualization/nviz2/cmd/write_img.c
===================================================================
--- grass/branches/develbranch_6/visualization/nviz2/cmd/write_img.c 2010-05-28 16:51:55 UTC (rev 42365)
+++ grass/branches/develbranch_6/visualization/nviz2/cmd/write_img.c 2010-05-28 16:56:24 UTC (rev 42366)
@@ -1,35 +1,32 @@
/*!
- \file write_img.c
+ \file write_img.c
+
+ \brief Save current GL screen to image file.
+
+ (C) 2008, 2010 by the GRASS Development Team
+
+ This program is free software under the GNU General Public
+ License (>=v2). Read the file COPYING that comes with GRASS
+ for details.
+
+ Based on visualization/nviz/src/anim_support.c
+
+ \author Updated/modified by Martin Landa <landa.martin gmail.com>
+*/
- \brief Save current GL screen to image file.
-
- (C) 2008 by the GRASS Development Team
-
- This program is free software under the GNU General Public
- License (>=v2). Read the file COPYING that comes with GRASS
- for details.
-
- Based on visualization/nviz/src/anim_support.c
-
- \author Updated/modified by Martin Landa <landa.martin gmail.com>
-
- \date 2008
- */
-
#include "local_proto.h"
#include <grass/gsurf.h>
#include <grass/gstypes.h>
/*!
- \brief Save current GL screen to an ppm file.
-
- \param name filename
-
- \return 1 on success
- \return 0 on failure (unsupported format)
- */
-
+ \brief Save current GL screen to an ppm file.
+
+ \param name filename
+
+ \return 1 on success
+ \return 0 on failure (unsupported format)
+*/
int write_img(const char *name, int format)
{
if (format == FORMAT_PPM)
More information about the grass-commit
mailing list