use std::any::Any;
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum QuantityKind {
Scalar,
Vector,
Color,
Parameterization,
Other,
}
pub trait Quantity: Any + Send + Sync {
fn as_any(&self) -> &dyn Any;
fn as_any_mut(&mut self) -> &mut dyn Any;
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 std::any::Any);
fn refresh(&mut self);
fn data_size(&self) -> usize;
fn clear_gpu_resources(&mut self) {
}
}
pub trait VertexQuantity: Quantity {}
pub trait FaceQuantity: Quantity {}
pub trait EdgeQuantity: Quantity {}
pub trait CellQuantity: Quantity {}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
pub enum ParamVizStyle {
#[default]
Checker,
Grid,
LocalCheck,
LocalRad,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
pub enum ParamCoordsType {
#[default]
Unit,
World,
}