瀏覽代碼

unused nviz C++ component removed

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@42687 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 15 年之前
父節點
當前提交
c1be2ed6e0

+ 0 - 61
gui/wxpython/nviz/Makefile

@@ -1,61 +0,0 @@
-MODULE_TOPDIR = ../../..
-
-include $(MODULE_TOPDIR)/include/Make/Lib.make
-
-# substitute OSX arch flags for wxpython
-ifneq ($(MACOSX_ARCHS),)
-CFLAGS := $(subst $(MACOSX_ARCHS),,$(CFLAGS)) $(MACOSX_ARCHS_WXPYTHON)
-CXXFLAGS := $(subst $(MACOSX_ARCHS),,$(CXXFLAGS)) $(MACOSX_ARCHS_WXPYTHON)
-LDFLAGS := $(subst $(MACOSX_ARCHS),,$(LDFLAGS)) $(MACOSX_ARCHS_WXPYTHON)
-endif
-
-LIB_NAME = grass7_wxnviz
-
-SHLIB = $(OBJDIR)/_$(LIB_NAME).so
-
-ETCDIR = $(ETC)/gui/wxpython
-
-EXTRA_CLEAN_FILES = $(LIB_NAME).i $(LIB_NAME).py $(LIB_NAME)_wrap.cpp
-
-ifneq ($(USE_WXWIDGETS),)
-ifneq ($(USE_PYTHON),)
-ifneq ($(strip $(CXX)),)
-ifneq ($(strip $(OPENGLLIB)),)
-default: install_nviz
-endif
-endif
-endif
-endif
-
-$(LIB_NAME).i: nviz.i nviz_types.i nviz.h
-	cat nviz.i nviz_types.i > $(LIB_NAME).i
-	echo "/* auto-generated swig typedef file */" >> $(LIB_NAME).i
-	cat nviz.h >> $(LIB_NAME).i
-
-$(LIB_NAME).py: $(SHLIB)
-
-$(SHLIB): $(LIB_NAME).i
-	GISBASE="$(GISBASE)" \
-	ARCH_DISTDIR="$(ARCH_DISTDIR)" \
-	GDALCFLAGS="$(GDALCFLAGS)" \
-	GDALLIBS="$(GDALLIBS)" \
-	WXWIDGETSCXXFLAGS="$(WXWIDGETSCXXFLAGS)" \
-	OPENGLINC="$(OPENGLINC)" \
-	OPENGLLIB="$(OPENGLLIB)" \
-	OPENGLULIB="$(OPENGLULIB)" \
-	WXWIDGETSLIB="$(WXWIDGETSLIB)" \
-	OPENGL_X11="$(OPENGL_X11)" \
-	XCFLAGS="$(XCFLAGS)" \
-	CXXFLAGS="$(COMPILE_FLAGS_CXX)" \
-	$(PYTHON) setup.py build_ext --swig=$(SWIG) --swig-opts=-c++ --build-lib=$(OBJDIR) --build-temp=$(OBJDIR)
-
-.NOTPARALLEL: $(LIB_NAME).py $(LIB_NAME)_wrap.cpp
-
-install_nviz: $(ETCDIR)/nviz/_$(LIB_NAME).so $(ETCDIR)/nviz/$(LIB_NAME).py
-
-$(ETCDIR)/nviz/_$(LIB_NAME).so: $(SHLIB)
-	$(INSTALL) $< $@
-
-$(ETCDIR)/nviz/$(LIB_NAME).py: $(LIB_NAME).py
-	$(INSTALL_DATA) $< $@
-

+ 0 - 111
gui/wxpython/nviz/change_view.cpp

@@ -1,111 +0,0 @@
-/**
-   \file nviz/change_view.cpp
-   
-   \brief wxNviz extension (3D view mode) - change view settings
-   
-   This program is free software under the GNU General Public
-   License (>=v2). Read the file COPYING that comes with GRASS
-   for details.
-
-   (C) 2008-2009 by Martin Landa, and the GRASS development team
-
-   \author Martin Landa <landa.martin gmail.com> (Google SoC 2008)
-*/
-
-#include "nviz.h"
-
-/*!
-  \brief GL canvas resized
-
-  \param width window width
-  \param height window height
-
-  \return 1 on success
-  \return 0 on failure (window resized by default to 20x20 px)
- */
-int Nviz::ResizeWindow(int width, int height)
-{
-    int ret;
-
-    ret = Nviz_resize_window(width, height);
-
-    G_debug(1, "Nviz::ResizeWindow(): width=%d height=%d",
-	    width, height);
-
-    return ret;
-}
-
-/*!
-  \brief Set default view (based on loaded data)
-
-  \return z-exag value, default, min and max height
-*/
-std::vector<double> Nviz::SetViewDefault()
-{
-    std::vector<double> ret;
-
-    float hdef, hmin, hmax, z_exag;
-
-    /* determine z-exag */
-    z_exag = Nviz_get_exag();
-    ret.push_back(z_exag);
-    Nviz_change_exag(data,
-		     z_exag);
-
-    /* determine height */
-    Nviz_get_exag_height(&hdef, &hmin, &hmax);
-    ret.push_back(hdef);
-    ret.push_back(hmin);
-    ret.push_back(hmax);
-
-    G_debug(1, "Nviz::SetViewDefault(): hdef=%f, hmin=%f, hmax=%f",
-	    hdef, hmin, hmax);
-
-    return ret;
-}
-
-/*!
-  \brief Change view settings
-
-  \param x,y position
-  \param height
-  \param persp perpective
-  \param twist
-
-  \return 1 on success
-*/
-int Nviz::SetView(float x, float y,
-		  float height, float persp, float twist)
-{
-    Nviz_set_viewpoint_height(data,
-			      height);
-    Nviz_set_viewpoint_position(data,
-				x, y);
-    Nviz_set_viewpoint_twist(data,
-			     twist);
-    Nviz_set_viewpoint_persp(data,
-			     persp);
-
-    G_debug(1, "Nviz::SetView(): x=%f, y=%f, height=%f, persp=%f, twist=%f",
-	    x, y, height, persp, twist);
-	
-    return 1;
-}
-
-/*!
-  \brief Set z-exag value
-
-  \param z_exag value
-
-  \return 1
-*/
-int Nviz::SetZExag(float z_exag)
-{
-    int ret;
-    
-    ret = Nviz_change_exag(data, z_exag);
-
-    G_debug(1, "Nviz::SetZExag(): z_exag=%f", z_exag);
-
-    return ret;
-}

+ 0 - 56
gui/wxpython/nviz/draw.cpp

