/[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 947 by jongui, Mon Jan 29 07:22:43 2007 UTC revision 948 by jongui, Thu Feb 1 07:23:34 2007 UTC
# Line 7  from position import GlobalPosition Line 7  from position import GlobalPosition
7    
8  class Plane:  class Plane:
9      """      """
10      Class that defines a plane that cuts through meshes.      Class that defines a plane that cuts through rendered objects.
11      """      """
12    
13      def __init__(self, transform):      def __init__(self, transform):
# Line 15  class Plane: Line 15  class Plane:
15          Initialise the plane.            Initialise the plane.  
16    
17          @type transform: L{Transform <transform.Transform>} object          @type transform: L{Transform <transform.Transform>} object
18          @param transform: Specifies the orientation of the rendered plane          @param transform: Specifies the orientation of the plane
19          """          """
20    
21          self.__transform = transform          self.__transform = transform
# Line 29  class Plane: Line 29  class Plane:
29    
30          # Default origin of the of the plane is (0,0,0).          # Default origin of the of the plane is (0,0,0).
31          self.__setOrigin(GlobalPosition(0,0,0))          self.__setOrigin(GlobalPosition(0,0,0))
         #self.__setOrigin(GlobalPosition(center[0], center[1], center[2]))  
32          # Default normal of the plane is parrallel to the z-axis.          # Default normal of the plane is parrallel to the z-axis.
33          self.__setNormal(GlobalPosition(0, 0, 1))          self.__setNormal(GlobalPosition(0, 0, 1))
         #self.__setNormal(GlobalPosition(center[0], center[1], center[2]*1000))  
34          self.__setTransform()          self.__setTransform()
35    
36      def __setOrigin(self, position):      def __setOrigin(self, position):
# Line 56  class Plane: Line 54  class Plane:
54    
55      def __setTransform(self):      def __setTransform(self):
56          """          """
57          Set the transformation to the plane.          Set the transformation of the plane.
58          """          """
59    
60          self.__vtk_plane.SetTransform(self.__transform)          self.__vtk_plane.SetTransform(self.__transform)
# Line 66  class Plane: Line 64  class Plane:
64          Return the plane.          Return the plane.
65    
66          @rtype: vtkPlane          @rtype: vtkPlane
67          @return: Plane that cuts through meshes          @return: Plane that cuts through rendered objects
68          """          """
69    
70          return self.__vtk_plane          return self.__vtk_plane
71    
72    
73    ###############################################################################
74    
75    
76  class PlaneSource:  class PlaneSource:
77      """      """
78      Class that defines a plane source.      Class that defines a plane source.
# Line 86  class PlaneSource: Line 87  class PlaneSource:
87            
88      def _getOutput(self):      def _getOutput(self):
89          """          """
90          Return the plance source.          Return the output of the plance source.
91    
92          @rtype: vtkPolyData          @rtype: vtkPolyData
93          @return: Polygonal data          @return: Polygonal data

Legend:
Removed from v.947  
changed lines
  Added in v.948

  ViewVC Help
Powered by ViewVC 1.1.26