/[escript]/trunk/pyvisi/py_src/light.py
ViewVC logotype

Contents of /trunk/pyvisi/py_src/light.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 830 - (show annotations)
Thu Aug 31 05:41:09 2006 UTC (14 years ago) by jongui
File MIME type: text/x-python
File size: 1287 byte(s)
Added the light and camera components.


1 """
2 Class and functions associated with lights
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 import vtk
23
24 class Light:
25
26 def __init__(self, open_scene):
27 self.open_scene = open_scene
28 self.vtk_light = None
29
30 self.setLight()
31
32 def setLight(self):
33 self.vtk_light = vtk.vtkLight()
34 self.open_scene.getRenderer().AddLight(self.vtk_light)
35
36 def setColor(self, red, green, blue):
37 self.vtk_light.SetColor(red, green, blue)
38
39 def setFocalPoint(self, x_coor, y_coor, z_coor):
40 self.vtk_light.SetFocalPoint(x_coor, y_coor, z_coor)
41
42 def setPosition(self, x_coor, y_coor, z_coor):
43 self.vtk_light.SetPosition(x_coor, y_coor, z_coor)
44
45 def setIntensity(self, intensity):
46 self.vtk_light.SetIntensity(intensity)

  ViewVC Help
Powered by ViewVC 1.1.26