/[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 838 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 light and its settings.  @author: John Ngui
3    @author: Lutz Gross
4  """  """
5    
6  import vtk  import vtk
7    
8  class Light:  class Light:
9      """      """
10      @author: John Ngui      Class that controls the light and its settings.
     @author: Lutz Gross  
11      """      """
12    
13      def __init__(self, open_scene):      def __init__(self, scene):
14          """          """
15          @type open_scene: L{OpenScene <openscene.OpenScene>} object          @type scene: L{OpenScene <scene.Scene>} object
16          @param open_scene: Scene in which components are to be added to          @param scene: Scene in which components are to be added to  
17          """          """
18    
19          self.open_scene = open_scene          self.scene = scene
20          self.vtk_light = None          self.vtk_light = None
21    
22          self.setLight()          self.setLight()
# Line 26  class Light: Line 26  class Light:
26          Set up the light and associate it with the renderer.          Set up the light and associate it with the renderer.
27          """          """
28          self.vtk_light = vtk.vtkLight()          self.vtk_light = vtk.vtkLight()
29          self.open_scene.getRenderer().AddLight(self.vtk_light)          self.scene.getRenderer().AddLight(self.vtk_light)
30    
31      def setColor(self, colorMap):      def setColor(self, colorMap):
32          """          """

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

  ViewVC Help
Powered by ViewVC 1.1.26