/[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 829 by gross, Fri Jul 28 10:37:16 2006 UTC revision 830 by jongui, Thu Aug 31 05:41:09 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    class Camera:
25        def __init__(self, open_scene):
26            self.open_scene = open_scene
27            self.vtk_camera = None
28    
29            self.setCamera()
30    
31        def setCamera(self):
32            self.vtk_camera = vtk.vtkCamera()      
33            self.open_scene.getRenderer().SetActiveCamera(self.vtk_camera)
34    
35        def setClippingRange(self, near_clipping, far_clipping):
36            self.vtk_camera.SetClippingRange(near_clipping, far_clipping)
37    
38        def setFocalPoint(self, x_coor, y_coor, z_coor):
39            self.vtk_camera.SetFocalPoint(x_coor, y_coor, z_coor)  
40    
41        def setPosition(self, x_coor, y_coor, z_coor):
42            self.vtk_camera.SetPosition(x_coor, y_coor, z_coor)
43    
44        def setViewUp(self, x_view, y_view, z_view):
45            self.vtk_camera.SetViewUp(x_view, y_view, z_view)
46    
47    
48    
49    
50    
 class Camera(PyvisiObject):  
     """  
     A camera  
     """  
     pass  
51    
52  class FrontView(Camera):  class FrontView(Camera):
53      pass      pass

Legend:
Removed from v.829  
changed lines
  Added in v.830

  ViewVC Help
Powered by ViewVC 1.1.26