Scene Data Components¶
- class yt_idv.scene_data.base_data.SceneData(**kwargs: Any)[source]¶
Bases:
HasTraitsA class that defines a collection of GPU-managed data.
This class contains the largest common set of features that can be used OpenGL rendering: a set of vertices and a set of vertex attributes. Note that this is distinct from the shader, which can be swapped out and provided with these items.
- max_val¶
A casting version of the float trait.
- min_val¶
A casting version of the float trait.
- name¶
A trait for unicode strings.
- textures¶
An instance of a Python list.
- property val_range¶
- vertex_array¶
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_data.block_collection.BlockCollection(**kwargs: Any)[source]¶
Bases:
SceneData- add_data(field, no_ghost=False)[source]¶
Adds a source of data for the block collection.
Given a data_source and a field to populate from, adds the data to the block collection so that is able to be rendered.
- Parameters:
data_source (YTRegion) – A YTRegion object to use as a data source.
field (string) – A field to populate from.
no_ghost (bool (False)) – Should we speed things up by skipping ghost zone generation?
- always_normalize¶
A boolean (True, False) trait.
- bitmap_objects¶
An instance of a Python dict.
One or more traits can be passed to the constructor to validate the keys and/or values of the dict. If you need more detailed validation, you may use a custom validator method.
Changed in version 5.0: Added key_trait for validating dict keys.
Changed in version 5.0: Deprecated ambiguous
trait,traitsargs in favor ofvalue_trait,per_key_traits.
- blocks¶
An instance of a Python dict.
One or more traits can be passed to the constructor to validate the keys and/or values of the dict. If you need more detailed validation, you may use a custom validator method.
Changed in version 5.0: Added key_trait for validating dict keys.
Changed in version 5.0: Deprecated ambiguous
trait,traitsargs in favor ofvalue_trait,per_key_traits.
- blocks_by_grid¶
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
- compute_min_max¶
A boolean (True, False) trait.
- data_source¶
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 grid_id_list¶
the 0-indexed grid ids that contain all the blocks
- grids_by_block¶
An instance of a Python dict.
One or more traits can be passed to the constructor to validate the keys and/or values of the dict. If you need more detailed validation, you may use a custom validator method.
Changed in version 5.0: Added key_trait for validating dict keys.
Changed in version 5.0: Deprecated ambiguous
trait,traitsargs in favor ofvalue_trait,per_key_traits.
- property intersected_grids¶
- name = 'block_collection'¶
- scale¶
A boolean (True, False) trait.
- texture_objects¶
An instance of a Python dict.
One or more traits can be passed to the constructor to validate the keys and/or values of the dict. If you need more detailed validation, you may use a custom validator method.
Changed in version 5.0: Added key_trait for validating dict keys.
Changed in version 5.0: Deprecated ambiguous
trait,traitsargs in favor ofvalue_trait,per_key_traits.
- class yt_idv.scene_data.octree_block_collection.OctreeBlockCollection(**kwargs: Any)[source]¶
Bases:
SceneData- add_data(field)[source]¶
Adds a source of data for the block collection.
Given a data_source and a field to populate from, adds the data to the block collection so that is able to be rendered.
- Parameters:
data_source (YTRegion) – A YTRegion object to use as a data source.
field (string) – A field to populate from.
no_ghost (bool (False)) – Should we speed things up by skipping ghost zone generation?
- bitmap_textures¶
An instance of a Python list.
- data_source¶
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
- data_textures¶
An instance of a Python list.
- name = 'octree_block_collection'¶
- shapes¶
An instance of a Python list.
- class yt_idv.scene_data.box.BoxData(**kwargs: Any)[source]¶
Bases:
SceneData- left_edge¶
- name = 'box_data'¶
- right_edge¶
- class yt_idv.scene_data.line.LineData(**kwargs: Any)[source]¶
Bases:
SceneData- n_values¶
A casting version of the int trait.
- name = 'line_data'¶
- class yt_idv.scene_data.mesh.MeshData(**kwargs: Any)[source]¶
Bases:
SceneData- blocks¶
An instance of a Python dict.
One or more traits can be passed to the constructor to validate the keys and/or values of the dict. If you need more detailed validation, you may use a custom validator method.
Changed in version 5.0: Added key_trait for validating dict keys.
Changed in version 5.0: Deprecated ambiguous
trait,traitsargs in favor ofvalue_trait,per_key_traits.
- data_source¶
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
- get_mesh_data(data_source, field)[source]¶
This reads the mesh data into a form that can be fed in to OpenGL.
- name = 'mesh'¶
- scale¶
A boolean (True, False) trait.
- size¶
A casting version of the int trait.
- texture_objects¶
An instance of a Python dict.
One or more traits can be passed to the constructor to validate the keys and/or values of the dict. If you need more detailed validation, you may use a custom validator method.
Changed in version 5.0: Added key_trait for validating dict keys.
Changed in version 5.0: Deprecated ambiguous
trait,traitsargs in favor ofvalue_trait,per_key_traits.
- class yt_idv.scene_data.rgba.RGBAData(**kwargs: Any)[source]¶
Bases:
SceneData- colormap_texture¶
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
- name = 'rgba_data'¶
- class yt_idv.scene_data.text_characters.TextCharacters(**kwargs: Any)[source]¶
Bases:
SceneData- characters¶
An instance of a Python dict.
One or more traits can be passed to the constructor to validate the keys and/or values of the dict. If you need more detailed validation, you may use a custom validator method.
Changed in version 5.0: Added key_trait for validating dict keys.
Changed in version 5.0: Deprecated ambiguous
trait,traitsargs in favor ofvalue_trait,per_key_traits.
- font¶
- font_size¶
A casting version of the int trait.
- name = 'text_overlay'¶
- class yt_idv.scene_data.curve.CurveData(**kwargs: Any)[source]¶
Bases:
SceneDataData component for a single curve.
- add_data(curve)[source]¶
add curve data
- Parameters:
curve (ArrayLike) – an array of shape (N, 3) specifying the position (in x, y, z) of N points.
- data¶
A numpy array trait type.
- n_vertices¶
A casting version of the int trait.
- name = 'curve_data'¶
- class yt_idv.scene_data.curve.CurveCollection(**kwargs: Any)[source]¶
Bases:
CurveDataData component for a collection of curves
- add_curve(curve)[source]¶
add a single curve to the collection
- Parameters:
curve (ArrayLike) – an array of shape (N, 3) specifying the position (in x, y, z) of N points.
- data¶
A numpy array trait type.
- n_vertices¶
A casting version of the int trait.
- name = 'curve_collection'¶