[GRASS-SVN] r32740 - grass/branches/develbranch_6/gui/wxpython/nviz

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Aug 13 10:12:45 EDT 2008


Author: martinl
Date: 2008-08-13 10:12:44 -0400 (Wed, 13 Aug 2008)
New Revision: 32740

Modified:
   grass/branches/develbranch_6/gui/wxpython/nviz/nviz.h
   grass/branches/develbranch_6/gui/wxpython/nviz/volume.cpp
Log:
wxGUI/nviz: update r32739

Modified: grass/branches/develbranch_6/gui/wxpython/nviz/nviz.h
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/nviz/nviz.h	2008-08-13 14:11:47 UTC (rev 32739)
+++ grass/branches/develbranch_6/gui/wxpython/nviz/nviz.h	2008-08-13 14:12:44 UTC (rev 32740)
@@ -102,7 +102,10 @@
     /* volume */
     int AddIsosurface(int, int);
     int DeleteIsosurface(int, int);
+    int MoveIsosurface(int, int, bool);
     int SetIsosurfaceColor(int, int, bool, const char *);
+    int SetIsosurfaceMode(int, int);
+    int SetIsosurfaceRes(int, int);
 };
 
 #endif /* WXNVIZ_H */

Modified: grass/branches/develbranch_6/gui/wxpython/nviz/volume.cpp
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/nviz/volume.cpp	2008-08-13 14:11:47 UTC (rev 32739)
+++ grass/branches/develbranch_6/gui/wxpython/nviz/volume.cpp	2008-08-13 14:12:44 UTC (rev 32740)
@@ -73,6 +73,36 @@
 }
 
 /*!
+  \brief Move isosurface up/down in the list
+
+  \param id volume id
+  \param isosurf_id isosurface id
+  \param up if true move up otherwise down
+
+  \return 1 on success
+  \return -1 volume not found
+  \return -2 isosurface not found
+  \return -3 on failure
+*/
+int Nviz::MoveIsosurface(int id, int isosurf_id, bool up)
+{
+    int ret;
+    
+    if (!GVL_vol_exists(id))
+	return -1;
+
+    if (isosurf_id > GVL_isosurf_num_isosurfs(id))
+	return -2;
+    
+    if (up)
+	ret = GVL_isosurf_move_up(id, isosurf_id);
+    else
+	ret = GVL_isosurf_move_down(id, isosurf_id);
+
+    return ret < 0 ? -3 : 1;
+}
+
+/*!
   \brief Set surface color
 
   \param id surface id
@@ -171,3 +201,47 @@
     
     return ret > 0 ? 1 : -2;
 }
+
+/*!
+  \brief Set draw mode for isosurfaces
+
+  \param mode
+  
+  \return 1 on success
+  \return -1 volume set not found
+  \return -2 on failure
+*/
+int Nviz::SetIsosurfaceMode(int id, int mode)
+{
+    int ret;
+    
+    if (!GVL_vol_exists(id)) {
+	return -1;
+    }
+
+    ret = GVL_isosurf_set_drawmode(id, mode);
+    
+    return ret < 0 ? -2 : 1;
+}
+
+/*!
+  \brief Set draw resolution for isosurfaces
+
+  \param res resolution value
+  
+  \return 1 on success
+  \return -1 volume set not found
+  \return -2 on failure
+*/
+int Nviz::SetIsosurfaceRes(int id, int res)
+{
+    int ret;
+
+    if (!GVL_vol_exists(id)) {
+	return -1;
+    }
+
+    ret = GVL_isosurf_set_drawres(id, res, res, res);
+
+    return ret < 0 ? -2 : 1;
+}



More information about the grass-commit mailing list