Scene Components

class yt_idv.scene_components.base_component.SceneComponent(*args: t.Any, **kwargs: t.Any)[source]

Bases: HasTraits

active

A boolean (True, False) trait.

base_quad

A trait whose value must be an instance of a specified class.

The value can also be an instance of a subclass of the specified class.

Subclasses can declare default classes by overriding the klass attribute

clear_region

A boolean (True, False) trait.

cmap_log

A boolean (True, False) trait.

cmap_max

A casting version of the float trait.

cmap_min

A casting version of the float trait.

colormap

A trait whose value must be an instance of a specified class.

The value can also be an instance of a subclass of the specified class.

Subclasses can declare default classes by overriding the klass attribute

colormap_fragment
colormap_vertex
data

A trait whose value must be an instance of a specified class.

The value can also be an instance of a subclass of the specified class.

Subclasses can declare default classes by overriding the klass attribute

display_bounds

An instance of a Python tuple.

display_name

A trait for unicode strings.

draw(scene, program)[source]
fb

A trait whose value must be an instance of a specified class.

The value can also be an instance of a subclass of the specified class.

Subclasses can declare default classes by overriding the klass attribute

property final_pass
final_pass_fragment
final_pass_vertex
property first_pass_fb_data

The values written by the first rendering pass, before color-mapping.

A (ny, nx) array of the R channel of the stored framebuffer, or None if store_first_pass_fb has not been set and the scene rendered. Note that these are the raw values used internally by the shaders (min/max normalized, in the internal coordinate system): use rendered_image_plane for values in physical units.

first_pass_fb_rgba

A trait whose value must be an instance of a specified class.

The value can also be an instance of a subclass of the specified class.

Subclasses can declare default classes by overriding the klass attribute

fixed_cmap_max

A casting version of the float trait.

fixed_cmap_min

A casting version of the float trait.

fragment_shader
geometry_shader
iso_layers

An instance of a Python list.

iso_layers_alpha

An instance of a Python list.

iso_log

A boolean (True, False) trait.

iso_tol_is_pct

A boolean (True, False) trait.

iso_tolerance

A casting version of the float trait.

name = 'undefined'
priority

A casting version of the int trait.

property program1
property program2
render_gui(imgui, renderer, scene)[source]
render_method

A trait for unicode strings.

rendered_image_plane()[source]
run_program(scene)[source]
scale

A casting version of the float trait.

store_first_pass_fb

A boolean (True, False) trait.

use_db

A boolean (True, False) trait.

vertex_shader
visible

A boolean (True, False) trait.

class yt_idv.scene_components.blocks.BlockRendering(*args: t.Any, **kwargs: t.Any)[source]

Bases: SceneComponent

A class that renders block data. It may do this in one of several ways, including mesh outline. This allows us to render a single collection of blocks multiple times in a single scene and to separate out the memory handling from the display.

box_width

A casting version of the float trait.

data

A trait whose value must be an instance of a specified class.

The value can also be an instance of a subclass of the specified class.

Subclasses can declare default classes by overriding the klass attribute

draw(scene, program)[source]
name = 'block_rendering'
priority = 10
render_gui(imgui, renderer, scene)[source]
rendered_image_plane()[source]

Extract the rendered image as data values in physical units.

Requires store_first_pass_fb to have been set to True before the scene was rendered, so that the values written by the first rendering pass are available (the second pass replaces them with colors).

Returns:

Holds the image as a unyt array along with the physical extent of the view. Units depend on the render method: slice and max_intensity are in the units of the rendered field, while projection is in field units times a length.

Return type:

RenderedImagePlane

Notes

Values are the absolute value of the rendered field, sampled from the vertex-centered data used to build the 3D textures, so they can fall slightly outside the range of the cell-centered field (particularly with no_ghost=True).

sample_factor

A casting version of the float trait.

slice_normal

An instance of a Python tuple.

slice_position

An instance of a Python tuple.

tf_log

A boolean (True, False) trait.

tf_max

A casting version of the float trait.

tf_min

A casting version of the float trait.

transfer_function

A trait whose value must be an instance of a specified class.

The value can also be an instance of a subclass of the specified class.

Subclasses can declare default classes by overriding the klass attribute

class yt_idv.scene_components.octree_blocks.OctreeBlockRendering(*args: t.Any, **kwargs: t.Any)[source]

Bases: SceneComponent

A class that renders block data. It may do this in one of several ways, including mesh outline. This allows us to render a single collection of blocks multiple times in a single scene and to separate out the memory handling from the display.

box_width

A casting version of the float trait.

data

A trait whose value must be an instance of a specified class.

The value can also be an instance of a subclass of the specified class.

Subclasses can declare default classes by overriding the klass attribute

draw(scene, program)[source]
name = 'octree_block_rendering'
priority = 10
render_gui(imgui, renderer, scene)[source]
sample_factor

A casting version of the float trait.

tf_log

A boolean (True, False) trait.

tf_max

A casting version of the float trait.

tf_min

A casting version of the float trait.

transfer_function

A trait whose value must be an instance of a specified class.

The value can also be an instance of a subclass of the specified class.

Subclasses can declare default classes by overriding the klass attribute

class yt_idv.scene_components.mesh.MeshRendering(*args: t.Any, **kwargs: t.Any)[source]

Bases: SceneComponent

data

A trait whose value must be an instance of a specified class.

The value can also be an instance of a subclass of the specified class.

Subclasses can declare default classes by overriding the klass attribute

draw(scene, program)[source]
name = 'mesh_rendering'
class yt_idv.scene_components.rgba.RGBADisplay(*args: t.Any, **kwargs: t.Any)[source]

Bases: SceneComponent

data

A trait whose value must be an instance of a specified class.

The value can also be an instance of a subclass of the specified class.

Subclasses can declare default classes by overriding the klass attribute

draw(scene, program)[source]
name = 'rgba_display'
priority = 20
class yt_idv.scene_components.rgba.RGBALinePlot(*args: t.Any, **kwargs: t.Any)[source]

Bases: SceneComponent

data

A trait whose value must be an instance of a specified class.

The value can also be an instance of a subclass of the specified class.

Subclasses can declare default classes by overriding the klass attribute

draw(scene, program)[source]
name = 'rgba_line_plot'
priority = 20
class yt_idv.scene_components.curves.CurveRendering(*args: t.Any, **kwargs: t.Any)[source]

Bases: SceneComponent

A class that renders user-specified curves.

curve_rgba

An instance of a Python tuple.

data

The curve data.

draw(scene, program)[source]
name = 'curve_rendering'
priority = 10
render_gui(imgui, renderer, scene)[source]
class yt_idv.scene_components.curves.CurveCollectionRendering(*args: t.Any, **kwargs: t.Any)[source]

Bases: CurveRendering

rendering a collection of curves

curve_collection

An instance of a Python list.

data

A trait whose value must be an instance of a specified class.

The value can also be an instance of a subclass of the specified class.

Subclasses can declare default classes by overriding the klass attribute

draw(scene, program)[source]
name = 'multi_curve_rendering'