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

Diff of /trunk/pyvisi/py_src/contour.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 19  class Contour(DataSetMapper, Actor3D, Co Line 19  class Contour(DataSetMapper, Actor3D, Co
19    
20      # 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.
21      # 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.
22      # If no scalar field is specified, the first encountered in the file will      # If no lut is specified, the color scheme will be used.
23      # be loaded automatically. If no lut is specified, the color scheme will      def __init__(self, scene, data_collector, viewport = Viewport.SOUTH_WEST,
24      # be used.              lut = Lut.COLOR, outline = True):
     def __init__(self, scene, data_collector, scalar = None,  
             viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, outline = True):  
25          """          """
26          @type scene: L{Scene <scene.Scene>} object          @type scene: L{Scene <scene.Scene>} object
27          @param scene: Scene in which objects are to be rendered on          @param scene: Scene in which objects are to be rendered on
28          @type data_collector: L{DataCollector <datacollector.DataCollector>}          @type data_collector: L{DataCollector <datacollector.DataCollector>}
29                  object                  object
30          @param data_collector: Deal with source of data for visualisation          @param data_collector: Deal with source of data for visualisation
         @type scalar: String  
         @param scalar: Scalar field to load from the source file  
31          @type viewport: L{Viewport <constant.Viewport>} constant            @type viewport: L{Viewport <constant.Viewport>} constant  
32          @param viewport: Viewport in which objects are to be rendered on          @param viewport: Viewport in which objects are to be rendered on
33          @type lut : L{Lut <constant.Lut>} constant          @type lut : L{Lut <constant.Lut>} constant
# Line 65  class Contour(DataSetMapper, Actor3D, Co Line 61  class Contour(DataSetMapper, Actor3D, Co
61    
62          # ----- Contour -----          # ----- Contour -----
63    
         #if(scalar != None): # True only if a scalar field was specified.  
         #   pass  
             #data_collector._setActiveScalar(scalar)  
   
         lookup_table = LookupTable()  
   
64          # NOTE: Lookup table color mapping (color or grey scale) MUST be set          # NOTE: Lookup table color mapping (color or grey scale) MUST be set
65          # before DataSetMapper. If it is done after DataSetMapper, no effect          # before DataSetMapper. If it is done after DataSetMapper, no effect
66          # will take place.          # will take place.
# Line 114  class ContourOnPlaneCut(DataSetMapper, A Line 104  class ContourOnPlaneCut(DataSetMapper, A
104            
105      # 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.
106      # 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.
107      # If no scalar field is specified, the first encountered in the file will      # If no lut is specified, the color scheme will be used.
108      # be loaded automatically. If no lut is specified, the color scheme will      def __init__(self, scene, data_collector, viewport = Viewport.SOUTH_WEST,
109      # be used.              lut = Lut.COLOR, outline = True):
     def __init__(self, scene, data_collector, scalar = None,  
             viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, outline = True):  
110    
111          """          """
112          @type scene: L{Scene <scene.Scene>} object          @type scene: L{Scene <scene.Scene>} object
# Line 126  class ContourOnPlaneCut(DataSetMapper, A Line 114  class ContourOnPlaneCut(DataSetMapper, A
114          @type data_collector: L{DataCollector <datacollector.DataCollector>}          @type data_collector: L{DataCollector <datacollector.DataCollector>}
115                  object                  object
116          @param data_collector: Deal with source of data for visualisation          @param data_collector: Deal with source of data for visualisation
         @type scalar: String  
         @param scalar: Scalar field to load from the source file  
117          @type viewport: L{Viewport <constant.Viewport>} constant          @type viewport: L{Viewport <constant.Viewport>} constant
118          @param viewport: Viewport in which objects are to be rendered on          @param viewport: Viewport in which objects are to be rendered on
119          @type lut : L{Lut <constant.Lut>} constant          @type lut : L{Lut <constant.Lut>} constant
# Line 161  class ContourOnPlaneCut(DataSetMapper, A Line 147  class ContourOnPlaneCut(DataSetMapper, A
147    
148          # ----- Contour on a cut plane -----          # ----- Contour on a cut plane -----
149    
         #if(scalar != None):  
         #   data_collector._setActiveScalar(scalar)  
   
150          # NOTE: Lookup table color mapping (color or grey scale) MUST be set          # NOTE: Lookup table color mapping (color or grey scale) MUST be set
151          # before DataSetMapper. If it is done after DataSetMapper, no effect          # before DataSetMapper. If it is done after DataSetMapper, no effect
152          # will take place.          # will take place.
# Line 210  class ContourOnPlaneClip(DataSetMapper, Line 193  class ContourOnPlaneClip(DataSetMapper,
193            
194      # 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.
195      # 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.
196      # If no scalar field is specified, the first encountered in the file will      # If no lut is specified, the color scheme will be used.
197      # be loaded automatically. If no lut is specified, the color scheme will      def __init__(self, scene, data_collector, viewport = Viewport.SOUTH_WEST,
198      # be used.              lut = Lut.COLOR, outline = True):
     def __init__(self, scene, data_collector, scalar = None,  
             viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, outline = True):  
199    
200          """          """
201          @type scene: L{Scene <scene.Scene>} object          @type scene: L{Scene <scene.Scene>} object
# Line 222  class ContourOnPlaneClip(DataSetMapper, Line 203  class ContourOnPlaneClip(DataSetMapper,
203          @type data_collector: L{DataCollector <datacollector.DataCollector>}          @type data_collector: L{DataCollector <datacollector.DataCollector>}
204                  object                  object
205          @param data_collector: Deal with source of data for visualisation          @param data_collector: Deal with source of data for visualisation
         @type scalar: String  
         @param scalar: Scalar field to load from the source file  
206          @type viewport: L{Viewport <constant.Viewport>} constant          @type viewport: L{Viewport <constant.Viewport>} constant
207          @param viewport: Viewport in which objects are to be rendered on          @param viewport: Viewport in which objects are to be rendered on
208          @type lut : L{Lut <constant.Lut>} constant          @type lut : L{Lut <constant.Lut>} constant
# Line 257  class ContourOnPlaneClip(DataSetMapper, Line 236  class ContourOnPlaneClip(DataSetMapper,
236    
237          # ----- Contour on a clipped plane -----          # ----- Contour on a clipped plane -----
238    
         #if(scalar != None):  
         #   data_collector._setActiveScalar(scalar)  
   
239          # NOTE: Lookup table color mapping (color or grey scale) MUST be set          # NOTE: Lookup table color mapping (color or grey scale) MUST be set
240          # before DataSetMapper. If it is done after DataSetMapper, no effect          # before DataSetMapper. If it is done after DataSetMapper, no effect
241          # 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