Miscellaneous Utilities¶
Shader and ShaderProgram wrapper classes for vertex and fragment shaders used in Interactive Data Visualization
-
class
yt_idv.opengl_support.
ColormapTexture
(**kwargs: Any)[source]¶ Bases:
yt_idv.opengl_support.Texture1D
-
colormap_name
¶ A casting version of the unicode trait.
-
-
class
yt_idv.opengl_support.
Framebuffer
(**kwargs: Any)[source]¶ Bases:
traitlets.traitlets.HasTraits
-
property
data
¶
-
db_tex
¶ 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
depth_data
¶
-
fb_id
¶ A casting version of the int trait.
-
fb_tex
¶ 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
-
initialized
¶ A boolean (True, False) trait.
-
rb_id
¶ A casting version of the int trait.
-
viewport
¶ An instance of a Python tuple.
-
property
-
class
yt_idv.opengl_support.
GLValue
(default_value: t.Any = traitlets.Undefined, allow_none: bool = False, read_only: bool | None = None, help: str | None = None, config: t.Any = None, **kwargs: t.Any)[source]¶ Bases:
traitlets.traitlets.TraitType
-
default_value
= GL_NONE¶
-
info_text
= 'An OpenGL constant.'¶
-
-
class
yt_idv.opengl_support.
Texture
(**kwargs: Any)[source]¶ Bases:
traitlets.traitlets.HasTraits
-
channels
¶
-
data
¶ A numpy array trait type.
-
mag_filter
¶
-
min_filter
¶
-
texture_name
¶ A casting version of the int trait.
-
-
class
yt_idv.opengl_support.
Texture1D
(**kwargs: Any)[source]¶ Bases:
yt_idv.opengl_support.Texture
-
boundary_x
¶
-
dim_enum
¶
-
dims
= 1¶
-
-
class
yt_idv.opengl_support.
Texture2D
(**kwargs: Any)[source]¶ Bases:
yt_idv.opengl_support.Texture
-
boundary_x
¶
-
boundary_y
¶
-
channels
= 1¶
-
dim_enum
¶
-
dims
= 2¶
-
-
class
yt_idv.opengl_support.
Texture3D
(**kwargs: Any)[source]¶ Bases:
yt_idv.opengl_support.Texture
-
boundary_x
¶
-
boundary_y
¶
-
boundary_z
¶
-
dim_enum
¶
-
dims
= 3¶
-
-
class
yt_idv.opengl_support.
Texture3DIterator
(**kwargs: Any)[source]¶ Bases:
traitlets.traitlets.HasTraits
-
items
¶ A trait which allows any value.
-
-
class
yt_idv.opengl_support.
TextureBoundary
(default_value: t.Any = traitlets.Undefined, allow_none: bool = False, read_only: bool | None = None, help: str | None = None, config: t.Any = None, **kwargs: t.Any)[source]¶ Bases:
traitlets.traitlets.TraitType
-
default_value
= GL_CLAMP_TO_EDGE¶
-
info_text
= 'A boundary type of mirror, clamp, or repeat'¶
-
-
class
yt_idv.opengl_support.
VertexArray
(**kwargs: Any)[source]¶ Bases:
traitlets.traitlets.HasTraits
-
attributes
¶ An instance of a Python list.
-
each
¶ A casting version of the int trait.
-
id
¶ A casting version of the int trait.
-
index_id
¶ A casting version of the int trait.
-
indices
¶ A numpy array trait type.
-
name
¶ A casting version of the unicode trait.
-
-
class
yt_idv.opengl_support.
VertexAttribute
(**kwargs: Any)[source]¶ Bases:
traitlets.traitlets.HasTraits
-
data
¶ A numpy array trait type.
-
divisor
¶ A casting version of the int trait.
-
each
¶ A casting version of the int trait.
-
id
¶ A casting version of the int trait.
-
name
¶ A casting version of the unicode trait.
-
opengl_type
¶ A casting version of the int trait.
-
Shader and ShaderProgram wrapper classes for vertex and fragment shaders used in Interactive Data Visualization
-
class
yt_idv.shader_objects.
Shader
(**kwargs: Any)[source]¶ Bases:
traitlets.traitlets.HasTraits
Creates a shader from source
- Parameters:
source (str) – This can either be a string containing a full source of a shader, an absolute path to a source file or a filename of a shader residing in the ./shaders/ directory.
-
blend_equation
¶
-
blend_equation_separate
¶ An instance of a Python tuple.
-
blend_func
¶ An instance of a Python tuple.
-
blend_func_separate
¶ An instance of a Python tuple.
-
property
defines
¶
-
depth_test
¶
-
info
¶ A casting version of the unicode trait.
-
preprocessor_defs
¶ An instance of a Python list.
-
property
shader
¶
-
shader_name
¶ A casting version of the unicode trait.
-
shader_type
¶ An enum of strings where the case should be ignored.
-
source
¶ A trait which allows any value.
-
use_separate_blend
¶ A boolean (True, False) trait.
-
class
yt_idv.shader_objects.
ShaderProgram
(vertex_shader=None, fragment_shader=None, geometry_shader=None)[source]¶ Bases:
object
Wrapper class that compiles and links vertex and fragment shaders into a shader program.
- Parameters:
vertex_shader (string) – or
yt.visualization.volume_rendering.shader_objects.VertexShader
The vertex shader used in the Interactive Data Visualization pipeline.fragment_shader (string) – or
yt.visualization.volume_rendering.shader_objects.FragmentShader
The fragment shader used in the Interactive Data Visualization pipeline.geometry_shader (string) – or
yt_idv.shader_objects.GeometryShader
The geometry shader used in the pipeline; optional.
-
class
yt_idv.shader_objects.
ShaderTrait
(default_value: t.Any = traitlets.Undefined, allow_none: bool = False, read_only: bool | None = None, help: str | None = None, config: t.Any = None, **kwargs: t.Any)[source]¶ Bases:
traitlets.traitlets.TraitType
-
default_value
= None¶
-
info_text
= 'A shader (vertex, fragment or geometry)'¶
-
-
class
yt_idv.simple_gui.
SimpleGUI
(window)[source]¶ Bases:
object
-
callbacks
= None¶
-
context
= None¶
-
draw
= False¶
-
property
keyboard_event_handled
¶
-
property
mouse_event_handled
¶
-
renderer
= None¶
-
window
= None¶
-
-
class
yt_idv.traitlets_support.
FontTrait
(default_value: t.Any = traitlets.Undefined, allow_none: bool = False, read_only: bool | None = None, help: str | None = None, config: t.Any = None, **kwargs: t.Any)[source]¶ Bases:
traitlets.traitlets.TraitType
-
info_text
= 'A font instance from matplotlib'¶
-
-
class
yt_idv.traitlets_support.
YTPositionTrait
(default_value: t.Any = traitlets.Undefined, allow_none: bool = False, read_only: bool | None = None, help: str | None = None, config: t.Any = None, **kwargs: t.Any)[source]¶ Bases:
traitlets.traitlets.TraitType
-
default_value
= None¶
-
info_text
= 'A position in code_length'¶
-