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

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

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

revision 1028 by jongui, Thu Mar 1 04:57:31 2007 UTC revision 1029 by jongui, Wed Mar 14 05:01:13 2007 UTC
# Line 80  class PlaneSource: Line 80  class PlaneSource:
80    
81      def __init__(self):      def __init__(self):
82          """          """
83          Initialise the plane source.          Initialise the plane source. A plane source is defined by an origin
84            and two other points, which form the axes.
85          """          """
86    
87          self.__vtk_plane_source = vtk.vtkPlaneSource()          self.__vtk_plane_source = vtk.vtkPlaneSource()
88                self.__setOrigin(GlobalPosition(0, 0, 0))
89            self.setPoint1(GlobalPosition(1, 0, 0))
90            self.setPoint2(GlobalPosition(0, 1, 0))
91    
92        def __setOrigin(self, position):
93            """
94            Set the origin of the plane source.
95    
96            @type position: L{GlobalPosition <position.GlobalPosition>} object
97            @param position: Plane source origin
98            """
99    
100            self.__vtk_plane_source.SetOrigin(position._getGlobalPosition())
101    
102        def setPoint1(self, position):
103            """
104            Set the first point from the origin of the plane source.
105    
106            @type position: L{GlobalPosition <position.GlobalPosition>} object
107            @param position: Position of the first axis of the plane source
108            """
109    
110            self.__vtk_plane_source.SetPoint1(position._getGlobalPosition())
111    
112        def setPoint2(self, position):
113            """
114            Set the second point from the origin of the plane source.
115    
116            @type position: L{GlobalPosition <position.GlobalPosition>} object
117            @param position: Position of the second axis of the plane source
118            """
119    
120            self.__vtk_plane_source.SetPoint2(position._getGlobalPosition())
121    
122    
123      def _getOutput(self):      def _getOutput(self):
124          """          """
125          Return the output of the plance source.          Return the output of the plane source.
126    
127          @rtype: vtkPolyData          @rtype: vtkPolyData
128          @return: Polygonal data          @return: Polygonal data
# Line 95  class PlaneSource: Line 130  class PlaneSource:
130    
131          return self.__vtk_plane_source.GetOutput()          return self.__vtk_plane_source.GetOutput()
132    
   

Legend:
Removed from v.1028  
changed lines
  Added in v.1029

  ViewVC Help
Powered by ViewVC 1.1.26