Package esys :: Package pyvisi :: Module light :: Class Light
[hide private]
[frames] | no frames]

Class Light

Class that defines a light. A light controls the lighting for the rendered object and works in a similar way to Camera.

Instance Methods [hide private]
 
__init__(self, scene, viewport=0)
Initialise the light.
 
__setupLight(self, scene)
Set up the light and associate it with the renderer.
Boolean
_isModified(self)
Return whether the Light has been modified.
 
_render(self, scene)
Render the light.
 
setAngle(self, elevation=0, azimuth=0)
An alternative to set the position and focal point of the light by using the elevation and azimuth.
 
setColor(self, color)
Set the light color.
 
setFocalPoint(self, position)
Set the focal point of the light.
 
setIntensity(self, intensity)
Set the intensity (brightness) of the light.
 
setPosition(self, position)
Set the position of the light.
Method Details [hide private]

__init__(self, scene, viewport=0)
(Constructor)

 

Initialise the light.

Parameters:
  • scene (Scene object) - Scene in which components are to be added to
  • viewport (Viewport constant) - Viewport in which objects are to be rendered on

__setupLight(self, scene)

 

Set up the light and associate it with the renderer.

Parameters:
  • scene (Scene object) - Scene in which objects are to be rendered on

_isModified(self)

 

Return whether the Light has been modified.

Returns: Boolean
True or False

_render(self, scene)

 

Render the light.

Parameters:
  • scene (Scene object) - Scene in which objects are to be rendered on

setAngle(self, elevation=0, azimuth=0)

 

An alternative to set the position and focal point of the light by using the elevation and azimuth.

Parameters:
  • elevation (Number) - Degree to rotate the light to the top and bottom
  • azimuth (Number) - Degree to rotate the light to the left and right

setColor(self, color)

 

Set the light color.

Parameters:
  • color (Color constant) - Light color

setFocalPoint(self, position)

 

Set the focal point of the light.

Parameters:

setIntensity(self, intensity)

 

Set the intensity (brightness) of the light.

Parameters:
  • intensity (Number) - Intensity (brightness) of the light

setPosition(self, position)

 

Set the position of the light.

Parameters: