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

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

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

revision 1158 by jongui, Tue May 22 04:24:01 2007 UTC revision 1197 by jongui, Mon Jun 18 02:08:34 2007 UTC
# Line 1  Line 1 
1  """  """
2  @author: John NGUI  @var __author__: name of author
3    @var __copyright__: copyrights
4    @var __license__: licence agreement
5    @var __url__: url entry point on documentation
6    @var __version__: version
7    @var __date__: date of the version
8  """  """
9    
10    __author__="John Ngui, john.ngui@uq.edu.au"
11    __copyright__="""  Copyright (c) 2006 by ACcESS MNRF
12                        http://www.access.edu.au
13                    Primary Business: Queensland, Australia"""
14    __license__="""Licensed under the Open Software License version 3.0
15                 http://www.opensource.org/licenses/osl-3.0.php"""
16    __url__="http://www.iservo.edu.au/esys"
17    __version__="$Revision$"
18    __date__="$Date$"
19    
20    
21  import vtk  import vtk
22  from position import GlobalPosition  from position import GlobalPosition
23  from constant import Viewport  from constant import Viewport
# Line 176  class Camera: Line 192  class Camera:
192                    
193      def dolly(self, distance):      def dolly(self, distance):
194          """          """
195          Move the camera towards (greater than 1) and away (less than 1) from          Move the camera towards (greater than 1) the rendered object. However,
196          the rendered object.          the camera is unable to be moved away from the rendered object.
197    
198          @type distance: Number          @type distance: Number
199          @param distance: Amount to move towards or away the rendered object          @param distance: Amount to move towards the rendered object
200          """          """
201    
202          self.__vtk_camera.Dolly(distance)          self.__vtk_camera.Dolly(distance)
203          self.__modified = True          self.__modified = True
204    
205        def parallelProjectionOn(self):
206            """
207            Enable camera parallel projection.
208            """
209    
210            self.__vtk_camera.ParallelProjectionOn()
211            self.__modified = True
212    
213        def parallelProjectionOff(self):
214            """
215            Disable camera parallel projection.
216            """
217    
218            self.__vtk_camera.ParallelProjectionOff()
219            self.__modified = True
220    
221      def __resetCameraClippingRange(self, scene):      def __resetCameraClippingRange(self, scene):
222          """          """
223          Reset the camera clipping range based on the bounds of the visible          Reset the camera clipping range based on the bounds of the visible
# Line 236  class Camera: Line 268  class Camera:
268                  self.__initialization == False                  self.__initialization == False
269    
270              self.__resetCameraClippingRange(scene)              self.__resetCameraClippingRange(scene)
271              self.__isModified = False              self.__modified = False
272                            
273    

Legend:
Removed from v.1158  
changed lines
  Added in v.1197

  ViewVC Help
Powered by ViewVC 1.1.26