Class that defines a scene. A scene is a window in which objects are
to be rendered on. Only one scene needs to be created. However, a scene
may be divided into four smaller windows called viewports (if needed).
Each viewport can render a different object.
|
|
__addRenderer(self)
Add the renderer(s) to the render window. |
|
|
|
|
__animate(self)
Animate the rendered object on-the-fly. |
|
|
|
|
__createViewport(self)
Create the viewport(s) in the scene. |
|
|
|
vtkImageWriter or vtkExporter
|
__getImageWriter(self)
Return the appropriate image writer or exporter based on the
specified renderer. |
|
|
|
|
__init__(self,
renderer='online',
num_viewport=1,
x_size=1152,
y_size=864)
Initialise the scene. |
|
|
|
|
__saveImage(self,
image_name)
Save the rendered object as an image, vrml or open inventor file. |
|
|
|
|
__setSize(self,
x_size,
y_size)
Set the size of the render window. |
|
|
|
|
__setupOfflineRendering(self)
Enables the offline rendering (no window comes up). |
|
|
|
|
__setupOnlineRendering(self)
Setup the window interactor for online rendering. |
|
|
|
|
__setupScene(self)
Setup the scene. |
|
|
|
|
__setupWindowToImage(self)
Setup the window to image filter to convert the output from the
render window into an image, vrml or open inventor file. |
|
|
|
|
_addActor2D(self,
viewport,
actor)
Add the actor2D to the appropriate viewport. |
|
|
|
|
_addActor3D(self,
viewport,
actor)
Add the actor3D to the appropriate viewport. |
|
|
|
|
_addLight(self,
viewport,
light)
Add the light to the appropriate viewport. |
|
|
|
|
|
|
List
|
|
|
|
_setActiveCamera(self,
viewport,
camera)
Set the camera to the appropriate viewport. |
|
|
|
|
render(self,
image_name=None)
Render the object using either the online, offline or display mode. |
|
|
|
|
setBackground(self,
color)
Set the background color of the scene. |
|
|
|
|
setTitleBar(self,
text)
Set the text on the title bar of the render window. |
|
|