Package esys :: Package pyvisi :: Module scene :: Class Scene
[show private | hide private]
[frames | no frames]

Type Scene

object --+
         |
        Scene

Known Subclasses:
Scene, Scene, Scene, Scene, Scene

The main object controlling the scene.

This is the base Scene object. It should be inherited, and then its methods overridden.
Method Summary
  __init__(self)
The init function
  add(self, obj)
Add a new item to the scene
  delete(self, obj)
Delete an item from the scene
  getBackgroundColor(self)
Gets the current background color setting of the Scene
  getSize(self)
Gets the current size of the scene
  place(self, obj)
Place an object within a scene
  render(self, pause, interactive)
Render (or re-render) the scene
  rendererCommand(self, command)
Allows the user to run a low-level renderer-specific command directly
  save(self, fname, format)
Save the scene to a file
  setBackgroundColor(self, *color)
Sets the background color of the Scene
  setSize(self, xSize, ySize)
Sets the size of the scene.
  write(self, fname, format)
Save the scene to a file
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Method Details

__init__(self)
(Constructor)

The init function
Overrides:
__builtin__.object.__init__

add(self, obj)

Add a new item to the scene
Parameters:
obj - The object to add to the scene
           (type=object)

delete(self, obj)

Delete an item from the scene
Parameters:
obj - The object to remove
           (type=object)

getBackgroundColor(self)

Gets the current background color setting of the Scene

getSize(self)

Gets the current size of the scene

This size is effectively the renderer window size. Returns a tuple of the x and y dimensions respectively, in pixel units(??).

place(self, obj)

Place an object within a scene
Parameters:
obj - The object to place within the scene
           (type=object)

render(self, pause=False, interactive=False)

Render (or re-render) the scene

Render the scene, either to screen, or to a buffer waiting for a save
Parameters:
pause - Flag to wait at end of script evaluation for user input
           (type=boolean)
interactive - Whether or not to have interactive use of the output
           (type=boolean)

rendererCommand(self, command)

Allows the user to run a low-level renderer-specific command directly
Parameters:
command - The renderer command to run as a string
           (type=string)

save(self, fname, format)

Save the scene to a file
Parameters:
fname - The name of the file to save the scene to
           (type=string)
format - The format in which to save the scene
           (type=Image object or string)

setBackgroundColor(self, *color)

Sets the background color of the Scene
Parameters:
color - The color to set the background to. Can be RGB or CMYK
           (type=tuple)

setSize(self, xSize, ySize)

Sets the size of the scene.

This size is effectively the renderer window size.
Parameters:
xSize - the size to set the x dimension
           (type=int)
ySize - the size to set the y dimension
           (type=int)

write(self, fname, format)

Save the scene to a file
Parameters:
fname - The name of the file to save the scene to
           (type=string)
format - The format in which to save the scene
           (type=Image object or string)

Generated by Epydoc 2.1 on Thu Apr 27 11:16:23 2006 http://epydoc.sf.net