34 |
import vtk |
import vtk |
35 |
from position import GlobalPosition |
from position import GlobalPosition |
36 |
from constant import Viewport |
from constant import Viewport |
37 |
|
from esys.escript import getMPISizeWorld |
38 |
|
|
39 |
class Light: |
class Light: |
40 |
""" |
""" |
53 |
@type viewport: L{Viewport <constant.Viewport>} constant |
@type viewport: L{Viewport <constant.Viewport>} constant |
54 |
@param viewport: Viewport in which objects are to be rendered on |
@param viewport: Viewport in which objects are to be rendered on |
55 |
""" |
""" |
56 |
|
if getMPISizeWorld()>1: |
57 |
|
raise ValueError,"pyvisi.Light is not running on more than one processor." |
58 |
|
|
59 |
self.__viewport = viewport |
self.__viewport = viewport |
60 |
self.__vtk_light = vtk.vtkLight() |
self.__vtk_light = vtk.vtkLight() |