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

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

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

revision 792 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 Light(PyvisiObject):  class Light:
25      """  
26      A light      def __init__(self, open_scene):
27      """          self.open_scene = open_scene
28      pass          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)

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

  ViewVC Help
Powered by ViewVC 1.1.26