/[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 851 by jongui, Mon Sep 11 07:40:09 2006 UTC revision 852 by jongui, Wed Sep 20 03:23:16 2006 UTC
# Line 1  Line 1 
1  """  """
   
2  @author: John Ngui  @author: John Ngui
3  @author: Lutz Gross  @author: Lutz Gross
4  """  """
# Line 18  class Camera: Line 17  class Camera:
17          """          """
18    
19          self.scene = scene          self.scene = scene
20          self.vtk_camera = None          self.vtk_camera = vtk.vtkCamera()      
21    
22          self.setCamera()          self.setCamera()
23    
# Line 27  class Camera: Line 26  class Camera:
26          Set up the camera and associate it with the renderer.          Set up the camera and associate it with the renderer.
27          """          """
28    
         self.vtk_camera = vtk.vtkCamera()        
29          self.scene.getRenderer().SetActiveCamera(self.vtk_camera)          self.scene.getRenderer().SetActiveCamera(self.vtk_camera)
30    
31      def setClippingRange(self, near_clipping, far_clipping):      def setClippingRange(self, near_clipping, far_clipping):
# Line 75  class Camera: Line 73  class Camera:
73          self.vtk_camera.SetViewUp(position.getXCoor(), position.getYCoor(),          self.vtk_camera.SetViewUp(position.getXCoor(), position.getYCoor(),
74              position.getZCoor())              position.getZCoor())
75    
76        def setZoom(self, zoom):
77            self.vtk_camera.Zoom(zoom)
78    
79    
80    

Legend:
Removed from v.851  
changed lines
  Added in v.852

  ViewVC Help
Powered by ViewVC 1.1.26