Changeset 31935


Ignore:
Timestamp:
Jul 1, 2008, 1:02:21 PM (16 years ago)
Author:
martinl
Message:

nviz2 moved from grass-addons to trunk

Location:
grass/trunk
Files:
4 added
8 edited
28 copied

Legend:

Unmodified
Added
Removed
  • grass/trunk/gui/wxpython/Makefile

    r31213 r31935  
    55include $(MODULE_TOPDIR)/include/Make/Platform.make
    66
     7#compile if wxWidgets, Python, CXX present
    78ifneq ($(USE_WXWIDGETS),)
    89  ifneq ($(USE_PYTHON),)
    910    ifneq ($(strip $(CXX)),)
    1011       SUBDIRS += vdigit
     12         #compile if OpenGL present
     13         ifneq ($(strip $(OPENGLLIB)),)
     14           SUBDIRS += nviz
     15         endif
    1116    endif
    1217  endif
     
    2126
    2227install_scripts:
    23         $(MKDIR) $(ETCDIR) $(ETCDIR)/compat $(ETCDIR)/gui_modules $(ETCDIR)/icons $(ETCDIR)/icons/silk $(ETCDIR)/images $(ETCDIR)/scripts $(ETCDIR)/vdigit $(ETCDIR)/xml
     28        $(MKDIR) $(ETCDIR) $(ETCDIR)/compat $(ETCDIR)/gui_modules $(ETCDIR)/icons $(ETCDIR)/icons/silk $(ETCDIR)/images $(ETCDIR)/scripts $(ETCDIR)/vdigit $(ETCDIR)/xml $(ETCDIR)/nviz
    2429        $(INSTALL_DATA) compat/* $(ETCDIR)/compat/
    2530        $(INSTALL_DATA) gui_modules/* $(ETCDIR)/gui_modules/
  • grass/trunk/gui/wxpython/gui_modules/mapdisp.py

    r31701 r31935  
    44CLASSES:
    55 - Command
     6 - MapWindow
    67 - BufferedWindow
    78 - MapFrame
     
    122123        sys.exit()
    123124
    124 class BufferedWindow(wx.Window):
     125class MapWindow(object):
     126    """Abstract map window class
     127
     128    Parent for BufferedWindow class (2D display mode) and
     129    GLWindow (3D display mode)
     130    """
     131    def __init__(self, parent, id,
     132                 pos=wx.DefaultPosition,
     133                 size=wx.DefaultSize,
     134                 style=wx.NO_FULL_REPAINT_ON_RESIZE,
     135                 Map=None, tree=None, gismgr=None):
     136        pass
     137
     138    def EraseMap(self):
     139        """
     140        Erase the canvas (virtual method)
     141        """
     142        pass
     143
     144    def UpdateMap(self):
     145        """
     146        Updates the canvas anytime there is a change to the
     147        underlaying images or to the geometry of the canvas.
     148        """
     149        pass
     150
     151    def OnLeftDown(self, event):
     152        pass
     153
     154    def OnLeftUp(self, event):
     155        pass
     156
     157    def OnMouseMotion(self, event):
     158        pass
     159
     160    def ZoomToMap(self, event):
     161        pass
     162
     163    def GetSelectedLayer(self, nviz=False, index=False):
     164        """Get selected layer from layer tree
     165
     166        @param nviz get nviz properties instead
     167
     168        @return map layer instance
     169        @return None on failure
     170        """
     171        # get currently selected map layer
     172        if not self.tree or not self.tree.GetSelection():
     173            return None
     174       
     175        item = self.tree.GetSelection()
     176        try:
     177            if nviz:
     178                layer = self.tree.GetPyData(item)[0]['nviz']
     179            else:
     180                layer = self.tree.GetPyData(item)[0]['maplayer']
     181        except:
     182            layer = None
     183           
     184        return layer
     185
     186class BufferedWindow(MapWindow, wx.Window):
    125187    """
    126188    A Buffered window class.
     
    138200                 Map=None, tree=None, gismgr=None):
    139201
     202        MapWindow.__init__(self, parent, id, pos, size, style,
     203                           Map, tree, gismgr)
    140204        wx.Window.__init__(self, parent, id, pos, size, style)
     205
    141206        self.parent = parent
    142207        self.Map = Map
     
    540605    def UpdateMap(self, render=True, renderVector=True):
    541606        """
    542         Updates the canvas anytime there is a change to the underlaying images
    543         or to the geometry of the canvas.
     607        Updates the canvas anytime there is a change to the
     608        underlaying images or to the geometry of the canvas.
    544609
    545610        @param render re-render map composition
    546611        @param renderVector re-render vector map layer enabled for editing (used for digitizer)
    547612        """
    548 
    549613        start = time.clock()
    550614
     
    712776    def EraseMap(self):
    713777        """
    714         Erase the map display
     778        Erase the canvas
    715779        """
    716780        self.Draw(self.pdc, pdctype='clear')
     
    20382102        zoomreg = {}
    20392103
    2040         # find selected map
    2041         if not self.tree or not self.tree.GetSelection():
    2042             return
    2043 
    2044         item  = self.tree.GetSelection()
    2045         try:
    2046             layer = self.tree.GetPyData(item)[0]['maplayer']
    2047         except:
    2048             layer = None
     2104        layer = self.GetSelectedLayer()
    20492105
    20502106        if layer is None:
     
    23092365        self.toolbars = { 'map' : None,
    23102366                          'vdigit' : None,
    2311                           'georect' : None }
     2367                          'georect' : None,
     2368                          'nviz' : None }
    23122369        for toolb in toolbars:
    23132370            self.AddToolbar(toolb)
     
    23692426        # Init map display (buffered DC & set default cursor)
    23702427        #
    2371         self.MapWindow = BufferedWindow(self, id=wx.ID_ANY, Map=self.Map, tree=self.tree, gismgr=self.gismanager)
     2428        self.MapWindow2D = BufferedWindow(self, id=wx.ID_ANY,
     2429                                          Map=self.Map, tree=self.tree, gismgr=self.gismanager)
     2430        # default is 2D display mode
     2431        self.MapWindow = self.MapWindow2D
    23722432        self.MapWindow.Bind(wx.EVT_MOTION, self.OnMotion)
    23732433        self.MapWindow.SetCursor(self.cursors["default"])
     2434        # used by Nviz (3D display mode)
     2435        self.MapWindow3D = None
    23742436
    23752437        #
     
    24352497         - digit vector digitizer
    24362498         - georect georectifier
    2437          """
     2499        """
     2500        # default toolbar
    24382501        if name == "map":
    24392502            self.toolbars['map'] = toolbars.MapToolbar(self, self.Map)
     
    24462509                              BottomDockable(False).TopDockable(True).
    24472510                              CloseButton(False).Layer(2))
    2448 
    2449         if name == "digit":
     2511        # vector digitizer
     2512        elif name == "vdigit":
    24502513            self.toolbars['vdigit'] = toolbars.VDigitToolbar(self, self.Map, self.tree)
    24512514
     
    24642527            self.MapWindow.pen     = wx.Pen(colour='red',   width=2, style=wx.SOLID)
    24652528            self.MapWindow.polypen = wx.Pen(colour='green', width=2, style=wx.SOLID)
    2466 
    2467         if name == "georect":
     2529        # georectifier
     2530        elif name == "georect":
    24682531            self.toolbars['georect'] = toolbars.GRToolbar(self, self.Map)
    24692532
    24702533            self._mgr.AddPane(self.toolbars['georect'].toolbar,
    24712534                              wx.aui.AuiPaneInfo().
    2472                               Name("georecttoolbar").Caption(_("Georectification Toolbar")).
     2535                              Name("georecttoolbar").Caption(_("Georectification toolbar")).
    24732536                              ToolbarPane().Top().
    24742537                              LeftDockable(False).RightDockable(False).
    24752538                              BottomDockable(False).TopDockable(True).
    24762539                              CloseButton(False).Layer(2))
    2477 
     2540        # nviz
     2541        elif name == "nviz":
     2542            import nviz
     2543            # check for GLCanvas and OpenGL
     2544            msg = None
     2545            if not nviz.haveGLCanvas:
     2546                msg = _("Unable to start Nviz. The GLCanvas class has not been included with this build "
     2547                        "of wxPython! Switching back to 2D display mode.")
     2548            if not nviz.haveOpenGL:
     2549                msg = _("Unable to start Nviz. The OpenGL package was not found. You can get it "
     2550                        "at http://PyOpenGL.sourceforge.net. Switching back to 2D display mode.")
     2551            if not nviz.haveNviz:
     2552                msg = _("Unable to start Nviz. Python extension for Nviz was not found. "
     2553                        "Switching back to 2D display mode.")
     2554
     2555            if msg:
     2556                wx.MessageBox(parent=self,
     2557                              message=msg,
     2558                              caption=_("Error"))
     2559                return
     2560
     2561            #
     2562            # create GL window & NVIZ toolbar
     2563            #
     2564            if not self.MapWindow3D:
     2565                self.MapWindow3D = nviz.GLWindow(self, id=wx.ID_ANY,
     2566                                                 Map=self.Map, tree=self.tree, gismgr=self.gismanager)
     2567                self.nvizToolWin = nviz.NvizToolWindow(self, id=wx.ID_ANY,
     2568                                                       mapWindow=self.MapWindow3D)
     2569           
     2570            #
     2571            # add Nviz toolbar and disable 2D display mode tools
     2572            #
     2573            self.toolbars['nviz'] = toolbars.NvizToolbar(self, self.Map)
     2574            self.toolbars['map'].Enable2D(False)
     2575            self.toggleStatus.Enable(False)
     2576
     2577            self.nvizToolWin.Show()
     2578
     2579            #
     2580            # switch from MapWindow to MapWindowGL
     2581            # add nviz toolbar
     2582            #
     2583            self._mgr.DetachPane(self.MapWindow2D)
     2584            self.MapWindow2D.Hide()
     2585            self._mgr.AddPane(self.MapWindow3D, wx.aui.AuiPaneInfo().CentrePane().
     2586                              Dockable(False).BestSize((-1,-1)).
     2587                              CloseButton(False).DestroyOnClose(True).
     2588                              Layer(0))
     2589            self._mgr.AddPane(self.toolbars['nviz'].toolbar,
     2590                              wx.aui.AuiPaneInfo().
     2591                              Name("nviztoolbar").Caption(_("Nviz toolbar")).
     2592                              ToolbarPane().Top().Row(1).
     2593                              LeftDockable(False).RightDockable(False).
     2594                              BottomDockable(False).TopDockable(True).
     2595                              CloseButton(False).Layer(2))
     2596            self.MapWindow = self.MapWindow3D
     2597           
    24782598        self._mgr.Update()
    24792599
     
    24882608        if name == "map":
    24892609            return
    2490         elif name == "digit":
     2610        elif name == "vdigit":
    24912611            # TODO: not destroy only hide
    24922612            for toolRow in range(0, self.toolbars['vdigit'].numOfRows):
    24932613                self._mgr.DetachPane (self.toolbars['vdigit'].toolbar[toolRow])
    24942614                self.toolbars['vdigit'].toolbar[toolRow].Destroy()
    2495             self.toolbars['vdigit'] = None
    2496 
    2497         self.toolbars['map'].combo.SetValue ("Tools");
     2615        else:
     2616            self._mgr.DetachPane (self.toolbars[name].toolbar)
     2617            self.toolbars[name].toolbar.Destroy()
     2618
     2619        self.toolbars[name] = None
     2620
     2621        if name == 'nviz':
     2622            # hide nviz tools
     2623            self.nvizToolWin.Hide()
     2624            # unload data
     2625            self.MapWindow3D.Reset()
     2626            # switch from MapWindowGL to MapWindow
     2627            self._mgr.DetachPane(self.MapWindow3D)
     2628            self.MapWindow3D.Hide()
     2629            self.MapWindow2D.Show()
     2630            self._mgr.AddPane(self.MapWindow2D, wx.aui.AuiPaneInfo().CentrePane().
     2631                              Dockable(False).BestSize((-1,-1)).
     2632                              CloseButton(False).DestroyOnClose(True).
     2633                              Layer(0))
     2634            self.MapWindow = self.MapWindow2D
     2635       
     2636        self.toolbars['map'].combo.SetValue ("Tools")
     2637        self.toolbars['map'].Enable2D(True)
     2638        self.toggleStatus.Enable(True)
     2639
    24982640        self._mgr.Update()
    24992641
  • grass/trunk/gui/wxpython/gui_modules/preferences.py

    r31640 r31935  
    197197                             },
    198198                },
     199            'nviz' : {
     200                'view' : {'persp' : { 'value' : 40,
     201                                      'min' : 1,
     202                                      'max' : 100,
     203                                      'step' : 5,
     204                                      'update' : False,
     205                                      },
     206                          'pos' : { 'x' : 0.85,
     207                                    'y' : 0.85,
     208                                    'update' : False,
     209                                    },
     210                          'height' : { 'value': -1,
     211                                       'min' : -2245, # TODO: determine min/max height
     212                                       'max' : 3695,
     213                                       'step' : 100,
     214                                       'update' : False,
     215                                       },
     216                          'twist' : { 'value' : 0,
     217                                      'min' : -180,
     218                                      'max' : 180,
     219                                      'step' : 5,
     220                                      'update' : False,
     221                                      },
     222                          'z-exag' : { 'value': 1.0,
     223                                       'min' : 0.0,
     224                                       'max' : 10,
     225                                       'step' : 1,
     226                                       'update' : False
     227                                       },
     228                          },
     229                'surface' : {
     230                    'shine': { 'map' : False,
     231                               'value' : 60.0,
     232                                   },
     233                    'color' : { 'map' : True,
     234                                'value' : (0, 0, 0, 255), # constant: black
     235                                },
     236                    'draw' : {
     237                        'color' : (136, 136, 136, 255),
     238                        'mode' : 1, # fine
     239                        'style' : 1, # surface
     240                        'shading' : 1, # gouraud
     241                        'res-fine' : 6,
     242                        'res-coarse' : 9,
     243                        },
     244                    'position' : {
     245                        'x' : 0,
     246                        'y' : 0,
     247                        'z' : 0,
     248                        },
     249                    },
     250                },
    199251            }
    200 
     252       
    201253        #
    202254        # user settings
     
    284336                group, key = line.split(':')[0:2]
    285337                kv = line.split(':')[2:]
     338                subkeyMaster = None
     339                if len(kv) % 2 != 0: # multiple (e.g. nviz)
     340                    subkeyMaster = kv[0]
     341                    del kv[0]
    286342                idx = 0
    287343                while idx < len(kv):
    288                     subkey = kv[idx]
     344                    if subkeyMaster:
     345                        subkey = [subkeyMaster, kv[idx]]
     346                    else:
     347                        subkey = kv[idx]
    289348                    value = kv[idx+1]
    290349                    if len(value) == 0:
     
    302361                            try:
    303362                                value = tuple(map(int, tmp))
    304                             except:
     363                            except ValueError:
    305364                                value = tuple(tmp)
    306365                        else:
    307366                            try:
    308367                                value = int(value)
    309                             except:
    310                                 pass
     368                            except ValueError:
     369                                try:
     370                                    value = float(value)
     371                                except ValueError:
     372                                    pass
    311373
    312374                        self.Append(settings, group, key, subkey, value)
     
    338400            file = open(filePath, "w")
    339401            for group in settings.keys():
    340                 for item in settings[group].keys():
    341                     file.write('%s:%s:' % (group, item))
    342                     items = settings[group][item].keys()
    343                     for idx in range(len(items)):
    344                         file.write('%s:%s' % (items[idx], settings[group][item][items[idx]]))
    345                         if idx < len(items) - 1:
    346                             file.write(':')
     402                for key in settings[group].keys():
     403                    file.write('%s:%s:' % (group, key))
     404                    subkeys = settings[group][key].keys()
     405                    for idx in range(len(subkeys)):
     406                        value = settings[group][key][subkeys[idx]]
     407                        if type(value) == type({}):
     408                            if idx > 0:
     409                                file.write('%s%s:%s:' % (os.linesep, group, key))
     410                            file.write('%s:' % subkeys[idx])
     411                            kvalues = settings[group][key][subkeys[idx]].keys()
     412                            srange = range(len(kvalues))
     413                            for sidx in srange:
     414                                file.write('%s:%s' % (kvalues[sidx],
     415                                                      settings[group][key][subkeys[idx]][kvalues[sidx]]))
     416                                if sidx < len(kvalues) - 1:
     417                                    file.write(':')
     418                        else:
     419                            file.write('%s:%s' % (subkeys[idx], value))
     420                            if idx < len(subkeys) - 1:
     421                                file.write(':')
    347422                    file.write('%s' % os.linesep)
    348423        except IOError, e:
     
    363438        @param key
    364439        @param subkey if not given return dict of key
    365        
     440        @param subkey1
     441        @param internal use internal settings instead
     442
    366443        @return value
    367 
    368444        """
    369445        if internal is True:
     
    379455                    return settings[group][key]
    380456            else:
    381                 return settings[group][key][subkey]
     457                if type(subkey) == type([]):
     458                    return settings[group][key][subkey[0]][subkey[1]]
     459                else:
     460                    return settings[group][key][subkey] 
     461
    382462        except KeyError:
    383463            raise gcmd.SettingsError("%s %s:%s:%s." % (_("Unable to get value"),
     
    391471        @param group settings group
    392472        @param key key
    393         @param subkey subkey
     473        @param subkey subkey (value or list)
    394474        @param value value
     475        @param internal use internal settings instead
    395476        """
    396477        if internal is True:
     
    400481
    401482        try:
    402             if not settings[group][key].has_key(subkey):
    403                 raise KeyError
    404             settings[group][key][subkey] = value
     483            if type(subkey) == type([]):
     484                settings[group][key][subkey[0]][subkey[1]] = value
     485            else:
     486                settings[group][key][subkey] = value
    405487        except KeyError:
    406488            raise gcmd.SettingsError("%s '%s:%s:%s'" % (_("Unable to set "), group, key, subkey))
     
    414496        @param group settings group
    415497        @param key key
    416         @param subkey subkey
     498        @param subkey subkey (value or list)
    417499        @param value value
    418500        """
     
    423505            dict[group][key] = {}
    424506
    425         dict[group][key][subkey] = value
     507        if type(subkey) == type([]):
     508            # TODO: len(subkey) > 2
     509            if not dict[group][key].has_key(subkey[0]):
     510                dict[group][key][subkey[0]] = {}
     511            dict[group][key][subkey[0]][subkey[1]] = value
     512        else:
     513            dict[group][key][subkey] = value
    426514
    427515    def GetDefaultSettings(self):
  • grass/trunk/gui/wxpython/gui_modules/toolbars.py

    r31701 r31935  
    99    * VDigitToolbar
    1010    * ProfileToolbar
    11    
     11    * NvizToolbar
     12
    1213PURPOSE: Toolbars for Map Display window
    1314
     
    112113        # optional tools
    113114        self.combo = wx.ComboBox(parent=self.toolbar, id=wx.ID_ANY, value='Tools',
    114                                  choices=['Digitize'], style=wx.CB_READONLY, size=(90, -1))
     115                                 choices=['Digitize', 'Nviz'], style=wx.CB_READONLY, size=(90, -1))
    115116
    116117        self.comboid = self.toolbar.AddControl(self.combo)
    117         self.mapdisplay.Bind(wx.EVT_COMBOBOX, self.OnSelect, self.comboid)
     118        self.mapdisplay.Bind(wx.EVT_COMBOBOX, self.OnSelectTool, self.comboid)
    118119
    119120        # realize the toolbar
     
    189190            )
    190191
    191     def OnSelect(self, event):
     192    def OnSelectTool(self, event):
    192193        """
    193194        Select / enable tool available in tools list
     
    196197
    197198        if tool == "Digitize" and not self.mapdisplay.toolbars['vdigit']:
    198             self.mapdisplay.AddToolbar("digit")
     199            self.mapdisplay.AddToolbar("vdigit")
     200
     201        elif tool == "Nviz" and not self.mapdisplay.toolbars['nviz']:
     202            self.mapdisplay.AddToolbar("nviz")
     203
     204    def Enable2D(self, enabled):
     205        """Enable/Disable 2D display mode specific tools"""
     206        for tool in (self.pointer,
     207                     self.query,
     208                     self.pan,
     209                     self.zoomin,
     210                     self.zoomout,
     211                     self.zoomback,
     212                     self.zoommenu,
     213                     self.analyze,
     214                     self.dec,
     215                     self.savefile,
     216                     self.printmap):
     217            self.toolbar.EnableTool(tool, enabled)
    199218
    200219class GRToolbar(AbstractToolbar):
     
    526545
    527546        # disable the toolbar
    528         self.parent.RemoveToolbar ("digit")
     547        self.parent.RemoveToolbar ("vdigit")
    529548
    530549    def OnMoveVertex(self, event):
     
    9881007             self.parent.OnQuit),
    9891008            )
     1009
     1010class NvizToolbar(AbstractToolbar):
     1011    """
     1012    Nviz toolbar
     1013    """
     1014    def __init__(self, parent, map):
     1015        self.parent     = parent
     1016        self.mapcontent = map
     1017
     1018        self.toolbar = wx.ToolBar(parent=self.parent, id=wx.ID_ANY)
     1019
     1020        # self.SetToolBar(self.toolbar)
     1021        self.toolbar.SetToolBitmapSize(globalvar.toolbarSize)
     1022
     1023        self.InitToolbar(self.parent, self.toolbar, self.ToolbarData())
     1024
     1025        # realize the toolbar
     1026        self.toolbar.Realize()
     1027
     1028    def ToolbarData(self):
     1029        """Toolbar data"""
     1030
     1031        self.quit = wx.NewId()
     1032               
     1033        # tool, label, bitmap, kind, shortHelp, longHelp, handler
     1034        return   (
     1035            (self.quit, 'quit', Icons["quit"].GetBitmap(),
     1036             wx.ITEM_NORMAL, Icons["quit"].GetLabel(), Icons["quit"].GetDesc(),
     1037             self.OnExit),
     1038            )
     1039
     1040    def OnExit (self, event=None):
     1041        """Quit nviz tool (swith to 2D mode)"""
     1042
     1043        # disable the toolbar
     1044        self.parent.RemoveToolbar ("nviz")
     1045
  • grass/trunk/gui/wxpython/gui_modules/wxgui_utils.py

    r31701 r31935  
    215215            self.popupID9 = wx.NewId()
    216216            self.popupID10 = wx.NewId()
     217            self.popupID11 = wx.NewId() # nviz
    217218
    218219        self.popupMenu = wx.Menu()
     
    248249        except:
    249250            mltype = None
    250         # vector specific items
     251        #
     252        # vector layers (specific items)
     253        #
    251254        if mltype and mltype == "vector":
    252255            self.popupMenu.AppendSeparator()
     
    279282            self.Bind (wx.EVT_MENU, self.OnMetadata, id=self.popupID7)
    280283
    281 
    282         # raster
     284        #
     285        # raster layers (specific items)
     286        #
    283287        elif mltype and mltype == "raster":
    284288            self.popupMenu.AppendSeparator()
     
    289293            self.popupMenu.Append(self.popupID6, _("Metadata"))
    290294            self.Bind (wx.EVT_MENU, self.OnMetadata, id=self.popupID6)
     295            if self.mapdisplay.toolbars['nviz']:
     296                self.popupMenu.Append(self.popupID11, _("Nviz properties"))
     297                self.Bind (wx.EVT_MENU, self.OnNvizProperties, id=self.popupID11)
    291298
    292299        ## self.PopupMenu(self.popupMenu, pos)
     
    446453        self.RefreshSelected()
    447454        self.Refresh()
    448        
     455
     456    def OnNvizProperties(self, event):
     457        """Nviz-related properties (raster/vector/volume)
     458
     459        @todo vector/volume
     460        """
     461        import nviz
     462        dlg = nviz.RasterPropertiesDialog(parent=self,
     463                                          map=self.GetPyData(self.layer_selected)[0]['maplayer'].name)
     464        dlg.Show()
     465
    449466    def RenameLayer (self, event):
    450467        """Rename layer"""
     
    603620                                    'ctrl' : ctrlId,
    604621                                    'maplayer' : None,
     622                                    'nviz' : None,
    605623                                    'prowin' : None},
    606624                                   None))
     
    857875        except:
    858876            pass
     877
     878        # update nviz tools
     879        if self.mapdisplay.toolbars['nviz']:
     880            self.mapdisplay.nvizToolWin.UpdatePage('surface')
    859881
    860882    def OnCollapseNode(self, event):
  • grass/trunk/gui/wxpython/nviz/Makefile

    r31934 r31935  
    1 # MODULE_TOPDIR = ../../..
    2 MODULE_TOPDIR = $(HOME)/src/grass6_devel
     1MODULE_TOPDIR = ../../..
    32
    43include $(MODULE_TOPDIR)/include/Make/Lib.make
    5 
    6 # TODO
    7 NVIZLIB= -lgrass_nviz $(GISLIB)
    8 # NVIZDEP=$(ARCH_LIBDIR)/$(LIB_PREFIX)grass_nviz$(LIB_SUFFIX)
    94
    105LIB_NAME = grass6_wxnviz
  • grass/trunk/include/Make/Grass.make.in

    r31744 r31935  
    145145# NVIZ related
    146146OGSF_LIBNAME          = grass_ogsf
     147NVIZ_LIBNAME          = grass_nviz
    147148
    148149# triangulation libraries
     
    248249# NVIZ related
    249250OGSFLIB       = -l$(OGSF_LIBNAME) $(BITMAPLIB) $(G3DLIB) $(GISLIB) $(SITESLIB) $(VECTRLIB)
     251NVIZLIB       = -l$(NVIZ_LIBNAME) $(BITMAPLIB) $(G3DLIB) $(GISLIB) $(VECTRLIB)
    250252
    251253# triangulation libraries
     
    343345# NVIZ related
    344346OGSFDEP      = $(ARCH_LIBDIR)/$(LIB_PREFIX)$(OGSF_LIBNAME)$(LIB_SUFFIX)
     347NVIZDEP      = $(ARCH_LIBDIR)/$(LIB_PREFIX)$(NVIZ_LIBNAME)$(LIB_SUFFIX)
    345348
    346349# triangulation libraries
  • grass/trunk/lib/Makefile

    r31744 r31935  
    3939include $(MODULE_TOPDIR)/include/Make/Platform.make
    4040
    41 OPENGLBASED = ogsf
     41OPENGLBASED = \
     42        ogsf \
     43        nviz
    4244
    4345#compile if OPENGLBASED present:
  • grass/trunk/lib/nviz/Makefile

    r31934 r31935  
    1 #MODULE_TOPDIR = ../../..
    2 MODULE_TOPDIR = $(HOME)/src/grass6_devel
     1MODULE_TOPDIR = ../..
    32
    4 # LIB_NAME = $(NVIZ_LIBNAME)
    5 LIB_NAME = grass_nviz
     3LIB_NAME = $(NVIZ_LIBNAME)
    64
    7 DEPENDENCIES = $(VECTDEP) $(BITMAPDEP) $(LINKMDEP) $(FORMDEP) $(DBMIDEP) $(GISDEP) $(OGSFDEP)
     5DEPENDENCIES = $(BITMAPDEP) $(DBMIDEP) $(GISDEP) $(OGSFDEP) $(G3DDEP) $(VECTRDEP)
    86
    97EXTRA_INC = $(VECT_INC)
    108EXTRA_CFLAGS = $(INC) \
    119        $(TIFFINCPATH) $(DSPINC) \
    12         $(VECT_CFLAGS) $(OPENGLINC) 
     10        $(VECT_CFLAGS) $(OPENGLINC)
    1311EXTRA_LIBS = $(GISLIB) $(XLIBPATH) $(XMLIB) $(XTLIB) $(XLIB) $(XEXTRALIBS) $(OGSFLIB)
    1412
  • grass/trunk/visualization/Makefile

    r31326 r31935  
    1212endif
    1313
     14#compile if OpenGL present
     15ifneq ($(strip $(OPENGLLIB)),)
     16    SUBDIRS += nviz2
     17endif
     18
    1419#compile if Motif present:
    1520ifneq ($(strip $(XMLIB)),)
  • grass/trunk/visualization/nviz2/cmd/main.c

    r31934 r31935  
    285285    /* draw */
    286286    Nviz_draw_cplane(&data, -1, -1);
    287     Nviz_draw_all (&data);
     287    Nviz_draw_all (&data, 1); /* clear screen */
    288288
    289289    /* write to image */
Note: See TracChangeset for help on using the changeset viewer.