@@ -1,56 +0,0 @@
-/**
-   \file nviz/draw.cpp
-   
-   \brief wxNviz extension (3D view mode) - draw map objects to GLX context
-   
-   This program is free software under the GNU General Public
-   License (>=v2). Read the file COPYING that comes with GRASS
-   for details.
-   
-   (C) 2008-2009 by Martin Landa, and the GRASS development team
-   
-   \author Martin Landa <landa.martin gmail.com> (Google SoC 2008)
-*/
-
-#include "nviz.h"
-
-/*!
-  \brief Draw map
-
-  Draw quick mode:
-   - DRAW_QUICK_SURFACE
-   - DRAW_QUICK_VLINES
-   - DRAW_QUICK_VPOINTS
-   - DRAW_QUICK_VOLUME
-   
-  \param quick if true draw in wiremode
-  \param quick_mode quick mode
-*/
-void Nviz::Draw(bool quick, int quick_mode)
-{
-    Nviz_draw_cplane(data, -1, -1); // ?
-
-    if (quick) {
-	Nviz_draw_quick(data, quick_mode);
-    }
-    else {
-	Nviz_draw_all (data); 
-    }
-
-    G_debug(1, "Nviz::Draw(): quick=%d",
-	    quick);
-    
-    return;
-}
-
-/*!
-  \brief Erase map display (with background color)
-*/
-void Nviz::EraseMap()
-{
-    GS_clear(data->bgcolor);
-
-    G_debug(1, "Nviz::EraseMap()");
-
-    return;
-}

+ 0 - 206
gui/wxpython/nviz/init.cpp

@@ -1,206 +0,0 @@
-/**
-   \file nviz/init.cpp
-   
-   \brief wxNviz extension (3D view mode) - initialization
-
-   This program is free software under the GNU General Public
-   License (>=v2). Read the file COPYING that comes with GRASS
-   for details.
-
-   (C) 2008-2009 by Martin Landa, and the GRASS development team
-
-   \author Martin Landa <landa.martin gmail.com> (Google SoC 2008)
-*/
-
-#include "nviz.h"
-
-#define MSG  0
-#define WARN 1
-#define ERR  2
-
-static void swap_gl();
-static int print_error(const char *, const int);
-static int print_percent(int);
-static void print_sentence (PyObject*, const int, const char *);
-static PyObject *logStream;
-static int message_id = 1;
-
-/*!
-  \brief Initialize Nviz class instance
-*/
-Nviz::Nviz(PyObject *log)
-{
-    G_gisinit(""); /* GRASS functions */
-
-    logStream = log;
-
-    G_set_error_routine(&print_error);
-    G_set_percent_routine(&print_percent);
-
-    GS_libinit();
-    GVL_libinit();
-
-    GS_set_swap_func(swap_gl);
-
-    data = (nv_data*) G_malloc(sizeof (nv_data));
-    
-    G_debug(1, "Nviz::Nviz()");
-}
-
-/*!
-  \brief Destroy Nviz class instance
-*/
-Nviz::~Nviz()
-{
-    G_unset_error_routine();
-    G_unset_percent_routine();
-
-    G_free((void *) data);
-
-    data = NULL;
-    
-    logStream = NULL;
-}
-
-void Nviz::InitView()
-{
-    /* initialize nviz data */
-    Nviz_init_data(data);
-
-    /* define default attributes for map objects */
-    Nviz_set_surface_attr_default();
-    /* set background color */
-    Nviz_set_bgcolor(data, Nviz_color_from_str("white")); /* TODO */
-
-    /* initialize view */
-    Nviz_init_view();
-
-    /* set default lighting model */
-    SetLightsDefault();
-
-    /* clear window */
-    GS_clear(data->bgcolor);
-
-    G_debug(1, "Nviz::InitView()");
-
-    return;
-}
-
-void swap_gl()
-{
-    return;
-}
-
-/*!
-  \brief Set background color
-
-  \param color_str color string
-*/
-void Nviz::SetBgColor(const char *color_str)
-{
-    data->bgcolor = Nviz_color_from_str(color_str);
-
-    return;
-}
-
-/*
-  \brief Print one message, prefix inserted before each new line
-
-  From lib/gis/error.c
-*/
-void print_sentence (PyObject *pyFd, const int type, const char *msg)
-{
-    char prefix[256];
-    const char *start;
-    char* sentence;
-
-    switch (type) {
-    case MSG: 
-	sprintf (prefix, "GRASS_INFO_MESSAGE(%d,%d): Nviz: ", getpid(), message_id);
-	break;
-    case WARN:
-	sprintf (prefix, "GRASS_INFO_WARNING(%d,%d): Nviz: ", getpid(), message_id);
-	break;
-    case ERR:
-	sprintf (prefix, "GRASS_INFO_ERROR(%d,%d): Nviz: ", getpid(), message_id);
-	break;
-    }
-
-    start = msg;
-    
-    PyFile_WriteString("\n", pyFd);
-
-    while (*start != '\0') {
-	const char *next = start;
-	
-	PyFile_WriteString(prefix, pyFd);
-	
-	while ( *next != '\0' ) {
-	    next++;
-	    
-	    if ( *next == '\n' ) {
-	        next++;
-		break;
-	    }
-	}
-	
-	sentence = (char *) G_malloc((next - start + 1) * sizeof (char));
-	strncpy(sentence, start, next - start + 1);
-	sentence[next-start] = '\0';
-	
-	PyFile_WriteString(sentence, pyFd);
-	G_free((void *)sentence);
-	sentence = NULL;
-	
-	PyFile_WriteString("\n", pyFd);
-	start = next;
-    }
-    
-    PyFile_WriteString("\n", pyFd);
-    sprintf(prefix, "GRASS_INFO_END(%d,%d)\n", getpid(), message_id);
-    PyFile_WriteString(prefix, pyFd);
-    
-    message_id++;
-}
-
-/*!
-  \brief Print error/warning/message
-
-  \param msg message buffer
-  \param type message type
-
-  \return 0
-*/
-int print_error(const char *msg, const int type)
-{
-    if (logStream) {
-	print_sentence(logStream, type, msg);
-    }
-    else {
-	fprintf(stderr, "Nviz: %s\n", msg);
-    }
-
-    return 0;
-}
-
-/*!
-  \brief Print percentage information
-
-  \param x value
-
-  \return 0
-*/
-int print_percent(int x)
-{
-    char msg[256];
-
-    if (logStream) {
-	sprintf(msg, "GRASS_INFO_PERCENT: %d\n", x);
-	PyFile_WriteString(msg, logStream);
-    }
-    else {
-	fprintf(stderr, "GRASS_INFO_PERCENT: %d\n", x);
-    }
-    
-    return 0;
-}

+ 0 - 45
gui/wxpython/nviz/lights.cpp

