/[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 859 by jongui, Wed Sep 20 03:23:16 2006 UTC revision 860 by jongui, Thu Sep 28 08:17:29 2006 UTC
# Line 27  class Light: Line 27  class Light:
27          """          """
28          self.scene.getRenderer().AddLight(self.vtk_light)          self.scene.getRenderer().AddLight(self.vtk_light)
29    
30      def setColor(self, colorMap):      def setColor(self, color):
31          """          """
32          Set the color of the light.          Set the light color.
33                    @type color: RGB list
34          @type colorMap: L{ColorMap <colormap.ColorMap>} object          @param color: Color of the light
         @param colorMap: Color of the light  
35          """          """
36    
37          self.vtk_light.SetColor(colorMap.getR(), colorMap.getG(),          self.vtk_light.SetColor(color[0], color[1], color[2])
             colorMap.getB())  
   
38    
39      def setFocalPoint(self, position):      def setFocalPoint(self, position):
40          """          """
41          Set the focal point of the light.          Set the focal point of the light.
   
42          @type position: L{Position <geo.Position>} object          @type position: L{Position <geo.Position>} object
43          @param position: Light focal point position          @param position: Light focal point
44          """          """
45    
46          self.vtk_light.SetFocalPoint(position.getXCoor(), position.getYCoor(),          self.vtk_light.SetFocalPoint(position.getXCoor(), position.getYCoor(),
# Line 53  class Light: Line 49  class Light:
49      def setPosition(self, position):      def setPosition(self, position):
50          """          """
51          Set the position of the light.          Set the position of the light.
   
52          @type position: L{Position <geo.Position>} object          @type position: L{Position <geo.Position>} object
53          @param position: Light position          @param position: Light position
54          """          """
# Line 64  class Light: Line 59  class Light:
59      def setIntensity(self, intensity):      def setIntensity(self, intensity):
60          """          """
61          Set the intensity (brightness) of the light.          Set the intensity (brightness) of the light.
   
62          @type intensity: Number          @type intensity: Number
63          @param intensity: intensity (brightness) of the light          @param intensity: Intensity (brightness) of the light
64          """          """
65    
66          self.vtk_light.SetIntensity(intensity)          self.vtk_light.SetIntensity(intensity)
67    
   
   

Legend:
Removed from v.859  
changed lines
  Added in v.860

  ViewVC Help
Powered by ViewVC 1.1.26