/[escript]/temp_trunk_copy/pyvisi/py_src/actor.py
ViewVC logotype

Diff of /temp_trunk_copy/pyvisi/py_src/actor.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 1153 by jongui, Thu May 17 06:33:54 2007 UTC
# Line 9  class Actor3D: Line 9  class Actor3D:
9      Class that defines a 3D actor.      Class that defines a 3D actor.
10      """      """
11            
12      def __init__(self, mapper):      def __init__(self):
13          """          """
14          Initialise the 3D actor.          Initialise the 3D actor.
15            """
16    
17            self.__vtk_actor3D = vtk.vtkActor()
18    
19        def _setupActor3D(self, mapper):
20            """
21            Setup the 3D actor.
22    
23          @type mapper: vtkDataSetMapper          @type mapper: vtkDataSetMapper
24          @param mapper: Mapped data          @param mapper: Mapped data
25          """          """
26    
27          self.__mapper = mapper          self.__mapper = mapper
         self.__vtk_actor3D = vtk.vtkActor()  
28          self.__setMapper()          self.__setMapper()
29            
30      def __setMapper(self):      def __setMapper(self):
31          """          """
32          Set the mapper of the 3D actor.          Set the mapper of the 3D actor.
# Line 60  class Actor3D: Line 66  class Actor3D:
66          # in order for the change of color to take effect.          # in order for the change of color to take effect.
67          self.__mapper.ScalarVisibilityOff()          self.__mapper.ScalarVisibilityOff()
68    
         # NOTE: Must be used after mapper.ScalarVisibilityOff()  
         # in order for the change of color to take effect.  
69          self.__vtk_actor3D.GetProperty().SetColor(color)          self.__vtk_actor3D.GetProperty().SetColor(color)
70    
71      def setRepresentationToWireframe(self):      def setRepresentationToWireframe(self):
# Line 100  class Actor2D: Line 104  class Actor2D:
104      Class that defines a 2D actor.      Class that defines a 2D actor.
105      """      """
106    
107      def __init__(self, mapper):      def __init__(self):
108          """          """
109          Initialise the 2D actor.          Initialise the 2D actor.
110            """
111    
112            self._vtk_actor2D = vtk.vtkActor2D()
113    
114        def _setupActor2D(self, mapper):
115            """
116            Setup the 2D actor.
117    
118          @type mapper: vtkMapper2D          @type mapper: vtkMapper2D
119          @param mapper: Mapped data          @param mapper: Mapped data
120          """          """
121    
122          self.__mapper = mapper          self.__mapper = mapper
         self._vtk_actor2D = vtk.vtkActor2D()  
123          self.__setMapper()          self.__setMapper()
124    
125      def __setMapper(self):      def __setMapper(self):

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

  ViewVC Help
Powered by ViewVC 1.1.26