@@ -1,45 +0,0 @@
-/**
-   \file nviz/lights.cpp
-   
-   \brief wxNviz extension (3D view mode) - lights manipulation
-   
-   This program is free software under the GNU General Public
-   License (>=v2). Read the file COPYING that comes with GRASS
-   for details.
-   
-   (C) 2008-2009 by Martin Landa, and the GRASS development team
-   
-   \author Martin Landa <landa.martin gmail.com> (Google SoC 2008)
-*/
-
-#include "nviz.h"
-
-/*!
-  \brief Set default lighting model
-*/
-void Nviz::SetLightsDefault()
-{
-    /* first */
-    Nviz_set_light_position(data, 0,
-			    0.68, -0.68, 0.80, 0.0);
-    Nviz_set_light_bright(data, 0,
-			  0.8);
-    Nviz_set_light_color(data, 0,
-			 1.0, 1.0, 1.0);
-    Nviz_set_light_ambient(data, 0,
-			   0.2, 0.2, 0.2);
-
-    /* second */
-    Nviz_set_light_position(data, 1,
-			    0.0, 0.0, 1.0, 0.0);
-    Nviz_set_light_bright(data, 1,
-			  0.5);
-    Nviz_set_light_color(data, 1,
-			 1.0, 1.0, 1.0);
-    Nviz_set_light_ambient(data, 1,
-			   0.3, 0.3, 0.3);
-
-    G_debug(1, "Nviz::SetLightsDefault()");
-
-    return;
-}

+ 0 - 263
gui/wxpython/nviz/load.cpp

@@ -1,263 +0,0 @@
-/**
-   \file nviz/load.cpp
-
-   \brief wxNviz extension (3D view mode) - load data layers
-   
-   This program is free software under the GNU General Public
-   License (>=v2). Read the file COPYING that comes with GRASS
-   for details.
-   
-   (C) 2008-2009 by Martin Landa, and the GRASS development team
-   
-   \author Martin Landa <landa.martin gmail.com> (Google SoC 2008)
-*/
-
-#include "nviz.h"
-
-extern "C" {
-#include <grass/G3d.h>
-#include <grass/glocale.h>
-}
-
-/*!
-  \brief Load raster map (surface)
-
-  \param name raster map name
-  \param color_name raster map for color (NULL for color_value)
-  \param color_value color string (named color or RGB triptet)
-
-  \return object id
-  \return -1 on failure
-*/
-int Nviz::LoadSurface(const char* name, const char *color_name, const char *color_value)
-{
-    const char *mapset;
-    int id;
-
-    mapset = G_find_raster2 (name, "");
-    if (mapset == NULL) {
-	G_warning(_("Raster map <%s> not found"),
-		  name);
-	return -1;
-    }
-	    
-    /* topography */
-    id = Nviz_new_map_obj(MAP_OBJ_SURF,
-			  G_fully_qualified_name(name, mapset), 0.0,
-			  data);
-
-    if (color_name) { /* check for color map */
-	mapset = G_find_raster2 (color_name, "");
-	if (mapset == NULL) {
-	    G_warning(_("Raster map <%s> not found"),
-		      color_name);
-	    GS_delete_surface(id);
-	    return -1;
-	}
-
-	Nviz_set_attr(id, MAP_OBJ_SURF, ATT_COLOR, MAP_ATT,
-		      G_fully_qualified_name(color_name, mapset), -1.0,
-		      data);
-    }
-    else if (color_value) { /* check for color value */
-	Nviz_set_attr(id, MAP_OBJ_SURF, ATT_COLOR, CONST_ATT,
-		      NULL, Nviz_color_from_str(color_value),
-		      data);
-    }
-    else { /* use by default elevation map for coloring */
-	Nviz_set_attr(id, MAP_OBJ_SURF, ATT_COLOR, MAP_ATT,
-		      G_fully_qualified_name(name, mapset), -1.0,
-		      data);
-    }
-	    
-    /*
-      if (i > 1)
-      set_default_wirecolors(data, i);
-    */
-
-    /* focus on loaded data */
-    Nviz_set_focus_map(MAP_OBJ_UNDEFINED, -1);
-
-    G_debug(1, "Nviz::LoadRaster(): name=%s -> id=%d", name, id);
-
-    return id;
-}
-
-/*!
-  \brief Unload surface
-
-  \param id surface id
-
-  \return 1 on success
-  \return 0 on failure
-*/
-int Nviz::UnloadSurface(int id)
-{
-    if (!GS_surf_exists(id)) {
-	return 0;
-    }
-
-    G_debug(1, "Nviz::UnloadSurface(): id=%d", id);
-
-    if (GS_delete_surface(id) < 0)
-      return 0;
-
-    return 1;
-}
-
-/*!
-  \brief Load vector map overlay
-
-  \param name vector map name
-  \param points if true load 2d points rather then 2d lines
-
-  \return object id
-  \return -1 on failure
-*/
-int Nviz::LoadVector(const char *name, bool points)
-{
-    int id;
-    const char *mapset;
-
-    if (GS_num_surfs() == 0) { /* load base surface if no loaded */
-	int *surf_list, nsurf;
-	
-	Nviz_new_map_obj(MAP_OBJ_SURF, NULL, 0.0, data);
-
-	surf_list = GS_get_surf_list(&nsurf);
-	GS_set_att_const(surf_list[0], ATT_TRANSP, 255);
-    }
-
-    mapset = G_find_vector2 (name, "");
-    if (mapset == NULL) {
-	G_warning(_("Vector map <%s> not found"),
-		  name);
-    }
-
-    if (points) {
-      id = Nviz_new_map_obj(MAP_OBJ_SITE,
-			    G_fully_qualified_name(name, mapset), 0.0,
-			    data);
-    }
-    else {
-      id = Nviz_new_map_obj(MAP_OBJ_VECT,
-			    G_fully_qualified_name(name, mapset), 0.0,
-			    data);
-    }
-
-    G_debug(1, "Nviz::LoadVector(): name=%s -> id=%d", name, id);
-
-    return id;
-}
-  
-/*!
-  \brief Unload vector set
-
-  \param id vector set id
-  \param points vector points or lines set
-
-  \return 1 on success
-  \return 0 on failure
-*/
-int Nviz::UnloadVector(int id, bool points)
-{
-    G_debug(1, "Nviz::UnloadVector(): id=%d", id);
-
-    if (points) {
-	if (!GP_site_exists(id)) {
-	    return 0;
-	}
-	
-	if (GP_delete_site(id) < 0)
-	    return 0;
-    }
-    else {
-	if (!GV_vect_exists(id)) {
-	    return 0;
-	}
-	
-	if (GV_delete_vector(id) < 0)
-	    return 0;
-    }
-
-    return 1;
-}
-
-/*!
-  \brief Load 3d raster map (volume)
-
-  \param name 3d raster map name
-  \param color_name 3d raster map for color (NULL for color_value)
-  \param color_value color string (named color or RGB triptet)
-
-  \return object id
-  \return -1 on failure
-*/
-int Nviz::LoadVolume(const char* name, const char *color_name, const char *color_value)
-{
-    char *mapset;
-    int id;
-
-    mapset = G_find_grid3(name, "");
-    if (mapset == NULL) {
-	G_warning(_("3d raster map <%s> not found"),
-		  name);
-	return -1;
-    }
-	    
-    /* topography */
-    id = Nviz_new_map_obj(MAP_OBJ_VOL,
-			  G_fully_qualified_name(name, mapset), 0.0,
-			  data);
-
-    if (color_name) { /* check for color map */
-	mapset = G_find_grid3(color_name, "");
-	if (mapset == NULL) {
-	    G_warning(_("3d raster map <%s> not found"),
-		      color_name);
-	    GVL_delete_vol(id);
-	    return -1;
-	}
-
-	Nviz_set_attr(id, MAP_OBJ_VOL, ATT_COLOR, MAP_ATT,
-		      G_fully_qualified_name(color_name, mapset), -1.0,
-		      data);
-    }
-    else if (color_value) { /* check for color value */
-	Nviz_set_attr(id, MAP_OBJ_VOL, ATT_COLOR, CONST_ATT,
-		      NULL, Nviz_color_from_str(color_value),
-		      data);
-    }
-    else { /* use by default elevation map for coloring */
-	Nviz_set_attr(id, MAP_OBJ_VOL, ATT_COLOR, MAP_ATT,
-		      G_fully_qualified_name(name, mapset), -1.0,
-		      data);
-    }
-    
-    G_debug(1, "Nviz::LoadVolume(): name=%s -> id=%d", name, id);
-
-    return id;
-}
-
-/*!
-  \brief Unload volume
-
-  \param id volume id
-
-  \return 1 on success
-  \return 0 on failure
-*/
-int Nviz::UnloadVolume(int id)
-{
-    if (!GVL_vol_exists(id)) {
-	return 0;
-    }
-
-    G_debug(1, "Nviz::UnloadVolume(): id=%d", id);
-
-    if (GVL_delete_vol(id) < 0)
-      return 0;
-
-    return 1;
-}
-

