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

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

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

revision 1001 by jongui, Wed Jan 31 07:17:43 2007 UTC revision 1002 by jongui, Wed Feb 28 06:51:33 2007 UTC
# Line 23  class Camera: Line 23  class Camera:
23                  object                  object
24          @param data_collector: Deal with source of data for visualisation          @param data_collector: Deal with source of data for visualisation
25          @type viewport: L{Viewport <constant.Viewport>} constant          @type viewport: L{Viewport <constant.Viewport>} constant
26          @param viewport: Viewport in which object are to be rendered on          @param viewport: Viewport in which objects are to be rendered on
27          """          """
28    
29          self.__scene = scene          self.__scene = scene
# Line 43  class Camera: Line 43  class Camera:
43          self.setFocalPoint(GlobalPosition(center[0], center[1], center[2]))          self.setFocalPoint(GlobalPosition(center[0], center[1], center[2]))
44    
45          # Default camera position is the center of the object but with a slight          # Default camera position is the center of the object but with a slight
46          # distance on the z-axis.          # distance along the z-axis.
47          self.setPosition(GlobalPosition(center[0], center[1], center[2] * 3))          self.setPosition(GlobalPosition(center[0], center[1], center[2] * 4))
48    
49          # Assign the camera to the appropriate renderer          # Assign the camera to the appropriate renderer
50          self.__scene._setActiveCamera(self.__viewport, self.__vtk_camera)          self.__scene._setActiveCamera(self.__viewport, self.__vtk_camera)
# Line 133  class Camera: Line 133  class Camera:
133          """          """
134    
135          self.__vtk_camera.Roll(-angle)          self.__vtk_camera.Roll(-angle)
136            self.__resetCamera()
137    
138      def backView(self):      def backView(self):
139          """          """
# Line 176  class Camera: Line 177  class Camera:
177    
178      def isometricView(self):      def isometricView(self):
179          """          """
180          Rotate the camera to view the isometric side of the rendered object.          Rotate the camera to view the isometric angle of the rendered object.
181          """          """
182    
183          self.roll(-45)          self.roll(-45)
# Line 186  class Camera: Line 187  class Camera:
187          """          """
188          Reposition the camera so that all actors can be seen. Needs to          Reposition the camera so that all actors can be seen. Needs to
189          be called whenever the camera's settings are modified in order for the          be called whenever the camera's settings are modified in order for the
190          changes to take effect correctly.          changes to take effect.
191          """          """
192    
193          self.__scene._getRenderer()[self.__viewport].ResetCamera()          self.__scene._getRenderer()[self.__viewport].ResetCamera()

Legend:
Removed from v.1001  
changed lines
  Added in v.1002

  ViewVC Help
Powered by ViewVC 1.1.26