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

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

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

revision 995 by jongui, Fri Feb 23 07:00:54 2007 UTC revision 996 by jongui, Mon Feb 26 03:43:13 2007 UTC
# Line 23  class Velocity(DataSetMapper, Actor3D, A Line 23  class Velocity(DataSetMapper, Actor3D, A
23            
24      # The SOUTH_WEST default viewport is used when there is only one viewport.      # The SOUTH_WEST default viewport is used when there is only one viewport.
25      # This saves the user from specifying the viewport when there is only one.      # This saves the user from specifying the viewport when there is only one.
26      # If no vector field is specified, the first encountered in the file will      # If no lut is specified, the color scheme will be used.
27      # be loaded automatically. If no lut is specified, the color scheme will      def __init__(self, scene, data_collector, arrow = Arrow.TWO_D,
28      # be used.              color_mode = ColorMode.VECTOR, viewport = Viewport.SOUTH_WEST,
29      def __init__(self, scene, data_collector, vector = None, scalar = None,              lut = Lut.COLOR, outline = True):
             arrow = Arrow.TWO_D, color_mode = ColorMode.VECTOR,  
             viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, outline = True):  
   
30          """          """
31          @type scene: L{Scene <scene.Scene>} object          @type scene: L{Scene <scene.Scene>} object
32          @param scene: Scene in which objects are to be rendered on          @param scene: Scene in which objects are to be rendered on
33          @type data_collector: L{DataCollector <datacollector.DataCollector>}          @type data_collector: L{DataCollector <datacollector.DataCollector>}
34                  object                  object
35          @param data_collector: Deal with source of data for visualisation          @param data_collector: Deal with source of data for visualisation
         @type vector: String  
         @param vector: Vector field to load from the source file  
         @type scalar: String  
         @param scalar: Scalar field to load from the source file  
36          @type arrow: L{Arrow <constant.Arrow>} constant          @type arrow: L{Arrow <constant.Arrow>} constant
37          @param arrow: Type of arrow (two dimensional or three dimensional)          @param arrow: Type of arrow (two dimensional or three dimensional)
38          @type color_mode: L{ColorMode <constant.ColorMode>} constant          @type color_mode: L{ColorMode <constant.ColorMode>} constant
# Line 77  class Velocity(DataSetMapper, Actor3D, A Line 70  class Velocity(DataSetMapper, Actor3D, A
70    
71          # ----- Velocity -----          # ----- Velocity -----
72    
         # NOTE: Two 'ifs' were used instead of an if-elif because an active  
         # scalar and an active vector attribute may be specified at the same  
         # time. One may be for the color mode and the other for the  
         # scaling mode.  
         #if(vector != None):  
         #   data_collector._setActiveVector(vector)  
         #if(scalar != None):  
         #   data_collector._setActiveScalar(scalar)  
   
73          # NOTE: Lookup table color mapping (color or grey scale) MUST be set          # NOTE: Lookup table color mapping (color or grey scale) MUST be set
74          # before DataSetMapper. If it is done after DataSetMapper, no effect          # before DataSetMapper. If it is done after DataSetMapper, no effect
75          # will take place.          # will take place.
# Line 145  class VelocityOnPlaneCut(DataSetMapper, Line 129  class VelocityOnPlaneCut(DataSetMapper,
129            
130      # The SOUTH_WEST default viewport is used when there is only one viewport.      # The SOUTH_WEST default viewport is used when there is only one viewport.
131      # This saves the user from specifying the viewport when there is only one.      # This saves the user from specifying the viewport when there is only one.
132      # If no vector field is specified, the first encountered in the file will      # If no lut is specified, the color scheme willbe used.
133      # be loaded automatically.  If no lut is specified, the color scheme will      def __init__(self, scene, data_collector, arrow = Arrow.TWO_D,
134      # be used.              color_mode = ColorMode.VECTOR, viewport = Viewport.SOUTH_WEST,
135      def __init__(self, scene, data_collector, vector = None, scalar = None,              lut = Lut.COLOR, outline = True):
             arrow = Arrow.TWO_D, color_mode = ColorMode.VECTOR,  
             viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, outline = True):  
136          """          """
137          @type scene: L{Scene <scene.Scene>} object          @type scene: L{Scene <scene.Scene>} object
138          @param scene: Scene in which objects are to be rendered on          @param scene: Scene in which objects are to be rendered on
139          @type data_collector: L{DataCollector <datacollector.DataCollector>}          @type data_collector: L{DataCollector <datacollector.DataCollector>}
140                  object                  object
141          @param data_collector: Deal with source of data for visualisation          @param data_collector: Deal with source of data for visualisation
         @type vector: String  
         @param vector: Vector field to load from the source file  
         @type scalar: String  
         @param scalar: Scalar field to load from the source file  