+ 0 - 116
gui/wxpython/nviz/nviz.h

@@ -1,116 +0,0 @@
-#ifndef WXNVIZ_H
-#define WXNVIZ_H
-
-// For compilers that support precompilation, includes "wx.h".
-#include <wx/wxprec.h>
-
-#include <vector>
-
-extern "C" {
-#include <grass/gis.h>
-#include <grass/nviz.h>
-#include <grass/gsurf.h>
-#include <grass/gstypes.h>
-}
-
-
-#ifdef __BORLANDC__
-#pragma hdrstop
-#endif
-
-#ifndef WX_PRECOMP
-// Include your minimal set of headers here, or wx.h
-#include <wx/wx.h>
-#endif
-
-#include <wx/glcanvas.h>
-
-#include <Python.h>
-
-class Nviz
-{
-private:
-    nv_data *data;
-    
-    /* surface.cpp */
-    int SetSurfaceAttr(int, int, bool, const char *);
-    int UnsetSurfaceAttr(int, int);
-
-    /* volume.cpp */
-    int SetIsosurfaceAttr(int, int, int, bool, const char *);
-    int UnsetIsosurfaceAttr(int, int, int);
-
-public:
-    /* constructor */
-    Nviz(PyObject *);
-
-    /* destructor */
-    ~Nviz();
-
-    /* change_view.cpp */
-    int ResizeWindow(int, int);
-    std::vector<double> SetViewDefault();
-    int SetView(float, float,
-		float, float, float);
-    int SetZExag(float);
-
-    /* init.cpp */
-    void InitView();
-    void SetBgColor(const char *);
-
-    /* lights.cpp */
-    void SetLightsDefault();
-
-    /* load.cpp */
-    int LoadSurface(const char*, const char *, const char *);
-    int UnloadSurface(int);
-    int LoadVector(const char *, bool);
-    int UnloadVector(int, bool);
-    int LoadVolume(const char*, const char *, const char *);
-    int UnloadVolume(int);
-
-    /* draw.cpp */
-    void Draw(bool, int);
-    void EraseMap();
-
-    /* surface.cpp */
-    int SetSurfaceTopo(int, bool, const char *);
-    int SetSurfaceColor(int, bool, const char *);
-    int SetSurfaceMask(int, bool, const char *);
-    int SetSurfaceTransp(int, bool, const char *);
-    int SetSurfaceShine(int, bool, const char *);
-    int SetSurfaceEmit(int, bool, const char *);
-    int UnsetSurfaceMask(int);
-    int UnsetSurfaceTransp(int);
-    int UnsetSurfaceEmit(int);
-    int SetSurfaceRes(int, int, int);
-    int SetSurfaceStyle(int, int);
-    int SetWireColor(int, const char *);
-    std::vector<double> GetSurfacePosition(int);
-    int SetSurfacePosition(int, float, float, float);
-
-    /* vector */
-    int SetVectorLineMode(int, const char *, int, int);
-    int SetVectorLineHeight(int, float);
-    int SetVectorLineSurface(int, int);
-    int SetVectorPointMode(int, const char*, int, float, int);
-    int SetVectorPointHeight(int, float);
-    int SetVectorPointSurface(int, int);
-
-    /* volume */
-    int AddIsosurface(int, int);
-    int DeleteIsosurface(int, int);
-    int MoveIsosurface(int, int, bool);
-    int SetIsosurfaceColor(int, int, bool, const char *);
-    int SetIsosurfaceMask(int, int, bool, const char *);
-    int SetIsosurfaceTransp(int, int, bool, const char *);
-    int SetIsosurfaceShine(int, int, bool, const char *);
-    int SetIsosurfaceEmit(int, int, bool, const char *);
-    int UnsetIsosurfaceMask(int, int);
-    int UnsetIsosurfaceTransp(int, int);
-    int UnsetIsosurfaceEmit(int, int);
-    int SetIsosurfaceMode(int, int);
-    int SetIsosurfaceRes(int, int);
-};
-
-#endif /* WXNVIZ_H */

+ 0 - 21
gui/wxpython/nviz/nviz.i

@@ -1,21 +0,0 @@
-/* File: nviz.i */
-
-%module grass7_wxnviz
-%{
-#include "nviz.h"
-#include <grass/gsurf.h>
-#include <grass/gstypes.h>
-#undef check
-%}
-
-%include "std_vector.i"
-namespace std { 
-   %template(IntVector) vector<int>;
-   %template(DoubleVector) vector<double>;
-}
-%include "std_map.i"
-namespace std { 
-   %template(IntVecIntMap) map<int, vector<int> >;
-}
-
-%include "nviz.h"

+ 0 - 59
gui/wxpython/nviz/nviz_types.i

