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

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

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

revision 1147 by ksteube, Wed May 16 06:39:11 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    
23  class Glyph3D:  class Glyph3D:
# Line 9  class Glyph3D: Line 25  class Glyph3D:
25      Class that defines 3D glyphs.      Class that defines 3D glyphs.
26      """      """
27    
28      def __init__(self, object, source):      def __init__(self):
29          """          """
30          Initialise the 3D glyph.          Initialise the 3D glyph.
31            """
32    
33            self.__vtk_glyph3D = vtk.vtkGlyph3D()
34    
35        def _setupGlyph3D(self, object, source):
36            """
37            Setup the 3D glyph.
38    
39          @type object: vtkDataSet, etc          @type object: vtkDataSet, etc
40          @param object: Input for the 3D glyph          @param object: Input for the 3D glyph
# Line 21  class Glyph3D: Line 44  class Glyph3D:
44    
45          self.__object = object          self.__object = object
46          self.__source = source          self.__source = source
         self.__vtk_glyph3D = vtk.vtkGlyph3D()  
           
         self.__setupGlyph3D()  
   
     def __setupGlyph3D(self):  
         """  
         Setup the 3D glyph.  
         """  
47    
48          self.__setInput()          self.__setInput()
49          self.__setSource()          self.__setSource()
# Line 129  class Glyph3D: Line 144  class Glyph3D:
144    
145          self.__vtk_glyph3D.SetRange(range)          self.__vtk_glyph3D.SetRange(range)
146    
147      def _getGlyph3D(self):      def _getGlyph3DOutput(self):
         """  
         Return the 3D glyph.  
   
         @rtype: vtkGlyph3D  
         @return: 3D glyph  
         """  
   
         return self.__vtk_glyph3D  
   
     def _getOutput(self):  
148          """          """
149          Return the output of the 3D glyph.          Return the output of the 3D glyph.
150    
# Line 158  class TensorGlyph: Line 163  class TensorGlyph:
163      Class that defines tensor glyphs.      Class that defines tensor glyphs.
164      """      """
165    
166      def __init__(self, object, source):      def __init__(self):
167          """          """
168          Initialise the tensor glyph.          Initialise the tensor glyph.
169            """
170    
171            self.__vtk_tensor_glyph = vtk.vtkTensorGlyph()
172    
173        def _setupTensorGlyph(self, object, source):
174            """
175            Setup the tensor glyph.
176    
177          @type object: vtkDataSet, etc          @type object: vtkDataSet, etc
178          @param object: Input for the 3D glyph          @param object: Input for the 3D glyph
# Line 170  class TensorGlyph: Line 182  class TensorGlyph:
182    
183          self.__object = object          self.__object = object
184          self.__source = source          self.__source = source
         self.__vtk_tensor_glyph = vtk.vtkTensorGlyph()  
   
         self.__setupTensorGlyph()  
   
     def __setupTensorGlyph(self):  
         """  
         Setup the tensor glyph.  
         """  
185    
186          self.__setInput()          self.__setInput()
187          self.__setSource()          self.__setSource()
188          self.__vtk_tensor_glyph.ClampScalingOn()          self.__vtk_tensor_glyph.ClampScalingOn()
189    
   
190      def __setInput(self):      def __setInput(self):
191          """          """
192          Set the input for the tensor glyph.          Set the input for the tensor glyph.
# Line 218  class TensorGlyph: Line 221  class TensorGlyph:
221    
222          self.__vtk_tensor_glyph.SetMaxScaleFactor(max_scale_factor)          self.__vtk_tensor_glyph.SetMaxScaleFactor(max_scale_factor)
223    
224      def _getOutput(self):      def _getTensorGlyphOutput(self):
225          """          """
226          Return the output of the tensor glyph.          Return the output of the tensor glyph.
227    

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

  ViewVC Help
Powered by ViewVC 1.1.26