1 |
gross |
792 |
""" |
2 |
|
|
Class and functions associated with cameras and views |
3 |
|
|
|
4 |
|
|
@var __author__: name of author |
5 |
|
|
@var __license__: licence agreement |
6 |
|
|
@var __copyright__: copyrights |
7 |
|
|
@var __url__: url entry point on documentation |
8 |
|
|
@var __version__: version |
9 |
|
|
@var __date__: date of the version |
10 |
|
|
""" |
11 |
|
|
|
12 |
|
|
__copyright__=""" Copyright (c) 2006 by ACcESS MNRF |
13 |
|
|
http://www.access.edu.au |
14 |
|
|
Primary Business: Queensland, Australia""" |
15 |
|
|
__license__="""Licensed under the Open Software License version 3.0 |
16 |
|
|
http://www.opensource.org/licenses/osl-3.0.php""" |
17 |
|
|
__author__="Paul Cochrane, L. Gross" |
18 |
|
|
__url__="http://www.iservo.edu.au/esys" |
19 |
|
|
__version__="$Revision:$" |
20 |
|
|
__date__="$Date:$" |
21 |
|
|
|
22 |
jongui |
830 |
import vtk |
23 |
gross |
792 |
|
24 |
jongui |
833 |
|
25 |
jongui |
830 |
class Camera: |
26 |
|
|
def __init__(self, open_scene): |
27 |
|
|
self.open_scene = open_scene |
28 |
|
|
self.vtk_camera = None |
29 |
gross |
792 |
|
30 |
jongui |
830 |
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 |
|
|
|
52 |
|
|
|
53 |
gross |
792 |
class FrontView(Camera): |
54 |
|
|
pass |
55 |
|
|
|
56 |
|
|
class BackView(Camera): |
57 |
|
|
pass |
58 |
|
|
|
59 |
|
|
class TopView(Camera): |
60 |
|
|
pass |
61 |
|
|
|
62 |
|
|
class BottomView(Camera): |
63 |
|
|
pass |
64 |
|
|
|
65 |
|
|
class LeftView(Camera): |
66 |
|
|
pass |
67 |
|
|
|
68 |
|
|
class RightView(Camera): |
69 |
|
|
pass |
70 |
|
|
|
71 |
|
|
class IsometricView(Camera): |
72 |
|
|
pass |