Inherits from
- TVTKScene: enthought.tvtk.pyface.tvtk_scene.TVTKScene
Attributes
- activated
Fired when this is activated.
activated = Event()
- actor_list
This is used primarily to implement the add_actor/remove_actor methods.
actor_list = List()
- actor_map
A convenient dictionary based interface to add/remove actors and widgets. This is similar to the interface provided for the ActorEditor.
actor_map = Dict()
- add_actor
Conevenience methods.
add_actor = add_actors
- closing
Fired when this widget is closed.
closing = Event()
- default_view
The default view of this object.
default_view = View(Group(Group(Item(name = 'background'), Item(name = 'foreground'), Item(name = 'parallel_projection'), Item(name = 'disable_render'), Item(name = 'off_screen_rendering'), Item(name = 'jpeg_quality'), Item(name = 'jpeg_progressive'), Item(name = 'magnification'), Item(name = 'anti_aliasing_frames')), Group(Item(name = 'render_window', style = 'custom', visible_when = 'object.stereo', editor = InstanceEditor(view = View(_stereo_view)), show_label = False)), label = 'Scene'), Group(Item(name = 'light_manager', style = 'custom', editor = InstanceEditor(), show_label = False), label = 'Lights'))
- do_render
do_render = Event()
- enabled_info
Used by the editor to determine if the widget was enabled or not.
enabled_info = Dict()
- light_manager
light_manager = Property
- picker
picker = Property
- remove_actor
remove_actor = remove_actors
- scene
This exists just to mirror the TVTKWindow api.
scene = Property
- scene_editor
The actual scene being edited.
scene_editor = Instance(TVTKScene)
Inherited from base classes
- actor_added
- actor_removed
- anti_aliasing_frames
- background
- busy
- camera
- closed
- control
- disable_render
- foreground
- get
- interactor
- jpeg_progressive
- jpeg_quality
- line_smoothing
- magnification
- off_screen_rendering
- on_trait_event
- parallel_projection
- point_smoothing
- polygon_smoothing
- recorder
- render_window
- renderer
- set
- stereo
- trait_added
- trait_modified
- wrappers
Method summary
- __init__(self, parent = None, **traits)
- add_actors(self, actors)
- add_widgets(self, widgets, enabled = True)
- get_size(self)
- remove_actors(self, actors)
- remove_widgets(self, widgets)
- render(self)
- reset_zoom(self)
- save(self, file_name, size = None, **kw_args)
- save_bmp(self, file_name)
- save_gl2ps(self, file_name, exp = None)
- save_iv(self, file_name)
- save_jpg(self, file_name, quality = None, progressive = None)
- save_oogl(self, file_name)
- save_png(self, file_name)
- save_ps(self, file_name)
- save_rib(self, file_name, bg = 0, resolution = None, resfactor = 1.0)
- save_tiff(self, file_name)
- save_vrml(self, file_name)
- save_wavefront(self, file_name)
- set_size(self, size)
Inherited from base classes
- __deepcopy__(self, memo)
- __get_pure_state__(self)
- __getstate__(self)
- __prefix_trait__(self, name, is_set)
- __reduce_ex__(self, protocol)
- __setstate__(self, str_state)
- add_class_trait(cls, name, *trait)
- add_trait(self, name, *trait)
- add_trait_category(cls, category)
- add_trait_listener(self, object, prefix = '')
- all_trait_names(self)
- base_trait(self, name)
- class_default_traits_view(cls)
- class_editable_traits(cls)
- class_trait_names(cls, **metadata)
- class_trait_view(cls, name = None, view_element = None)
- class_trait_view_elements(cls)
- class_traits(cls, **metadata)
- clone_traits(self, traits = None, memo = None, copy = None, **metadata)
- close(self)
- configure_traits(self, filename = None, view = None, kind = None, edit = True, context = None, handler = None, id = '', scrollable = None, **args)
- copy_traits(self, other, traits = None, memo = None, copy = None, **metadata)
- copyable_trait_names(self, **metadata)
- default_traits_view(self)
- edit_traits(self, view = None, parent = None, kind = None, context = None, handler = None, id = '', scrollable = None, **args)
- editable_traits(self)
- has_traits_interface(self, *interfaces)
- isometric_view(self)
- on_trait_change(self, handler, name = None, remove = False, dispatch = 'same', priority = False, deferred = False)
- print_traits(self, show_help = False, **metadata)
- remove_trait(self, name)
- remove_trait_listener(self, object, prefix = '')
- reset_traits(self, traits = None, **metadata)
- save_povray(self, file_name)
- save_x3d(self, file_name)
- set_trait_dispatch_handler(cls, name, klass, override = False)
- sync_trait(self, trait_name, object, alias = None, mutual = True, remove = False)
- trait(self, name, force = False, copy = False)
- trait_context(self)
- trait_get(self, *names, **metadata)
- trait_monitor(cls, handler, remove = False)
- trait_names(self, **metadata)
- trait_set(self, trait_change_notify = True, **traits)
- trait_setq(self, **traits)
- trait_subclasses(cls, all = False)
- trait_view(self, name = None, view_element = None)
- trait_view_elements(self)
- trait_views(self, klass = None)
- traits(self, **metadata)
- validate_trait(self, name, value)
- x_minus_view(self)
- x_plus_view(self)
- y_minus_view(self)
- y_plus_view(self)
- z_minus_view(self)
- z_plus_view(self)
Methods
- __init__(self, parent = None, **traits)
Initializes the object.
- add_actors(self, actors)
Adds a single actor or a tuple or list of actors to the renderer.
- add_widgets(self, widgets, enabled = True)
Adds widgets to the renderer.
- get_size(self)
Return size of the render window.
- remove_actors(self, actors)
Removes a single actor or a tuple or list of actors from the renderer.
- remove_widgets(self, widgets)
Removes widgets from the renderer.
- render(self)
Force the scene to be rendered. Nothing is done if the disable_render trait is set to True.
- reset_zoom(self)
Reset the camera so everything in the scene fits.
- save(self, file_name, size = None, **kw_args)
Saves rendered scene to one of several image formats depending on the specified extension of the filename.
If an additional size (2-tuple) argument is passed the window is resized to the specified size in order to produce a suitably sized output image. Please note that when the window is resized, the window may be obscured by other widgets and the camera zoom is not reset which is likely to produce an image that does not reflect what is seen on screen.
Any extra keyword arguments are passed along to the respective image format's save method.
- save_bmp(self, file_name)
Save to a BMP image file.
- save_gl2ps(self, file_name, exp = None)
Save scene to a vector PostScript/EPS/PDF/TeX file using GL2PS. If you choose to use a TeX file then note that only the text output is saved to the file. You will need to save the graphics separately.
Keyword Arguments:
file_name -- File name to save to.
exp -- Optionally configured vtkGL2PSExporter object. Defaults to None and this will use the default settings with the output file type chosen based on the extention of the file name.
- save_iv(self, file_name)
Save to an OpenInventor file.
- save_jpg(self, file_name, quality = None, progressive = None)
Arguments: file_name if passed will be used, quality is the quality of the JPEG(10-100) are valid, the progressive arguments toggles progressive jpegs.
- save_oogl(self, file_name)
Saves the scene to a Geomview OOGL file. Requires VTK 4 to work.
- save_png(self, file_name)
Save to a PNG image file.
- save_ps(self, file_name)
Saves the rendered scene to a rasterized PostScript image. For vector graphics use the save_gl2ps method.
- save_rib(self, file_name, bg = 0, resolution = None, resfactor = 1.0)
Save scene to a RenderMan RIB file.
Keyword Arguments:
file_name -- File name to save to.
bg -- Optional background option. If 0 then no background is saved. If non-None then a background is saved. If left alone (defaults to None) it will result in a pop-up window asking for yes/no.
resolution -- Specify the resolution of the generated image in the form of a tuple (nx, ny).
resfactor -- The resolution factor which scales the resolution.
- save_tiff(self, file_name)
Save to a TIFF image file.
- save_vrml(self, file_name)
Save to a VRML file.
- save_wavefront(self, file_name)
Save scene to a Wavefront OBJ file. Two files are generated. One with a .obj extension and another with a .mtl extension which contains the material proerties.
Keyword Arguments:
file_name -- File name to save to
- set_size(self, size)
Set the size of the window.