/[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 837 by jongui, Tue Sep 5 07:23:50 2006 UTC revision 839 by jongui, Wed Sep 6 04:53:50 2006 UTC
# Line 1  Line 1 
1  """  """
2  Class that controls the camera and its settings.  
3    @author: John Ngui
4    @author: Lutz Gross
5  """  """
6    
7  import vtk  import vtk
8    
9  class Camera:  class Camera:
10      """      """
11      @author: John Ngui      Class that controls the camera and its settings.
     @author: Lutz Gross  
12      """      """
13    
14      def __init__(self, open_scene):      def __init__(self, scene):
15          """          """
16          @type open_scene: L{OpenScene <openscene.OpenScene>} object          @type scene: L{OpenScene <scene.Scene>} object
17          @param open_scene: Scene in which components are to be added to          @param scene: Scene in which components are to be added to
18          """          """
19    
20          self.open_scene = open_scene          self.scene = scene
21          self.vtk_camera = None          self.vtk_camera = None
22    
23          self.setCamera()          self.setCamera()
# Line 27  class Camera: Line 28  class Camera:
28          """          """
29    
30          self.vtk_camera = vtk.vtkCamera()                self.vtk_camera = vtk.vtkCamera()      
31          self.open_scene.getRenderer().SetActiveCamera(self.vtk_camera)          self.scene.getRenderer().SetActiveCamera(self.vtk_camera)
32    
33      def setClippingRange(self, near_clipping, far_clipping):      def setClippingRange(self, near_clipping, far_clipping):
34          """          """

Legend:
Removed from v.837  
changed lines
  Added in v.839

  ViewVC Help
Powered by ViewVC 1.1.26