Exemplo n.º 1
0
def mayavi_scene_factory(parent):
    """A mayavi scene factory that creates a scene with preferences
    appropriately set."""
    p = get_scene_preferences()
    s = MayaviScene(parent, stereo=p['stereo'])
    set_scene_preferences(s, p)
    return s
Exemplo n.º 2
0
def mayavi_scene_factory(parent):
    """A mayavi scene factory that creates a scene with preferences
    appropriately set."""
    p = get_scene_preferences()
    s = MayaviScene(parent, stereo=p["stereo"])
    set_scene_preferences(s, p)
    return s
Exemplo n.º 3
0
def off_screen_viewer_factory(size=(400, 350)):
    """A factory that creates an offscreen viewer."""
    win = TVTKWindow(off_screen_rendering=True)
    # Set all preferences.
    set_scene_preferences(win.scene)
    # Set the size.
    win.scene.set_size(size)
    return win
Exemplo n.º 4
0
def off_screen_viewer_factory(size=(400, 350)):
    """A factory that creates an offscreen viewer."""
    win = TVTKWindow(off_screen_rendering=True)
    # Set all preferences.
    set_scene_preferences(win.scene)
    # Set the size.
    win.scene.set_size(size)
    return win