Changeset 6113


Ignore:
Timestamp:
Jan 5, 2009, 2:42:37 PM (10 years ago)
Author:
steve
Message:

Added wireframe visualisation

Location:
anuga_core/source/anuga/visualiser
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/visualiser/realtime.py

    r4897 r6113  
    142142                self.sync_unpaused.wait()
    143143           
    144 
     144        return self.running
    145145
    146146    def evolveFinished(self):
  • anuga_core/source/anuga/visualiser/visualiser.py

    r4267 r6113  
    2020        self.height_offset = {}
    2121        self.height_opacity = {}
     22        self.height_wireframe = {}
    2223
    2324        # Structures for colouring quantities
     
    114115        pass
    115116
    116     def render_quantity_height(self, quantityName, zScale=1.0, offset=0.0, opacity=1.0, dynamic=True):
     117    def render_quantity_height(self, quantityName, zScale=1.0, offset=0.0, opacity=1.0, dynamic=True, wireframe=False):
    117118        """Instruct the visualiser to render a quantity using the
    118119        value at a point as its height.  The value at each point is
     
    126127        self.height_dynamic[quantityName] = dynamic
    127128        self.height_opacity[quantityName] = opacity
     129        self.height_wireframe[quantityName] = wireframe
    128130
    129131    def update_height_quantity(self, quantityName, dynamic=True):
     
    156158            actor = self.vtk_actors[quantityName] = vtkActor()
    157159            actor.GetProperty().SetOpacity(self.height_opacity[quantityName])
     160            if self.height_wireframe[quantityName]:
     161                actor.GetProperty().SetRepresentationToWireframe()
    158162            actor.SetMapper(mapper)
    159163            self.vtk_renderer.AddActor(actor)
Note: See TracChangeset for help on using the changeset viewer.