Exemple #1
0
def zoom_scene():
    global mayavi_zoom, mayavi_zoom_old

    if use_mayavi:
        mlab.view(distance=mayavi_zoom)
    elif use_opengl:
        if mayavi_zoom_old < mayavi_zoom:
            vis.camera.move_backward()
            mayavi_zoom_old = mayavi_zoom
        elif mayavi_zoom_old > mayavi_zoom:
            vis.camera.move_forward()
            help(vis.camera.move_forward)
            mayavi_zoom_old = mayavi_zoom
Exemple #2
0
def rotate_scene():
    global mayavi_rotation_angle

    if use_mayavi and mayavi_rotation_angle:
        # mlab.yaw(mayavi_rotation_angle)
        if mayavi_autozoom:
            mlab.view(azimuth=mayavi_rotation_angle, distance='auto')
        else:
            current_view_vals = mlab.view()
            mlab.view(azimuth=mayavi_rotation_angle,
                      elevation=current_view_vals[1],
                      distance=current_view_vals[2],
                      focalpoint=current_view_vals[3])
    mayavi_rotation_angle %= 360.
Exemple #3
0
def zoom_scene():
    global mayavi_zoom

    mlab.view(distance=mayavi_zoom)