Skip to main content

Quantity

Trait Quantity 

Source
pub trait Quantity:
    Any
    + Send
    + Sync {
    // Required methods
    fn as_any(&self) -> &(dyn Any + 'static);
    fn as_any_mut(&mut self) -> &mut (dyn Any + 'static);
    fn name(&self) -> &str;
    fn structure_name(&self) -> &str;
    fn kind(&self) -> QuantityKind;
    fn is_enabled(&self) -> bool;
    fn set_enabled(&mut self, enabled: bool);
    fn build_ui(&mut self, ui: &(dyn Any + 'static));
    fn refresh(&mut self);
    fn data_size(&self) -> usize;

    // Provided method
    fn clear_gpu_resources(&mut self) { ... }
}
Expand description

Data associated with a structure that can be visualized.

Quantities are attached to structures and represent data like:

  • Scalar fields (temperature, pressure, etc.)
  • Vector fields (velocity, normals, etc.)
  • Colors
  • UV parameterizations

Required Methods§

Source

fn as_any(&self) -> &(dyn Any + 'static)

Returns a reference to self as Any for downcasting.

Source

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Returns a mutable reference to self as Any for downcasting.

Source

fn name(&self) -> &str

Returns the name of this quantity.

Source

fn structure_name(&self) -> &str

Returns the name of the parent structure.

Source

fn kind(&self) -> QuantityKind

Returns the kind of this quantity.

Source

fn is_enabled(&self) -> bool

Returns whether this quantity is currently enabled/visible.

Source

fn set_enabled(&mut self, enabled: bool)

Sets the enabled state of this quantity.

Source

fn build_ui(&mut self, ui: &(dyn Any + 'static))

Builds the ImGui UI controls for this quantity.

Source

fn refresh(&mut self)

Refreshes GPU resources after data changes.

Source

fn data_size(&self) -> usize

Returns the number of data elements.

Provided Methods§

Source

fn clear_gpu_resources(&mut self)

Clears GPU render resources so they can be re-initialized with a new device.

Implementations on Foreign Types§

Source§

impl Quantity for CurveEdgeColorQuantity

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Source§

fn name(&self) -> &str

Source§

fn structure_name(&self) -> &str

Source§

fn kind(&self) -> QuantityKind

Source§

fn is_enabled(&self) -> bool

Source§

fn set_enabled(&mut self, enabled: bool)

Source§

fn build_ui(&mut self, _ui: &(dyn Any + 'static))

Source§

fn refresh(&mut self)

Source§

fn data_size(&self) -> usize

Source§

impl Quantity for CurveEdgeScalarQuantity

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Source§

fn name(&self) -> &str

Source§

fn structure_name(&self) -> &str

Source§

fn kind(&self) -> QuantityKind

Source§

fn is_enabled(&self) -> bool

Source§

fn set_enabled(&mut self, enabled: bool)

Source§

fn build_ui(&mut self, _ui: &(dyn Any + 'static))

Source§

fn refresh(&mut self)

Source§

fn data_size(&self) -> usize

Source§

impl Quantity for CurveEdgeVectorQuantity

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Source§

fn name(&self) -> &str

Source§

fn structure_name(&self) -> &str

Source§

fn kind(&self) -> QuantityKind

Source§

fn is_enabled(&self) -> bool

Source§

fn set_enabled(&mut self, enabled: bool)

Source§

fn build_ui(&mut self, _ui: &(dyn Any + 'static))

Source§

fn refresh(&mut self)

Source§

fn data_size(&self) -> usize

Source§

impl Quantity for CurveNodeColorQuantity

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Source§

fn name(&self) -> &str

Source§

fn structure_name(&self) -> &str

Source§

fn kind(&self) -> QuantityKind

Source§

fn is_enabled(&self) -> bool

Source§

fn set_enabled(&mut self, enabled: bool)

Source§

fn build_ui(&mut self, _ui: &(dyn Any + 'static))

Source§

fn refresh(&mut self)

Source§

fn data_size(&self) -> usize

Source§

impl Quantity for CurveNodeScalarQuantity

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Source§

fn name(&self) -> &str

Source§

fn structure_name(&self) -> &str

Source§

fn kind(&self) -> QuantityKind

Source§

fn is_enabled(&self) -> bool

Source§

fn set_enabled(&mut self, enabled: bool)

Source§

fn build_ui(&mut self, _ui: &(dyn Any + 'static))

Source§

fn refresh(&mut self)

Source§

fn data_size(&self) -> usize

Source§

impl Quantity for CurveNodeVectorQuantity

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Source§

fn name(&self) -> &str

Source§

fn structure_name(&self) -> &str

Source§

fn kind(&self) -> QuantityKind

Source§

fn is_enabled(&self) -> bool

Source§

fn set_enabled(&mut self, enabled: bool)

Source§

fn build_ui(&mut self, _ui: &(dyn Any + 'static))

Source§

fn refresh(&mut self)

Source§

fn data_size(&self) -> usize

Source§

impl Quantity for FloatingColorImage

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Source§

fn name(&self) -> &str

Source§

fn structure_name(&self) -> &str

Source§

fn kind(&self) -> QuantityKind

Source§

fn is_enabled(&self) -> bool

Source§

fn set_enabled(&mut self, enabled: bool)

Source§

fn build_ui(&mut self, _ui: &(dyn Any + 'static))

Source§

fn refresh(&mut self)

Source§

fn data_size(&self) -> usize

Source§

impl Quantity for FloatingColorRenderImage

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Source§

fn name(&self) -> &str

Source§

fn structure_name(&self) -> &str

Source§

fn kind(&self) -> QuantityKind

Source§

fn is_enabled(&self) -> bool

Source§

fn set_enabled(&mut self, enabled: bool)

Source§

fn build_ui(&mut self, _ui: &(dyn Any + 'static))

Source§

fn refresh(&mut self)

Source§

fn data_size(&self) -> usize

Source§

impl Quantity for FloatingDepthRenderImage

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Source§

fn name(&self) -> &str

Source§

fn structure_name(&self) -> &str

Source§

fn kind(&self) -> QuantityKind

Source§

fn is_enabled(&self) -> bool

Source§

fn set_enabled(&mut self, enabled: bool)

Source§

fn build_ui(&mut self, _ui: &(dyn Any + 'static))

Source§

fn refresh(&mut self)

Source§

fn data_size(&self) -> usize

Source§

impl Quantity for FloatingRawColorImage

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Source§

fn name(&self) -> &str

Source§

fn structure_name(&self) -> &str

Source§

fn kind(&self) -> QuantityKind

Source§

fn is_enabled(&self) -> bool

Source§

fn set_enabled(&mut self, enabled: bool)

Source§

fn build_ui(&mut self, _ui: &(dyn Any + 'static))

Source§

fn refresh(&mut self)

Source§

fn data_size(&self) -> usize

Source§

impl Quantity for FloatingScalarImage

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Source§

fn name(&self) -> &str

Source§

fn structure_name(&self) -> &str

Source§

fn kind(&self) -> QuantityKind

Source§

fn is_enabled(&self) -> bool

Source§

fn set_enabled(&mut self, enabled: bool)

Source§

fn build_ui(&mut self, _ui: &(dyn Any + 'static))

Source§

fn refresh(&mut self)

Source§

fn data_size(&self) -> usize

Source§

impl Quantity for PointCloudColorQuantity

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Source§

fn name(&self) -> &str

Source§

fn structure_name(&self) -> &str

Source§

fn kind(&self) -> QuantityKind

Source§

fn is_enabled(&self) -> bool

Source§

fn set_enabled(&mut self, enabled: bool)

Source§

fn build_ui(&mut self, _ui: &(dyn Any + 'static))

Source§

fn refresh(&mut self)

Source§

fn data_size(&self) -> usize

Source§

impl Quantity for PointCloudScalarQuantity

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Source§

fn name(&self) -> &str

Source§

fn structure_name(&self) -> &str

Source§

fn kind(&self) -> QuantityKind

Source§

fn is_enabled(&self) -> bool

Source§

fn set_enabled(&mut self, enabled: bool)

Source§

fn build_ui(&mut self, _ui: &(dyn Any + 'static))

Source§

fn refresh(&mut self)

Source§

fn data_size(&self) -> usize

Source§

impl Quantity for PointCloudVectorQuantity

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Source§

fn name(&self) -> &str

Source§

fn structure_name(&self) -> &str

Source§

fn kind(&self) -> QuantityKind

Source§

fn is_enabled(&self) -> bool

Source§

fn set_enabled(&mut self, enabled: bool)

Source§

fn build_ui(&mut self, _ui: &(dyn Any + 'static))

Source§

fn refresh(&mut self)

Source§

fn clear_gpu_resources(&mut self)

Source§

fn data_size(&self) -> usize

Source§

impl Quantity for MeshFaceIntrinsicVectorQuantity

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Source§

fn name(&self) -> &str

Source§

fn structure_name(&self) -> &str

Source§

fn kind(&self) -> QuantityKind

Source§

fn is_enabled(&self) -> bool

Source§

fn set_enabled(&mut self, enabled: bool)

Source§

fn build_ui(&mut self, _ui: &(dyn Any + 'static))

Source§

fn refresh(&mut self)

Source§

fn clear_gpu_resources(&mut self)

Source§

fn data_size(&self) -> usize

Source§

impl Quantity for MeshVertexIntrinsicVectorQuantity

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Source§

fn name(&self) -> &str

Source§

fn structure_name(&self) -> &str

Source§

fn kind(&self) -> QuantityKind

Source§

fn is_enabled(&self) -> bool

Source§

fn set_enabled(&mut self, enabled: bool)

Source§

fn build_ui(&mut self, _ui: &(dyn Any + 'static))

Source§

fn refresh(&mut self)

Source§

fn clear_gpu_resources(&mut self)

Source§

fn data_size(&self) -> usize

Source§

impl Quantity for MeshOneFormQuantity

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Source§

fn name(&self) -> &str

Source§

fn structure_name(&self) -> &str

Source§

fn kind(&self) -> QuantityKind

Source§

fn is_enabled(&self) -> bool

Source§

fn set_enabled(&mut self, enabled: bool)

Source§

fn build_ui(&mut self, _ui: &(dyn Any + 'static))

Source§

fn refresh(&mut self)

Source§

fn clear_gpu_resources(&mut self)

Source§

fn data_size(&self) -> usize

Source§

impl Quantity for MeshCornerParameterizationQuantity

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Source§

fn name(&self) -> &str

Source§

fn structure_name(&self) -> &str

Source§

fn kind(&self) -> QuantityKind

Source§

fn is_enabled(&self) -> bool

Source§

fn set_enabled(&mut self, enabled: bool)

Source§

fn build_ui(&mut self, _ui: &(dyn Any + 'static))

Source§

fn refresh(&mut self)

Source§

fn data_size(&self) -> usize

Source§

impl Quantity for MeshVertexParameterizationQuantity

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Source§

fn name(&self) -> &str

Source§

fn structure_name(&self) -> &str

Source§

fn kind(&self) -> QuantityKind

Source§

fn is_enabled(&self) -> bool

Source§

fn set_enabled(&mut self, enabled: bool)

Source§

fn build_ui(&mut self, _ui: &(dyn Any + 'static))

Source§

fn refresh(&mut self)

Source§

fn data_size(&self) -> usize

Source§

impl Quantity for MeshFaceColorQuantity

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Source§

fn name(&self) -> &str

Source§

fn structure_name(&self) -> &str

Source§

fn kind(&self) -> QuantityKind

Source§

fn is_enabled(&self) -> bool

Source§

fn set_enabled(&mut self, enabled: bool)

Source§

fn build_ui(&mut self, _ui: &(dyn Any + 'static))

Source§

fn refresh(&mut self)

Source§

fn data_size(&self) -> usize

Source§

impl Quantity for MeshFaceScalarQuantity

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Source§

fn name(&self) -> &str

Source§

fn structure_name(&self) -> &str

Source§

fn kind(&self) -> QuantityKind

Source§

fn is_enabled(&self) -> bool

Source§

fn set_enabled(&mut self, enabled: bool)

Source§

fn build_ui(&mut self, _ui: &(dyn Any + 'static))

Source§

fn refresh(&mut self)

Source§

fn data_size(&self) -> usize

Source§

impl Quantity for MeshFaceVectorQuantity

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Source§

fn name(&self) -> &str

Source§

fn structure_name(&self) -> &str

Source§

fn kind(&self) -> QuantityKind

Source§

fn is_enabled(&self) -> bool

Source§

fn set_enabled(&mut self, enabled: bool)

Source§

fn build_ui(&mut self, _ui: &(dyn Any + 'static))

Source§

fn refresh(&mut self)

Source§

fn clear_gpu_resources(&mut self)

Source§

fn data_size(&self) -> usize

Source§

impl Quantity for MeshVertexColorQuantity

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Source§

fn name(&self) -> &str

Source§

fn structure_name(&self) -> &str

Source§

fn kind(&self) -> QuantityKind

Source§

fn is_enabled(&self) -> bool

Source§

fn set_enabled(&mut self, enabled: bool)

Source§

fn build_ui(&mut self, _ui: &(dyn Any + 'static))

Source§

fn refresh(&mut self)

Source§

fn data_size(&self) -> usize

Source§

impl Quantity for MeshVertexScalarQuantity

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Source§

fn name(&self) -> &str

Source§

fn structure_name(&self) -> &str

Source§

fn kind(&self) -> QuantityKind

Source§

fn is_enabled(&self) -> bool

Source§

fn set_enabled(&mut self, enabled: bool)

Source§

fn build_ui(&mut self, _ui: &(dyn Any + 'static))

Source§

fn refresh(&mut self)

Source§

fn data_size(&self) -> usize

Source§

impl Quantity for MeshVertexVectorQuantity

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Source§

fn name(&self) -> &str

Source§

fn structure_name(&self) -> &str

Source§

fn kind(&self) -> QuantityKind

Source§

fn is_enabled(&self) -> bool

Source§

fn set_enabled(&mut self, enabled: bool)

Source§

fn build_ui(&mut self, _ui: &(dyn Any + 'static))

Source§

fn refresh(&mut self)

Source§

fn clear_gpu_resources(&mut self)

Source§

fn data_size(&self) -> usize

Source§

impl Quantity for VolumeGridCellScalarQuantity

Source§

fn name(&self) -> &str

Source§

fn structure_name(&self) -> &str

Source§

fn kind(&self) -> QuantityKind

Source§

fn is_enabled(&self) -> bool

Source§

fn set_enabled(&mut self, enabled: bool)

Source§

fn data_size(&self) -> usize

Source§

fn build_ui(&mut self, _ui: &(dyn Any + 'static))

Source§

fn refresh(&mut self)

Source§

fn clear_gpu_resources(&mut self)

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Source§

impl Quantity for VolumeGridNodeScalarQuantity

Source§

fn name(&self) -> &str

Source§

fn structure_name(&self) -> &str

Source§

fn kind(&self) -> QuantityKind

Source§

fn is_enabled(&self) -> bool

Source§

fn set_enabled(&mut self, enabled: bool)

Source§

fn data_size(&self) -> usize

Source§

fn build_ui(&mut self, _ui: &(dyn Any + 'static))

Source§

fn refresh(&mut self)

Source§

fn clear_gpu_resources(&mut self)

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Source§

impl Quantity for VolumeMeshCellColorQuantity

Source§

fn name(&self) -> &str

Source§

fn structure_name(&self) -> &str

Source§

fn kind(&self) -> QuantityKind

Source§

fn is_enabled(&self) -> bool

Source§

fn set_enabled(&mut self, enabled: bool)

Source§

fn data_size(&self) -> usize

Source§

fn build_ui(&mut self, _ui: &(dyn Any + 'static))

Source§

fn refresh(&mut self)

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Source§

impl Quantity for VolumeMeshVertexColorQuantity

Source§

fn name(&self) -> &str

Source§

fn structure_name(&self) -> &str

Source§

fn kind(&self) -> QuantityKind

Source§

fn is_enabled(&self) -> bool

Source§

fn set_enabled(&mut self, enabled: bool)

Source§

fn data_size(&self) -> usize

Source§

fn build_ui(&mut self, _ui: &(dyn Any + 'static))

Source§

fn refresh(&mut self)

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Source§

impl Quantity for VolumeMeshCellScalarQuantity

Source§

fn name(&self) -> &str

Source§

fn structure_name(&self) -> &str

Source§

fn kind(&self) -> QuantityKind

Source§

fn is_enabled(&self) -> bool

Source§

fn set_enabled(&mut self, enabled: bool)

Source§

fn data_size(&self) -> usize

Source§

fn build_ui(&mut self, _ui: &(dyn Any + 'static))

Source§

fn refresh(&mut self)

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Source§

impl Quantity for VolumeMeshVertexScalarQuantity

Source§

fn name(&self) -> &str

Source§

fn structure_name(&self) -> &str

Source§

fn kind(&self) -> QuantityKind

Source§

fn is_enabled(&self) -> bool

Source§

fn set_enabled(&mut self, enabled: bool)

Source§

fn data_size(&self) -> usize

Source§

fn build_ui(&mut self, _ui: &(dyn Any + 'static))

Source§

fn refresh(&mut self)

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Source§

impl Quantity for VolumeMeshCellVectorQuantity

Source§

fn name(&self) -> &str

Source§

fn structure_name(&self) -> &str

Source§

fn kind(&self) -> QuantityKind

Source§

fn is_enabled(&self) -> bool

Source§

fn set_enabled(&mut self, enabled: bool)

Source§

fn data_size(&self) -> usize

Source§

fn build_ui(&mut self, _ui: &(dyn Any + 'static))

Source§

fn refresh(&mut self)

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Source§

impl Quantity for VolumeMeshVertexVectorQuantity

Source§

fn name(&self) -> &str

Source§

fn structure_name(&self) -> &str

Source§

fn kind(&self) -> QuantityKind

Source§

fn is_enabled(&self) -> bool

Source§

fn set_enabled(&mut self, enabled: bool)

Source§

fn data_size(&self) -> usize

Source§

fn build_ui(&mut self, _ui: &(dyn Any + 'static))

Source§

fn refresh(&mut self)

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Implementors§