/[escript]/trunk/pyvisi/py_src/map.py
ViewVC logotype

Diff of /trunk/pyvisi/py_src/map.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 822 by jongui, Tue Aug 29 01:39:27 2006 UTC revision 835 by jongui, Mon Sep 4 22:20:28 2006 UTC
# Line 1  Line 1 
1  """  """
2  class that shows scalar data by color on the domain surface  Class that shows a scalar field by a surface map.
   
 @var __author__: name of author  
 @var __license__: licence agreement  
 @var __copyright__: copyrights  
 @var __url__: url entry point on documentation  
 @var __version__: version  
 @var __date__: date of the version  
3  """  """
 __copyright__="""  Copyright (c) 2006 by ACcESS MNRF  
                     http://www.access.edu.au  
                 Primary Business: Queensland, Australia"""  
 __license__="""Licensed under the Open Software License version 3.0  
              http://www.opensource.org/licenses/osl-3.0.php"""  
 __author__="Paul Cochrane, L. Gross"  
 __url__="http://www.iservo.edu.au/esys"  
 __version__="$Revision:$"  
 __date__="$Date:$"  
4    
5  import vtk  import vtk
6    from common import *
7    
8  class Map:  class Map(Common):
9        """
10      def __init__(self, scene, data_collector):      @author: John Ngui
11          self.scene = scene      @author: Lutz Gross
12          self.data_collector = data_collector      """
13          self.vtk_xml_mapper = None  
14          self.vtk_xml_actor = None      def __init__(self, open_scene, data_collector):
15            """
16          self.setMapper()          @type open_scene: L{OpenScene <openscene.OpenScene>} object
17          self.setActor()          @param open_scene: Scene in which components are to be added to
18            @type data_collector: L{DataCollector <datacollector.DataCollector>}
19      def setMapper(self):              object
20          self.vtk_xml_mapper = vtk.vtkDataSetMapper()          @param data_collector: Source of data for visualization
21          self.vtk_xml_mapper.SetInput(          """
22              self.data_collector.getReader().GetOutput())  
23                Common.__init__(self, open_scene, data_collector)
24      def setActor(self):          Common.setMapper(self, "self.data_collector.getReader().GetOutput()")
25          self.vtk_xml_actor = vtk.vtkActor()          Common.setActor(self)
26          self.vtk_xml_actor.SetMapper(self.vtk_xml_mapper)          Common.addActor(self)
   
         self.scene.getRenderer().AddActor(self.vtk_xml_actor)  
   
       
27    
28  """  """
29  class MapOnPlane():  class MapOnPlane():

Legend:
Removed from v.822  
changed lines
  Added in v.835

  ViewVC Help
Powered by ViewVC 1.1.26