13 |
# allow access to their public methods from the driver. |
# allow access to their public methods from the driver. |
14 |
class Image(DataSetMapper, Actor3D, Texture, PlaneSource): |
class Image(DataSetMapper, Actor3D, Texture, PlaneSource): |
15 |
""" |
""" |
16 |
Class that displayes an image with interaction capability. |
Class that displays an image with interaction capability. |
17 |
""" |
""" |
18 |
|
|
19 |
# The SOUTH_WEST default viewport is used when there is only one viewport. |
# The SOUTH_WEST default viewport is used when there is only one viewport. |
26 |
object |
object |
27 |
@param image_reader: Deal with source of image for visualisation |
@param image_reader: Deal with source of image for visualisation |
28 |
@type viewport: L{Viewport <constant.Viewport>} constant |
@type viewport: L{Viewport <constant.Viewport>} constant |
29 |
@param viewport: Viewport in which the object is to be rendered on |
@param viewport: Viewport in which objects are to be rendered on |
30 |
""" |
""" |
31 |
|
|
32 |
# ----- Image ----- |
# ----- Image ----- |
33 |
print "image" |
|
34 |
Texture.__init__(self, image_reader._getOutput()) |
Texture.__init__(self, image_reader._getOutput()) |
35 |
PlaneSource.__init__(self) |
PlaneSource.__init__(self) |
36 |
|
|
37 |
DataSetMapper.__init__(self, PlaneSource._getOutput(self)) |
DataSetMapper.__init__(self, PlaneSource._getOutput(self)) |
38 |
|
|
39 |
Actor3D.__init__(self, DataSetMapper._getDataSetMapper(self)) |
Actor3D.__init__(self, DataSetMapper._getDataSetMapper(self)) |
40 |
Actor3D._setTexture(self, Texture._getTexture(self)) |
Actor3D._setTexture(self, Texture._getTexture(self)) |
|
scene._addActor3D(viewport, Actor3D._getActor3D(self)) |
|
|
|
|
41 |
|
|
42 |
|
scene._addActor3D(viewport, Actor3D._getActor3D(self)) |
43 |
|
|