/[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 1148 by jongui, Wed May 16 22:45:33 2007 UTC revision 1158 by jongui, Tue May 22 04:24:01 2007 UTC
# Line 49  class Contour(DataSetMapper, Actor3D, Co Line 49  class Contour(DataSetMapper, Actor3D, Co
49          @param outline: Places an outline around the domain surface          @param outline: Places an outline around the domain surface
50          """          """
51    
         self.__scene = scene  
52          self.__data_collector = data_collector          self.__data_collector = data_collector
53          self.__viewport = viewport          self.__viewport = viewport
54          self.__lut = lut          self.__lut = lut
# Line 78  class Contour(DataSetMapper, Actor3D, Co Line 77  class Contour(DataSetMapper, Actor3D, Co
77    
78              # Default line width is 1.              # Default line width is 1.
79              actor3D._setLineWidth(1)              actor3D._setLineWidth(1)
80              self.__scene._addActor3D(self.__viewport, actor3D._getActor3D())              scene._addActor3D(self.__viewport, actor3D._getActor3D())
81    
82          # ----- Contour -----          # ----- Contour -----
83    
# Line 104  class Contour(DataSetMapper, Actor3D, Co Line 103  class Contour(DataSetMapper, Actor3D, Co
103                  lookup_table._getLookupTable())                  lookup_table._getLookupTable())
104    
105          self._setupActor3D(self._getDataSetMapper())          self._setupActor3D(self._getDataSetMapper())
106          self.__scene._addActor3D(self.__viewport, self._getActor3D())          scene._addActor3D(self.__viewport, self._getActor3D())
107            
108      def _isModified(self):        def _isModified(self):  
109          """          """
# Line 116  class Contour(DataSetMapper, Actor3D, Co Line 115  class Contour(DataSetMapper, Actor3D, Co
115    
116          return self.__modified or self.__data_collector._isModified()          return self.__modified or self.__data_collector._isModified()
117    
118      def _render(self):      def _render(self, scene):
119          """          """
120          Render the contour.          Render the contour.
121    
122            @type scene: L{Scene <scene.Scene>} object
123            @param scene: Scene in which objects are to be rendered on
124          """          """
125    
126          if (self._isModified() == True):          if (self._isModified() == True):
# Line 191  class ContourOnPlaneCut(DataSetMapper, A Line 193  class ContourOnPlaneCut(DataSetMapper, A
193          @param outline: Places an outline around the domain surface          @param outline: Places an outline around the domain surface
194          """          """
195    
         self.__scene = scene  
196          self.__data_collector = data_collector          self.__data_collector = data_collector
197          self.__viewport = viewport          self.__viewport = viewport
198          self.__lut = lut          self.__lut = lut
# Line 224  class ContourOnPlaneCut(DataSetMapper, A Line 225  class ContourOnPlaneCut(DataSetMapper, A
225    
226              # Default line width is 1.              # Default line width is 1.
227              actor3D._setLineWidth(1)              actor3D._setLineWidth(1)
228              self.__scene._addActor3D(self.__viewport, actor3D._getActor3D())              scene._addActor3D(self.__viewport, actor3D._getActor3D())
229    
230          # ----- Contour on a cut plane -----          # ----- Contour on a cut plane -----
231    
# Line 252  class ContourOnPlaneCut(DataSetMapper, A Line 253  class ContourOnPlaneCut(DataSetMapper, A
253                  lookup_table._getLookupTable())                  lookup_table._getLookupTable())
254    
255          self._setupActor3D(self._getDataSetMapper())          self._setupActor3D(self._getDataSetMapper())
256          self.__scene._addActor3D(self.__viewport, self._getActor3D())          scene._addActor3D(self.__viewport, self._getActor3D())
257            
258      def _isModified(self):        def _isModified(self):  
259          """          """
# Line 264  class ContourOnPlaneCut(DataSetMapper, A Line 265  class ContourOnPlaneCut(DataSetMapper, A
265    
266          return self.__modified or self.__data_collector._isModified()          return self.__modified or self.__data_collector._isModified()
267    
268      def _render(self):      def _render(self, scene):
269          """          """
270          Render the contour cut using a plane.          Render the contour cut using a plane.
271    
272            @type scene: L{Scene <scene.Scene>} object
273            @param scene: Scene in which objects are to be rendered on
274          """          """
275    
276          if (self._isModified() == True):          if (self._isModified() == True):
# Line 338  class ContourOnPlaneClip(DataSetMapper, Line 342  class ContourOnPlaneClip(DataSetMapper,
342          @param outline: Places an outline around the domain surface          @param outline: Places an outline around the domain surface
343          """          """
344    
         self.__scene = scene  
345          self.__data_collector = data_collector          self.__data_collector = data_collector
346          self.__viewport = viewport          self.__viewport = viewport
347          self.__lut = lut          self.__lut = lut
# Line 371  class ContourOnPlaneClip(DataSetMapper, Line 374  class ContourOnPlaneClip(DataSetMapper,
374    
375              # Default line width is 1.              # Default line width is 1.
376              actor3D._setLineWidth(1)              actor3D._setLineWidth(1)
377              self.__scene._addActor3D(self.__viewport, actor3D._getActor3D())              scene._addActor3D(self.__viewport, actor3D._getActor3D())
378    
379          # ----- Contour on a clipped plane -----          # ----- Contour on a clipped plane -----
380    
# Line 402  class ContourOnPlaneClip(DataSetMapper, Line 405  class ContourOnPlaneClip(DataSetMapper,
405                  lookup_table._getLookupTable())                  lookup_table._getLookupTable())
406    
407          self._setupActor3D(self._getDataSetMapper())          self._setupActor3D(self._getDataSetMapper())
408          self.__scene._addActor3D(self.__viewport, self._getActor3D())          scene._addActor3D(self.__viewport, self._getActor3D())
409            
410      def _isModified(self):        def _isModified(self):  
411          """          """
412          Return whether the ContourOnPlaneClip or DataCollector has been modified.          Return whether the ContourOnPlaneClip or DataCollector has been
413            modified.
414    
415          @rtype: Boolean          @rtype: Boolean
416          @return: True or False          @return: True or False
# Line 414  class ContourOnPlaneClip(DataSetMapper, Line 418  class ContourOnPlaneClip(DataSetMapper,
418    
419          return self.__modified or self.__data_collector._isModified()          return self.__modified or self.__data_collector._isModified()
420    
421      def _render(self):      def _render(self, scene):
422          """          """
423          Render the contour clip using a plane.          Render the contour clip using a plane.
424    
425            @type scene: L{Scene <scene.Scene>} object
426            @param scene: Scene in which objects are to be rendered on
427          """          """
428    
429          if (self._isModified() == True):          if (self._isModified() == True):

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

  ViewVC Help
Powered by ViewVC 1.1.26