yt.visualization.volume_rendering.input_events module

Input event handlers for Interactive Data Visualization

class yt.visualization.volume_rendering.input_events.BlendFuncs[source]

Bases: object

Class allowing to switch between different GL blending functions

dest_i = 0
next_dest(event_coll, event)[source]
next_source(event_coll, event)[source]
possibilities = ('GL_ZERO', 'GL_ONE', 'GL_SRC_COLOR', 'GL_ONE_MINUS_SRC_COLOR', 'GL_DST_COLOR', 'GL_ONE_MINUS_DST_COLOR', 'GL_SRC_ALPHA', 'GL_ONE_MINUS_SRC_ALPHA', 'GL_DST_ALPHA', 'GL_ONE_MINUS_DST_ALPHA', 'GL_CONSTANT_COLOR', 'GL_ONE_MINUS_CONSTANT_COLOR', 'GL_CONSTANT_ALPHA', 'GL_ONE_MINUS_CONSTANT_ALPHA')
source_i = 0
class yt.visualization.volume_rendering.input_events.EventCollection(scene, camera)[source]

Bases: object

Class handling mouse and keyboard events occurring in IDV

Parameters:
add_framebuffer_callback(func)[source]
add_key_callback(func, key, action='press', mods=None)[source]
add_mouse_callback(func, key, action='press', mods=None)[source]
add_render_callback(func)[source]
framebuffer_call(window, width, height)[source]
key_call(window, key, scancode, action, mods)[source]
mouse_call(window, key, action, mods)[source]
class yt.visualization.volume_rendering.input_events.GLFWEvent(window, key, scancode, action, mods, width, height)

Bases: tuple

action

Alias for field number 3

count(value) → integer -- return number of occurrences of value
height

Alias for field number 6

index(value[, start[, stop]]) → integer -- return first index of value.

Raises ValueError if the value is not present.

key

Alias for field number 1

mods

Alias for field number 4

scancode

Alias for field number 2

width

Alias for field number 5

window

Alias for field number 0

class yt.visualization.volume_rendering.input_events.MouseRotation[source]

Bases: object

Class translating mouse movements to positions in OpenGL scene’s coordinates

do_rotation(event_coll, event)[source]
start_rotation(event_coll, event)[source]
stop_rotation(event_coll, event)[source]
yt.visualization.volume_rendering.input_events.camera_orto(event_coll, event)[source]

Change camera to orthographic projection

yt.visualization.volume_rendering.input_events.camera_proj(event_coll, event)[source]

Change camera to perspective projection

yt.visualization.volume_rendering.input_events.close_window(event_coll, event)[source]

Close main window

yt.visualization.volume_rendering.input_events.closeup(event_coll, event)[source]

Change camera position to (0.01, 0.01, 0.01)

yt.visualization.volume_rendering.input_events.cmap_cycle(event_coll, event)[source]

Change colormap

yt.visualization.volume_rendering.input_events.cmap_max_down(event_coll, event)[source]

Decrease upper bound of colormap

yt.visualization.volume_rendering.input_events.cmap_max_up(event_coll, event)[source]

Increase upper bound of colormap

yt.visualization.volume_rendering.input_events.cmap_min_down(event_coll, event)[source]

Decrease lower bound of colormap

yt.visualization.volume_rendering.input_events.cmap_min_up(event_coll, event)[source]

Increase lower bound of colormap

yt.visualization.volume_rendering.input_events.cmap_toggle_log(event_coll, event)[source]

Switch between linear and logarithmic scales

yt.visualization.volume_rendering.input_events.debug_buffer(event_coll, event)[source]

Print debug info about framebuffer

yt.visualization.volume_rendering.input_events.framebuffer_size_callback(event_coll, event)[source]
yt.visualization.volume_rendering.input_events.nplane_closer(event_coll, event)[source]
yt.visualization.volume_rendering.input_events.nplane_further(event_coll, event)[source]
yt.visualization.volume_rendering.input_events.print_help(event_coll, event)[source]

Print this help

yt.visualization.volume_rendering.input_events.print_limits(event_coll, event)[source]

Print debug info about scene and camera

yt.visualization.volume_rendering.input_events.register_event(name)[source]
yt.visualization.volume_rendering.input_events.reset(event_coll, event)[source]

Change camera position to (-1.0, -1.0, -1.0)

yt.visualization.volume_rendering.input_events.shader_lines(event_coll, event)[source]
yt.visualization.volume_rendering.input_events.shader_max(event_coll, event)[source]

Use maximum intensity shader

yt.visualization.volume_rendering.input_events.shader_proj(event_coll, event)[source]

Use projection shader

yt.visualization.volume_rendering.input_events.shader_test(event_coll, event)[source]

Use transfer function shader

yt.visualization.volume_rendering.input_events.zoomin(event_coll, event)[source]

Zoom in the camera

yt.visualization.volume_rendering.input_events.zoomout(event_coll, event)[source]

Zoom out the camera