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

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

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

revision 1158 by jongui, Tue May 22 04:24:01 2007 UTC revision 1199 by jongui, Wed Jun 20 05:01:30 2007 UTC
# Line 1  Line 1 
1  """  """
2  @author: John NGUI  @var __author__: name of author
3    @var __copyright__: copyrights
4    @var __license__: licence agreement
5    @var __url__: url entry point on documentation
6    @var __version__: version
7    @var __date__: date of the version
8  """  """
9    
10    __author__="John Ngui, john.ngui@uq.edu.au"
11    __copyright__="""  Copyright (c) 2006 by ACcESS MNRF
12                        http://www.access.edu.au
13                    Primary Business: Queensland, Australia"""
14    __license__="""Licensed under the Open Software License version 3.0
15                 http://www.opensource.org/licenses/osl-3.0.php"""
16    __url__="http://www.iservo.edu.au/esys"
17    __version__="$Revision$"
18    __date__="$Date$"
19    
20    
21  import vtk  import vtk
22  from mapper import DataSetMapper  from mapper import DataSetMapper
23  from lookuptable import LookupTable  from lookuptable import LookupTable
# Line 38  class StreamLine(DataSetMapper, Actor3D, Line 54  class StreamLine(DataSetMapper, Actor3D,
54          source is cell data, a conversion to point data may or may not be          source is cell data, a conversion to point data may or may not be
55          required, in order for the object to be rendered correctly.          required, in order for the object to be rendered correctly.
56          If a conversion is needed, the 'cell_to_point' flag must be set to          If a conversion is needed, the 'cell_to_point' flag must be set to
57          'True', otherwise 'False' (which is the default).          'True', otherwise 'False' (which is the default). On occasions, an
58            inaccurate object may be rendered from cell data even after conversion.
59    
60          @type scene: L{Scene <scene.Scene>} object          @type scene: L{Scene <scene.Scene>} object
61          @param scene: Scene in which objects are to be rendered on          @param scene: Scene in which objects are to be rendered on
# Line 158  class StreamLine(DataSetMapper, Actor3D, Line 175  class StreamLine(DataSetMapper, Actor3D,
175              if(self.__color_mode == ColorMode.VECTOR):                            if(self.__color_mode == ColorMode.VECTOR):              
176                  self._setScalarVisibilityOn()                  self._setScalarVisibilityOn()
177                  self._setSpeedScalarsOn()                  self._setSpeedScalarsOn()
178                  self._setScalarRange(self.__data_collector._getVectorRange())  
179                    # self._isScalarRangeSet checks whether the scalar range has
180                    # beenspecified by the user. If it has, then the scalar range
181                    # read from the source will be ignored.
182                    if(not(self._isScalarRangeSet())):
183                        self._setScalarRange(\
184                                self.__data_collector._getVectorRange())
185              # Color streamline by scalar.              # Color streamline by scalar.
186              elif(self.__color_mode == ColorMode.SCALAR):                              elif(self.__color_mode == ColorMode.SCALAR):                
187                  self._setScalarVisibilityOn()                  self._setScalarVisibilityOn()
188                  self._setSpeedScalarsOff()                  self._setSpeedScalarsOff()
189                  self._setScalarRange(self.__data_collector._getScalarRange())  
190                    # self._isScalarRangeSet checks whether the scalar range has
191                    # beenspecified by the user. If it has, then the scalar range
192                    # read from the source will be ignored.
193                    if(not(self._isScalarRangeSet())):
194                        self._setScalarRange(\
195                                self.__data_collector._getScalarRange())
196    
197              self.__modified = False              self.__modified = False
198    

Legend:
Removed from v.1158  
changed lines
  Added in v.1199

  ViewVC Help
Powered by ViewVC 1.1.26