@@ -1,59 +0,0 @@
-/* extracted from include/vect/dig_defines.h */
-
-#define GV_POINT      0x01
-#define GV_LINE       0x02
-#define GV_BOUNDARY   0x04
-#define GV_CENTROID   0x08
-#define GV_FACE       0x10
-#define GV_KERNEL     0x20
-#define GV_AREA       0x40
-#define GV_VOLUME     0x80
-
-#define GV_POINTS (GV_POINT | GV_CENTROID )
-#define GV_LINES (GV_LINE | GV_BOUNDARY )
-
-#define PORT_DOUBLE_MAX 1.7976931348623157e+308
-
-/* extracted from gui/wxpython/nviz/nviz.h */
-
-#define VIEW_DEFAULT_POS_X 0.85
-#define VIEW_DEFAULT_POS_Y 0.85
-#define VIEW_DEFAULT_PERSP 40.0
-#define VIEW_DEFAULT_TWIST 0.0
-#define VIEW_DEFAULT_ZEXAG 1.0
-
-/* extracted from include/gsurf.h */
-#define DM_GOURAUD   0x00000100
-#define DM_FLAT      0x00000200
-
-#define DM_FRINGE    0x00000010
-
-#define DM_WIRE      0x00000001
-#define DM_COL_WIRE  0x00000002
-#define DM_POLY      0x00000004
-#define DM_WIRE_POLY 0x00000008
-
-#define DM_GRID_WIRE 0x00000400
-#define DM_GRID_SURF 0x00000800
-
-/* site markers */
-#define ST_X          1
-#define ST_BOX        2
-#define ST_SPHERE     3
-#define ST_CUBE       4
-#define ST_DIAMOND    5
-#define ST_DEC_TREE   6
-#define ST_CON_TREE   7
-#define ST_ASTER      8
-#define ST_GYRO       9
-#define ST_HISTOGRAM  10
-
-#define MAX_ISOSURFS   12
-#define MAX_SLICES     12
-
-/* extracted from include/nviz.h */
-/* quick draw mode */
-#define DRAW_QUICK_SURFACE 0x01
-#define DRAW_QUICK_VLINES  0x02
-#define DRAW_QUICK_VPOINTS 0x04
-#define DRAW_QUICK_VOLUME  0x08

+ 0 - 65
gui/wxpython/nviz/setup.py

@@ -1,65 +0,0 @@
-#!/usr/bin/env python
- 
-# Setup script for wxGUI vdigit extension.
-
-import os
-import sys
-
-sys.path.append('..')
-from build_ext import update_opts
-
-from distutils.core import setup, Extension
-
-if sys.platform == "win32":
-    package = '\\"grasslibs\\"'
-else:
-    package = '"grasslibs"'
-macros = [('PACKAGE', package)]
-
-inc_dirs = [os.path.join(os.path.normpath(os.getenv('ARCH_DISTDIR')), 'include'),
-	    os.path.join(os.path.normpath(os.getenv('GISBASE')), 'include')]
-lib_dirs = [os.path.join(os.path.normpath(os.getenv('ARCH_DISTDIR')), 'lib'),
-	    os.path.join(os.path.normpath(os.getenv('GISBASE')), 'lib')]
-libs = ['grass_gis',
-        'grass_nviz',
-        'grass_ogsf',
-        'grass_g3d']
-extras = []
-
-for flag in ['CXXFLAGS',
-	     'GDALCFLAGS',
-             'GDALLIBS',
-             'WXWIDGETSCXXFLAGS',
-             'OPENGLINC',
-             'OPENGLLIB',
-             'OPENGLULIB']:
-    update_opts(os.getenv(flag), macros, inc_dirs, lib_dirs, libs, extras)
-if sys.platform != 'darwin':
-    update_opts(os.getenv('WXWIDGETSLIB'), macros, inc_dirs, lib_dirs, libs, extras)
-if os.getenv('OPENGL_X11') == '1':
-    update_opts(os.getenv('XCFLAGS'), macros, inc_dirs, lib_dirs, libs, extras)
-
-setup(
-    ext_modules= [
-        Extension(
-            name = '_grass7_wxnviz',
-            sources=["change_view.cpp",
-                     "draw.cpp",
-                     "init.cpp",
-                     "lights.cpp",
-                     "load.cpp",
-                     "surface.cpp",
-                     "vector.cpp",
-                     "volume.cpp",
-                     "grass7_wxnviz.i"],
-            swig_opts = ['-c++',
-                         '-shadow'],
-            define_macros = macros,
-            include_dirs = inc_dirs,
-            library_dirs = lib_dirs,
-            libraries = libs,
-            extra_link_args = extras,
-            )
-	]
-    )
-

+ 0 - 406
gui/wxpython/nviz/surface.cpp

