source: anuga_core/source/anuga/visualiser_new/features.py @ 4605

Last change on this file since 4605 was 4365, checked in by jack, 18 years ago

More work on the traited visualiser. Not working yet.

File size: 706 bytes
Line 
1from enthought.traits.api import Callable, Float, HasTraits, Instance, List, Range, Trait, true, Tuple
2from vtk import vtkActor
3
4class Feature(HasTraits):
5    colour = Trait((0.5, 0.5, 0.5),
6                   Tuple(Callable,
7                         Float,
8                         Float),
9                   Tuple(Range(0.0, 1.0),
10                         Range(0.0, 1.0),
11                         Range(0.0, 1.0)))
12    opacity = Range(0.0, 1.0, 1.0)
13    def __init__(self, *args, **kwargs):
14        self.actor = vtkActor()
15
16class HeightFeature(Feature):
17    z_scale = Range(0.0, None)
18    offset = Float
19    dynamic = true
20
21class PolygonFeature(Feature):
22    vertices = List(Tuple(Float, Float, Float))
Note: See TracBrowser for help on using the repository browser.