Changeset 4365


Ignore:
Timestamp:
Apr 11, 2007, 5:54:03 AM (18 years ago)
Author:
jack
Message:

More work on the traited visualiser. Not working yet.

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, Tuple
     1from enthought.traits.api import Callable, Float, HasTraits, Instance, List, Range, Trait, true, Tuple
    22from vtk import vtkActor
    33
     
    1111                         Range(0.0, 1.0)))
    1212    opacity = Range(0.0, 1.0, 1.0)
    13     actor = Instance(vtkActor, ())
     13    def __init__(self, *args, **kwargs):
     14        self.actor = vtkActor()
    1415
    1516class HeightFeature(Feature):
  • anuga_core/source/anuga/visualiser_new/visualiser.py

    r4354 r4365  
    11from axes import Axes
    2 from enthought.traits.api import false, HasTraits, Instance, List
     2from enthought.traits.api import Any, false, HasTraits, Instance, List
    33from features import Feature
    44from threading import Thread
    55from Tkinter import Tk, Button, Frame, N, E, S, W
     6from vtk import vtkCellArray
    67from vtk.tk.vtkTkRenderWidget import vtkTkRenderWidget
    78
     
    1617        HasTraits.__init__(self, *args, **kwargs)
    1718        Thread.__init__(self)
     19        self.vtk_cells = vtkCellArray()
    1820
    1921    def run(self):
     22        self.setup_grid()
    2023        self.setup_gui()
    2124        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
    2232
    2333    def setup_gui(self):
Note: See TracChangeset for help on using the changeset viewer.