@@ -1,406 +0,0 @@
-/**
-   \file nviz/surface.cpp
-   
-   \brief wxNviz extension (3D view mode) - surface attributes
-   
-   This program is free software under the GNU General Public
-   License (>=v2). Read the file COPYING that comes with GRASS
-   for details.
-   
-   (C) 2008-2009 by Martin Landa, and the GRASS development team
-   
-   \author Martin Landa <landa.martin gmail.com> (Google SoC 2008)
-*/
-
-#include "nviz.h"
-
-/*!
-  \brief Set surface topography
-
-  \param id surface id
-  \param map if true use map otherwise constant
-  \param value map name of value
-
-  \return 1 on success
-  \return -1 surface not found
-  \return -2 setting attributes failed
-*/
-int Nviz::SetSurfaceTopo(int id, bool map, const char *value)
-{
-    return SetSurfaceAttr(id, ATT_TOPO, map, value);
-}
-
-/*!
-  \brief Set surface color
-
-  \param id surface id
-  \param map if true use map otherwise constant
-  \param value map name of value
-
-  \return 1 on success
-  \return -1 surface not found
-  \return -2 setting attributes failed
-*/
-int Nviz::SetSurfaceColor(int id, bool map, const char *value)
-{
-    return SetSurfaceAttr(id, ATT_COLOR, map, value);
-}
-
-/*!
-  \brief Set surface mask
-
-  @todo invert
-
-  \param id surface id
-  \param invert if true invert mask 
-  \param value map name of value
-
-  \return 1 on success
-  \return -1 surface not found
-  \return -2 setting attributes failed
-*/
-int Nviz::SetSurfaceMask(int id, bool invert, const char *value)
-{
-    return SetSurfaceAttr(id, ATT_MASK, true, value);
-}
-
-/*!
-  \brief Set surface mask
-
-  @todo invert
-
-  \param id surface id
-  \param map if true use map otherwise constant
-  \param value map name of value
-
-  \return 1 on success
-  \return -1 surface not found
-  \return -2 setting attributes failed
-*/
-int Nviz::SetSurfaceTransp(int id, bool map, const char *value)
-{
-    return SetSurfaceAttr(id, ATT_TRANSP, map, value);
-}
-
-/*!
-  \brief Set surface shininess
-
-  \param id surface id
-  \param map if true use map otherwise constant
-  \param value map name of value
-
-  \return 1 on success
-  \return -1 surface not found
-  \return -2 setting attributes failed
-*/
-int Nviz::SetSurfaceShine(int id, bool map, const char *value)
-{
-    return SetSurfaceAttr(id, ATT_SHINE, map, value);
-}
-
-/*!
-  \brief Set surface emission
-
-  \param id surface id
-  \param map if true use map otherwise constant
-  \param value map name of value
-
-  \return 1 on success
-  \return -1 surface not found
-  \return -2 setting attributes failed
-*/
-int Nviz::SetSurfaceEmit(int id, bool map, const char *value)
-{
-    return SetSurfaceAttr(id, ATT_EMIT, map, value);
-}
-
-/*!
-  \brief Set surface attribute
-
-  \param id surface id
-  \param attr attribute desc
-  \param map if true use map otherwise constant
-  \param value map name of value
-
-  \return 1 on success
-  \return -1 surface not found
-  \return -2 setting attributes failed
-*/
-int Nviz::SetSurfaceAttr(int id, int attr, bool map, const char *value)
-{
-    int ret;
-
-    if (!GS_surf_exists(id)) {
-	return -1;
-    }
-
-    if (map) {
-	ret = Nviz_set_attr(id, MAP_OBJ_SURF, attr, MAP_ATT,
-			    value, -1.0,
-			    data);
-    }
-    else {
-	float val;
-	if (attr == ATT_COLOR) {
-	    val = Nviz_color_from_str(value);
-	}
-	else {
-	    val = atof(value);
-	}
-	ret = Nviz_set_attr(id, MAP_OBJ_SURF, attr, CONST_ATT,
-			    NULL, val,
-			    data);
-    }
-	
-    G_debug(1, "Nviz::SetSurfaceAttr(): id=%d, attr=%d, map=%d, value=%s",
-	    id, attr, map, value);
-
-    return ret ? 1 : -2;
-}
-
-/*!
-  \brief Unset surface mask
-
-  \param id surface id
-
-  \return 1 on success
-  \return -1 surface not found
-  \return -2 setting attributes failed
-  \return -1 on failure
-*/
-
-int Nviz::UnsetSurfaceMask(int id)
-{
-    return UnsetSurfaceAttr(id, ATT_MASK);
-}
-
-/*!
-  \brief Unset surface transparency
-
-  \param id surface id
-
-  \return 1 on success
-  \return -1 surface not found
-  \return -2 setting attributes failed
-*/
-
-int Nviz::UnsetSurfaceTransp(int id)
-{
-    return UnsetSurfaceAttr(id, ATT_TRANSP);
-}
-
-/*!
-  \brief Unset surface emission
-
-  \param id surface id
-
-  \return 1 on success
-  \return -1 surface not found
-  \return -2 setting attributes failed
-*/
-
-int Nviz::UnsetSurfaceEmit(int id)
-{
-    return UnsetSurfaceAttr(id, ATT_EMIT);
-}
-
-/*!
-  \brief Unset surface attribute
-
-  \param id surface id
-  \param attr attribute descriptor
-
-  \return 1 on success
-  \return -1 surface not found
-  \return -2 setting attributes failed
-*/
-int Nviz::UnsetSurfaceAttr(int id, int attr)
-{
-    int ret;
-    
-    if (!GS_surf_exists(id)) {
-	return -1;
-    }
-
-    G_debug(1, "Nviz::UnsetSurfaceAttr(): id=%d, attr=%d",
-	    id, attr);
-    
-    ret = Nviz_unset_attr(id, MAP_OBJ_SURF, attr);
-    
-    return ret ? 1 : -2;
-}
-
-/*!
-  \brief Set surface resolution
-
-  \param id surface id
-  \param fine x/y fine resolution
-  \param coarse x/y coarse resolution
-
-  \return 1 on success
-  \return -1 surface not found
-  \return -2 setting attributes failed
-*/
-int Nviz::SetSurfaceRes(int id, int fine, int coarse)
-{
-    G_debug(1, "Nviz::SetSurfaceRes(): id=%d, fine=%d, coarse=%d",
-	    id, fine, coarse);
-
-
-    if (id > 0) {
-	if (!GS_surf_exists(id)) {
-	    return -1;
-	}
-
-	if (GS_set_drawres(id, fine, fine, coarse, coarse) < 0) {
-	    return -2;
-	}
-    }
-    else {
-	GS_setall_drawres(fine, fine, coarse, coarse);
-    }
-
-    return 1;
-}
-
-/*!
-  \brief Set draw style
-
-  Draw styles:
-   - DM_GOURAUD
-   - DM_FLAT
-   - DM_FRINGE
-   - DM_WIRE
-   - DM_COL_WIRE
-   - DM_POLY
-   - DM_WIRE_POLY
-   - DM_GRID_WIRE
-   - DM_GRID_SURF
-
-  \param id surface id (<= 0 for all)
-  \param style draw style
-
-  \return 1 on success
-  \return -1 surface not found
-  \return -2 setting attributes failed
-*/
-int Nviz::SetSurfaceStyle(int id, int style)
-{
-    G_debug(1, "Nviz::SetSurfaceStyle(): id=%d, style=%d",
-	    id, style);
-
-    if (id > 0) {
-	if (!GS_surf_exists(id)) {
-	    return -1;
-	}
-	
-	if (GS_set_drawmode(id, style) < 0) {
-	    return -2;
-	}
-	return 1;
-    }
-
-    if (GS_setall_drawmode(style) < 0) {
-	return -2;
-    }
-
-    return 1;
-}
-
-/*!
-  \brief Set color of wire
-
-  \todo all
-
-  \param surface id (< 0 for all)
-  \param color color string (R:G:B)
-
-  \return 1 on success
-  \return -1 surface not found
-  \return -2 setting attributes failed
-  \return 1 on success
-  \return 0 on failure
-*/
-int Nviz::SetWireColor(int id, const char* color_str)
-{
-    int color;
-
-    G_debug(1, "Nviz::SetWireColor(): id=%d, color=%s",
-	    id, color_str);
-
-    color = Nviz_color_from_str(color_str);
-
-    if (id > 0) {
-	if (!GS_surf_exists(id)) {
-	    return -1;
-	}
-	GS_set_wire_color(id, color);
-    }
-    else {
-	int *surf_list, nsurfs, id;
-
-	surf_list = GS_get_surf_list(&nsurfs);
-	for (int i = 0; i < nsurfs; i++) {
-	    id = surf_list[i];
-	    GS_set_wire_color(id, color);
-	}
-
-	G_free(surf_list);
-	surf_list = NULL;
-    }
-
-    return 1;
-}
-
-/*!
-  \brief Get surface position
-
-  \param id surface id
-
-  \return x,y,z
-  \return zero-length vector on error
-*/
-std::vector<double> Nviz::GetSurfacePosition(int id)
-{
-    std::vector<double> vals;
-    float x, y, z;
-    if (!GS_surf_exists(id)) {
-	return vals;
-    }
-    
-    GS_get_trans(id, &x, &y, &z);
-    
-    G_debug(1, "Nviz::GetSurfacePosition(): id=%d, x=%f, y=%f, z=%f",
-	    id, x, y, z);
-
-
-    vals.push_back(double (x));
-    vals.push_back(double (y));
-    vals.push_back(double (z));
-
-    return vals;
-}
-
-/*!
-  \brief Set surface position
-
-  \param id surface id
-  \param x,y,z translation values
-
-  \return 1 on success
-  \return -1 surface not found
-  \return -2 setting position failed
-*/
-int Nviz::SetSurfacePosition(int id, float x, float y, float z)
-{
-    if (!GS_surf_exists(id)) {
-	return -1;
-    }
-    
-    G_debug(1, "Nviz::SetSurfacePosition(): id=%d, x=%f, y=%f, z=%f",
-	    id, x, y, z);
-
-    GS_set_trans(id, x, y, z);
-
-    return 1;
-}

