Inherits from
Attributes
- 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'), Item(name = 'full_screen', show_label = False)), 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', show_label = False), label = 'Lights'), buttons = [ 'OK', 'Cancel' ])
- full_screen
Turn on full-screen rendering.
full_screen = Button('Full Screen')
- picker
The picker handles pick events.
picker = Instance(picker.Picker)
Inherited from base classes
Method summary
- __get_pure_state__(self)
- __init__(self, parent = None, **traits)
- get_size(self)
- hide_cursor(self)
- OnButtonDown(self, event)
- OnButtonUp(self, event)
- OnKeyDown(self, event)
- OnKeyUp(self, event)
- OnPaint(self, event)
- OnSize(self, event)
- render(self)
- save_to_clipboard(self)
- set_size(self, size)
- show_cursor(self)
Inherited from base classes
- __deepcopy__(self, memo)
- __prefix_trait__(self, name, is_set)
- __reduce_ex__(self, protocol)
- 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)
- 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)
- 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)
- 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)
Methods
- __get_pure_state__(self)
Allows us to pickle the scene.
- __init__(self, parent = None, **traits)
Initializes the object.
- get_size(self)
Return size of the render window.
- hide_cursor(self)
Hide the cursor.
- OnButtonDown(self, event)
Overrides the default on button down method.
- OnButtonUp(self, event)
- OnKeyDown(self, event)
This method is overridden to prevent the 's'/'w'/'e'/'q' keys from doing the default thing which is generally useless. It also handles the 'p' and 'l' keys so the picker and light manager are called.
- OnKeyUp(self, event)
This method is overridden to prevent the 's'/'w'/'e'/'q' keys from doing the default thing which is generally useless. It also handles the 'p' and 'l' keys so the picker and light manager are called. The 'f' key sets the camera focus.
- OnPaint(self, event)
This method is overridden temporarily in order to create the light manager. This is necessary because it makes sense to create the light manager only when the widget is realized. Only when the widget is realized is the VTK render window created and only then are the default lights all setup correctly. This handler is removed on the first Paint event and the default paint handler of the wxVTKRenderWindowInteractor is used instead.
- OnSize(self, event)
Overrides the default OnSize in order to refresh the traits of the render window.
- render(self)
Force the scene to be rendered. Nothing is done if the disable_render trait is set to True.
- save_to_clipboard(self)
Saves a bitmap of the scene to the clipboard.
- set_size(self, size)
Set the size of the window.
- show_cursor(self)
Show the cursor.