Package esys :: Package lsm :: Package vis :: Package core :: Module scene :: Class Scene
[hide private]
[frames] | no frames]

Class Scene

object --+
         |
        Scene
Known Subclasses:

A container for scene objects.

Instance Methods [hide private]
 
__init__(self, renderDefaults=None)
Constructs a scene object.
 
initialise(self)
Initialises the scene, eg sets the background.
 
add(self, object)
Adds a specified object to the scene.
 
clear(self)
Removes all objects from the scene, does not alter camera.
 
setBackground(self, color)
Sets the background color of the scene.
Camera
getCamera(self)
Returns a Camera object for this scene.
 
getRenderDefaults(self, offScreen=None, interactive=None, size=None)
Returns tuple of default render arguments.
 
render(self, offScreen=None, interactive=None, fileName=None, imageFormat=None, size=None)
Renders an image of the scene.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, renderDefaults=None)
(Constructor)

 

Constructs a scene object.

Overrides: object.__init__

add(self, object)

 

Adds a specified object to the scene.

Parameters:
  • object (object) - Object to be rendered in the scene.

setBackground(self, color)

 

Sets the background color of the scene.

Parameters:
  • color (RGB color) - Backgroung RGB color.

getCamera(self)

 

Returns a Camera object for this scene.

Returns: Camera
The Camera associated with this scene.

render(self, offScreen=None, interactive=None, fileName=None, imageFormat=None, size=None)

 

Renders an image of the scene.

Parameters:
  • offScreen (bool) - If False the image is displayed on-screen in a visible window else the rendered image is not displayed.
  • interactive (bool) - If True and offScreen==True this method will remain paused until a **quit** is received in the image window. If offScreen==False this option has no effect.
  • fileName (str) - The name of the file to which the image is written. The fileName extension (eg ".png", ) is used as the image type if imageFomat is not specified.
  • imageFormat (ImageFormat) - The type of image produced: PNG, PNM.
  • size (sequence of 2 int) - The image width size[0] and height size[1].