Changeset 4365
- Timestamp:
- Apr 11, 2007, 5:54:03 AM (18 years ago)
- Location:
- anuga_core/source/anuga/visualiser_new
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/visualiser_new/features.py
r4354 r4365 1 from enthought.traits.api import Callable, Float, HasTraits, Instance, Range, Trait, true, Tuple1 from enthought.traits.api import Callable, Float, HasTraits, Instance, List, Range, Trait, true, Tuple 2 2 from vtk import vtkActor 3 3 … … 11 11 Range(0.0, 1.0))) 12 12 opacity = Range(0.0, 1.0, 1.0) 13 actor = Instance(vtkActor, ()) 13 def __init__(self, *args, **kwargs): 14 self.actor = vtkActor() 14 15 15 16 class HeightFeature(Feature): -
anuga_core/source/anuga/visualiser_new/visualiser.py
r4354 r4365 1 1 from axes import Axes 2 from enthought.traits.api import false, HasTraits, Instance, List2 from enthought.traits.api import Any, false, HasTraits, Instance, List 3 3 from features import Feature 4 4 from threading import Thread 5 5 from Tkinter import Tk, Button, Frame, N, E, S, W 6 from vtk import vtkCellArray 6 7 from vtk.tk.vtkTkRenderWidget import vtkTkRenderWidget 7 8 … … 16 17 HasTraits.__init__(self, *args, **kwargs) 17 18 Thread.__init__(self) 19 self.vtk_cells = vtkCellArray() 18 20 19 21 def run(self): 22 self.setup_grid() 20 23 self.setup_gui() 21 24 self.tk_root.mainloop() 25 26 def setup_grid(self): 27 '''Populate the vtkCellArray instance at 28 self.vtk_cells. Subclasses are required to override this 29 function to read from their source as appropriate. 30 ''' 31 raise NotImplementedError 22 32 23 33 def setup_gui(self):
Note: See TracChangeset
for help on using the changeset viewer.