+ 0 - 173
gui/wxpython/nviz/vector.cpp

@@ -1,173 +0,0 @@
-/**
-   \file nviz/vector.cpp
-
-   \brief wxNviz extension (3D view mode) - vector attributes
-   
-   This program is free software under the GNU General Public
-   License (>=v2). Read the file COPYING that comes with GRASS
-   for details.
-   
-   (C) 2008-2009 by Martin Landa, and the GRASS development team
-   
-   \author Martin Landa <landa.martin gmail.com> (Google SoC 2008)
-*/
-
-#include "nviz.h"
-
-/**
-   \brief Set mode of vector line overlay
-
-   \param id vector id
-   \param color_str color string
-   \param width line width
-   \param flat display flat or on surface
-
-   \return -1 vector set not found
-   \return -2 on failure
-   \return 1 on success
-*/
-int Nviz::SetVectorLineMode(int id, const char *color_str,
-			    int width, int flat)
-{
-    int color;
-
-    if(!GV_vect_exists(id))
-	return -1;
-
-    G_debug(1, "Nviz::SetVectorMode(): id=%d, color=%s, width=%d, flat=%d",
-	    id, color_str, width, flat);
-
-
-    color = Nviz_color_from_str(color_str);
-
-    /* use memory by default */
-    if (GV_set_vectmode(id, 1, color, width, flat) < 0)
-	return -2;
-    
-    return 1;
-}
-
-/**
-  \brief Set vector height above surface (lines)
-
-  \param id vector set id
-  \param height
-
-  \return -1 vector set not found
-  \return 1 on success
-*/
-int Nviz::SetVectorLineHeight(int id, float height)
-{
-    if(!GV_vect_exists(id))
-	return -1;
-
-    G_debug(1, "Nviz::SetVectorLineHeight(): id=%d, height=%f",
-	    id, height);
-
-    GV_set_trans(id, 0.0, 0.0, height);
-
-    return 1;
-}
-
-/**
-   \brief Set reference surface of vector set (lines)
-
-   \param id vector set id
-   \param surf_id surface id
-
-   \return 1 on success
-   \return -1 vector set not found
-   \return -2 surface not found
-   \return -3 on failure
-*/
-int Nviz::SetVectorLineSurface(int id, int surf_id)
-{
-    if (!GV_vect_exists(id))
-	return -1;
-    
-    if (!GS_surf_exists(surf_id))
-	return -2;
-
-    if (GV_select_surf(id, surf_id) < 0)
-	return -3;
-
-    return 1;
-}
-
-/**
-   \brief Set mode of vector point overlay
-
-   \param id vector id
-   \param color_str color string
-   \param width line width
-   \param flat
-
-   \return -1 vector set not found
-*/
-int Nviz::SetVectorPointMode(int id, const char *color_str,
-			     int width, float size, int marker)
-{
-    int color;
-
-    if(!GP_site_exists(id))
-	return -1;
-
-    G_debug(1, "Nviz::SetVectorPointMode(): id=%d, color=%s, "
-	    "width=%d, size=%f, marker=%d",
-	    id, color_str, width, size, marker);
-
-
-    color = Nviz_color_from_str(color_str);
-
-    if (GP_set_style(id, color, width, size, marker) < 0)
-	return -2;
-    
-    return 1;
-}
-
-/**
-  \brief Set vector height above surface (points)
-
-  \param id vector set id
-  \param height
-
-  \return -1 vector set not found
-  \return 1 on success
-*/
-int Nviz::SetVectorPointHeight(int id, float height)
-{
-    if(!GP_site_exists(id))
-	return -1;
-
-    G_debug(1, "Nviz::SetVectorPointHeight(): id=%d, height=%f",
-	    id, height);
-
-    GP_set_trans(id, 0.0, 0.0, height);
-
-    return 1;
-}
-
-/**
-   \brief Set reference surface of vector set (points)
-
-   \param id vector set id
-   \param surf_id surface id
-
-   \return 1 on success
-   \return -1 vector set not found
-   \return -2 surface not found
-   \return -3 on failure
-*/
-int Nviz::SetVectorPointSurface(int id, int surf_id)
-{
-    if (!GP_site_exists(id))
-	return -1;
-    
-    if (!GS_surf_exists(surf_id))
-	return -2;
-
-    if (GP_select_surf(id, surf_id) < 0)
-	return -3;
-
-    return 1;
-}

+ 0 - 369
gui/wxpython/nviz/volume.cpp

