/[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 792 by gross, Fri Jul 28 10:37:16 2006 UTC revision 833 by jongui, Fri Sep 1 07:48:20 2006 UTC
# Line 19  __url__="http://www.iservo.edu.au/esys" Line 19  __url__="http://www.iservo.edu.au/esys"
19  __version__="$Revision:$"  __version__="$Revision:$"
20  __date__="$Date:$"  __date__="$Date:$"
21    
22  from common import PyvisiObject  import vtk
23    
24    
25    class Camera:
26        def __init__(self, open_scene):
27            self.open_scene = open_scene
28            self.vtk_camera = None
29    
30            self.setCamera()
31    
32        def setCamera(self):
33            self.vtk_camera = vtk.vtkCamera()      
34            self.open_scene.getRenderer().SetActiveCamera(self.vtk_camera)
35    
36        def setClippingRange(self, near_clipping, far_clipping):
37            self.vtk_camera.SetClippingRange(near_clipping, far_clipping)
38    
39        def setFocalPoint(self, x_coor, y_coor, z_coor):
40            self.vtk_camera.SetFocalPoint(x_coor, y_coor, z_coor)  
41    
42        def setPosition(self, x_coor, y_coor, z_coor):
43            self.vtk_camera.SetPosition(x_coor, y_coor, z_coor)
44    
45        def setViewUp(self, x_view, y_view, z_view):
46            self.vtk_camera.SetViewUp(x_view, y_view, z_view)
47    
48    
49    
50    
51    
 class Camera(PyvisiObject):  
     """  
     A camera  
     """  
     pass  
52    
53  class FrontView(Camera):  class FrontView(Camera):
54      pass      pass

Legend:
Removed from v.792  
changed lines
  Added in v.833

  ViewVC Help
Powered by ViewVC 1.1.26