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

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

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

revision 881 by jongui, Wed Oct 25 03:56:34 2006 UTC revision 882 by jongui, Fri Oct 27 08:15:33 2006 UTC
# Line 77  class Transform: Line 77  class Transform:
77    
78          self.vtk_transform.Translate(-x_offset, -y_offset, -z_offset)          self.vtk_transform.Translate(-x_offset, -y_offset, -z_offset)
79            
     def normalTranslate(self, offset):  
         """  
         Translate the rendered object along the plane normal.  
         @type offset: Number  
         @param offset: Amount to translate along the plane normal  
         """  
   
         self.vtk_transform.Push(offset)  
   
     def scale(self, x_scale, y_scale, z_scale):  
         """  
         Scale the rendered object along the x, y and z-axes.  
         @type x_scale: Number  
         @param x_scale: Amount to scale along the x-axis  
         @type y_scale: Number  
         @param y_scale: Amount to scale along the y-axis  
         @type z_scale: Number  
         @param z_scale: Amount to scale along the z-axis  
         """  
   
         self.vtk_transform.Scale(x_scalr, y_scale, z_scale)  
       
80      def rotateX(self, angle):      def rotateX(self, angle):
81          """          """
82          Rotate the rendered object along the x-axis.          Rotate the rendered object along the x-axis.
# Line 141  class Transform: Line 119  class Transform:
119          @type offset: Number          @type offset: Number
120          @param offset: Amount to translate          @param offset: Amount to translate
121          """          """
122            
123            # rotateY must come first before translate. Otherwise, it won't work.
124            self.rotateY(89.9)
125          self.translate(offset, 0, 0)          self.translate(offset, 0, 0)
         self.rotateY(89.9)  
126    
127      def xzPlane(self, offset = 0):      def xzPlane(self, offset = 0):
128          """          """
# Line 152  class Transform: Line 131  class Transform:
131          @param offset: Amount to translate          @param offset: Amount to translate
132          """          """
133    
134          self.translate(0, offset, 0)          # rotateX must come first before translate. Otherwise, it won't work.
135          self.rotateX(89.9)          self.rotateX(89.9)
136            self.translate(0, offset, 0)
137            
138      def getTransform(self):      def getTransform(self):
139          """          """

Legend:
Removed from v.881  
changed lines
  Added in v.882

  ViewVC Help
Powered by ViewVC 1.1.26