@@ -1,369 +0,0 @@
-/**
-   \file nviz/volume.cpp
-   
-   \brief wxNviz extension (3D view mode) - volume attributes
-   
-   This program is free software under the GNU General Public
-   License (>=v2). Read the file COPYING that comes with GRASS
-   for details.
-   
-   (C) 2008-2009 by Martin Landa, and the GRASS development team
-   
-   \author Martin Landa <landa.martin gmail.com> (Google SoC 2008)
-*/
-
-#include "nviz.h"
-
-/**
-   \brief Add new isosurface
-
-   \param id volume id
-   \param level isosurface level (topography)
-
-   \return -1 on failure
-   \return 1 on success
-*/
-
-int Nviz::AddIsosurface(int id, int level)
-{
-    int nisosurfs;
-    
-    if (!GVL_vol_exists(id))
-	return -1;
-
-    if (GVL_isosurf_add(id) < 0)
-	return -1;
-
-    /* set topography level */
-    nisosurfs = GVL_isosurf_num_isosurfs(id);
-    
-    return GVL_isosurf_set_att_const(id, nisosurfs - 1,
-				     ATT_TOPO, level);
-}
-
-/**
-   \brief Delete isosurface
-
-   \param id volume id
-   \param isosurf_id isosurface id
-
-   \return 1 on success
-   \return -1 volume not found
-   \return -2 isosurface not found
-   \return -3 on failure
-*/
-
-int Nviz::DeleteIsosurface(int id, int isosurf_id)
-{
-    int ret;
-    
-    if (!GVL_vol_exists(id))
-	return -1;
-
-    if (isosurf_id > GVL_isosurf_num_isosurfs(id))
-	return -2;
-    
-    ret = GVL_isosurf_del(id, isosurf_id);
-
-    return ret < 0 ? -3 : 1;
-}
-
-/*!
-  \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 isosurface color
-
-  \param id volume id
-  \param isosurf_id isosurface id (0 - MAX_ISOSURFS)
-  \param map if true use map otherwise constant
-  \param value map name of value
-
-  \return 1 on success
-  \return -1 volume not found
-  \return -2 isosurface not found
-  \return -3 on failure
-*/
-int Nviz::SetIsosurfaceColor(int id, int isosurf_id,
-			     bool map, const char *value)
-{
-    return SetIsosurfaceAttr(id, isosurf_id, ATT_COLOR, map, value);
-}
-
-/*!
-  \brief Set isosurface mask
-
-  @todo invert
-  
-  \param id volume id
-  \param isosurf_id isosurface id (0 - MAX_ISOSURFS)
-  \param invert true for invert mask
-  \param value map name to be used for mask
-
-  \return 1 on success
-  \return -1 volume not found
-  \return -2 isosurface not found
-  \return -3 on failure
-*/
-int Nviz::SetIsosurfaceMask(int id, int isosurf_id,
-			    bool invert, const char *value)
-{
-    return SetIsosurfaceAttr(id, isosurf_id, ATT_MASK, true, value);
-}
-
-/*!
-  \brief Set isosurface transparency
-
-  \param id volume id
-  \param isosurf_id isosurface id (0 - MAX_ISOSURFS)
-  \param map if true use map otherwise constant
-  \param value map name of value
-
-  \return 1 on success
-  \return -1 volume not found
-  \return -2 isosurface not found
-  \return -3 on failure
-*/
-int Nviz::SetIsosurfaceTransp(int id, int isosurf_id,
-			      bool map, const char *value)
-{
-    return SetIsosurfaceAttr(id, isosurf_id, ATT_TRANSP, map, value);
-}
-
-/*!
-  \brief Set isosurface shininess
-
-  \param id volume id
-  \param isosurf_id isosurface id (0 - MAX_ISOSURFS)
-  \param map if true use map otherwise constant
-  \param value map name of value
-
-  \return 1 on success
-  \return -1 volume not found
-  \return -2 isosurface not found
-  \return -3 on failure
-*/
-int Nviz::SetIsosurfaceShine(int id, int isosurf_id,
-			     bool map, const char *value)
-{
-    return SetIsosurfaceAttr(id, isosurf_id, ATT_SHINE, map, value);
-}
-
-/*!
-  \brief Set isosurface emission
-
-  \param id volume id
-  \param isosurf_id isosurface id (0 - MAX_ISOSURFS)
-  \param map if true use map otherwise constant
-  \param value map name of value
-
-  \return 1 on success
-  \return -1 volume not found
-  \return -2 isosurface not found
-  \return -3 on failure
-*/
-int Nviz::SetIsosurfaceEmit(int id, int isosurf_id,
-			    bool map, const char *value)
-{
-    return SetIsosurfaceAttr(id, isosurf_id, ATT_EMIT, map, value);
-}
-
-/*!
-  \brief Set isosurface attribute
-
-  \param id volume id
-  \param isosurf_id isosurface id (0 - MAX_ISOSURFS)
-  \param attr attribute desc
-  \param map if true use map otherwise constant
-  \param value map name of value
-
-  \return 1 on success
-  \return -1 volume not found
-  \return -2 isosurface not found
-  \return -3 setting attributes failed
-*/
-int Nviz::SetIsosurfaceAttr(int id, int isosurf_id,
-			    int attr, bool map, const char *value)
-{
-    int ret;
-
-    if (!GVL_vol_exists(id)) {
-	return -1;
-    }
-    
-    if (isosurf_id > GVL_isosurf_num_isosurfs(id) - 1)
-	return -2;
-    
-    if (map) {
-	ret = GVL_isosurf_set_att_map(id, isosurf_id, attr,
-				      value);
-    }
-    else {
-	float val;
-	if (attr == ATT_COLOR) {
-	    val = Nviz_color_from_str(value);
-	}
-	else {
-	    val = atof(value);
-	}
-	ret = GVL_isosurf_set_att_const(id, isosurf_id, attr,
-					val);
-    }
-	
-    G_debug(1, "Nviz::SetIsosurfaceAttr(): id=%d, isosurf=%d, "
-	    "attr=%d, map=%d, value=%s",
-	    id, isosurf_id, attr, map, value);
-
-    return ret > 0 ? 1 : -2;
-}
-
-/*!
-  \brief Unset isosurface mask
-
-  \param id volume id
-  \param isosurf_id isosurface id (0 - MAX_ISOSURFS)
-
-  \return 1 on success
-  \return -1 volume not found
-  \return -2 isosurface not found
-  \return -3 setting attributes failed
-*/
-int Nviz::UnsetIsosurfaceMask(int id, int isosurf_id)
-{
-    return UnsetIsosurfaceAttr(id, isosurf_id, ATT_MASK);
-}
-
-/*!
-  \brief Unset isosurface transparency
-
-  \param id volume id
-  \param isosurf_id isosurface id (0 - MAX_ISOSURFS)
-
-  \return 1 on success
-  \return -1 volume not found
-  \return -2 isosurface not found
-  \return -3 setting attributes failed
-*/
-int Nviz::UnsetIsosurfaceTransp(int id, int isosurf_id)
-{
-    return UnsetIsosurfaceAttr(id, isosurf_id, ATT_TRANSP);
-}
-
-/*!
-  \brief Unset isosurface emission
-
-  \param id volume id
-  \param isosurf_id isosurface id (0 - MAX_ISOSURFS)
-
-  \return 1 on success
-  \return -1 volume not found
-  \return -2 isosurface not found
-  \return -3 setting attributes failed
-*/
-int Nviz::UnsetIsosurfaceEmit(int id, int isosurf_id)
-{
-    return UnsetIsosurfaceAttr(id, isosurf_id, ATT_EMIT);
-}
-
-/*!
-  \brief Unset surface attribute
-
-  \param id surface id
-  \param isosurf_id isosurface id (0 - MAX_ISOSURFS)
-  \param attr attribute descriptor
-
-  \return 1 on success
-  \return -1 volume not found
-  \return -2 isosurface not found
-  \return -2 on failure
-*/
-int Nviz::UnsetIsosurfaceAttr(int id, int isosurf_id,
-			      int attr)
-{
-    int ret;
-    
-    if (!GVL_vol_exists(id)) {
-	return -1;
-    }
-
-    if (isosurf_id > GVL_isosurf_num_isosurfs(id) - 1)
-	return -2;
-    
-    G_debug(1, "Nviz::UnsetSurfaceAttr(): id=%d, isosurf_id=%d, attr=%d",
-	    id, isosurf_id, attr);
-    
-    ret = GVL_isosurf_unset_att(id, isosurf_id, attr);
-    
-    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;
-}