142          @type arrow: L{Arrow <constant.Arrow>} constant          @type arrow: L{Arrow <constant.Arrow>} constant
143          @param arrow: Type of arrow (two dimensional or three dimensional)          @param arrow: Type of arrow (two dimensional or three dimensional)
144          @type color_mode: L{ColorMode <constant.ColorMode>} constant          @type color_mode: L{ColorMode <constant.ColorMode>} constant
# Line 198  class VelocityOnPlaneCut(DataSetMapper, Line 176  class VelocityOnPlaneCut(DataSetMapper,
176    
177          # ----- Velocity on a cut plane -----          # ----- Velocity on a cut plane -----
178    
         # NOTE: Two 'ifs' were used instead of an if-elif because an active  
         # scalar and an active vector attribute may be specified at the same  
         # time. One may be for the color mode and the other for the  
         # scaling mode.  
         #if(vector != None):  
         #   data_collector._setActiveVector(vector)  
         #if(scalar != None):  
         #   data_collector._setActiveScalar(scalar)  
   
179          # NOTE: Lookup table color mapping (color or grey scale) MUST be set          # NOTE: Lookup table color mapping (color or grey scale) MUST be set
180          # before DataSetMapper. If it is done after DataSetMapper, no effect          # before DataSetMapper. If it is done after DataSetMapper, no effect
181          # will take place.          # will take place.
# Line 270  class VelocityOnPlaneClip(DataSetMapper, Line 239  class VelocityOnPlaneClip(DataSetMapper,
239            
240      # The SOUTH_WEST default viewport is used when there is only one viewport.      # The SOUTH_WEST default viewport is used when there is only one viewport.
241      # This saves the user from specifying the viewport when there is only one.      # This saves the user from specifying the viewport when there is only one.
242      # If no vector field is specified, the first encountered in the file will      # If no lut is specified, the color scheme will be used.
243      # be loaded automatically.  If no lut is specified, the color scheme will      def __init__(self, scene, data_collector, arrow = Arrow.TWO_D,
244      # be used.              color_mode = ColorMode.VECTOR, viewport = Viewport.SOUTH_WEST,
245      def __init__(self, scene, data_collector, vector = None, scalar = None,              lut = Lut.COLOR, outline = True):
             arrow = Arrow.TWO_D, color_mode = ColorMode.VECTOR,  
             viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, outline = True):  
246          """          """
247          @type scene: L{Scene <scene.Scene>} object          @type scene: L{Scene <scene.Scene>} object
248          @param scene: Scene in which objects are to be rendered on          @param scene: Scene in which objects are to be rendered on
249          @type data_collector: L{DataCollector <datacollector.DataCollector>}          @type data_collector: L{DataCollector <datacollector.DataCollector>}
250                  object                  object
251          @param data_collector: Deal with source of data for visualisation          @param data_collector: Deal with source of data for visualisation
         @type vector: String  
         @param vector: Vector field to load from the source file  
         @type scalar: String  
         @param scalar: Scalar field to load from the source file  
252          @type arrow: L{Arrow <constant.Arrow>} constant          @type arrow: L{Arrow <constant.Arrow>} constant
253          @param arrow: Type of arrow (two dimensional or three dimensional)          @param arrow: Type of arrow (two dimensional or three dimensional)
254          @type color_mode: L{ColorMode <constant.ColorMode>} constant          @type color_mode: L{ColorMode <constant.ColorMode>} constant
# Line 323  class VelocityOnPlaneClip(DataSetMapper, Line 286  class VelocityOnPlaneClip(DataSetMapper,
286    
287          # ----- Velocity on a clipped plane -----          # ----- Velocity on a clipped plane -----
288    
         # NOTE: Two 'ifs' were used instead of an if-elif because an active  
         # scalar and an active vector attribute may be specified at the same  
         # time. One may be for the color mode and the other for the  
         # scaling mode.  
         #if(vector != None):  
         #   data_collector._setActiveVector(vector)  
         #if(scalar != None):  
         #   data_collector._setActiveScalar(scalar)  
   
289          # NOTE: Lookup table color mapping (color or grey scale) MUST be set          # NOTE: Lookup table color mapping (color or grey scale) MUST be set
290          # before DataSetMapper. If it is done after DataSetMapper, no effect          # before DataSetMapper. If it is done after DataSetMapper, no effect
291          # will take place.          # will take place.

Legend:
Removed from v.995  
changed lines
  Added in v.996

  ViewVC Help
Powered by ViewVC 1.1.26