use std::num::NonZeroUsize;
use serde::{Deserialize, Serialize};
use usage_types::full_shape::FullShape;
mod air;
pub use air::Air;
#[cfg(feature = "bevy")]
pub mod bevy;
#[cfg(feature = "bevy")]
pub use bevy::mesh::Transparent;
pub mod display;
pub mod prelude;
pub mod modify;
pub mod construct;
pub mod usage_types;
pub mod retrieve;
pub type DefinedShape = Vec<NonZeroUsize>;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct VectorGrid<ItemType> {
defined_shape: DefinedShape,
items: Vec<ItemType>
}
impl<ItemType> VectorGrid<ItemType> {
pub fn shape(&self) -> FullShape {
FullShape { defined: self.defined_shape.clone(), total_length: self.items.len() }
}
pub fn defined_shape(&self) -> &DefinedShape {
&self.defined_shape
}
pub fn defined_shape_usize(&self) -> Vec<usize> {
self.defined_shape.iter().map(|v| {v.get()}).collect()
}
pub fn defined_shape_isize(&self) -> Vec<isize> {
self.defined_shape.iter().map(|v| {v.get() as isize}).collect()
}
pub fn defined_shape_i32(&self) -> Vec<i32> {
self.defined_shape.iter().map(|v| {v.get() as i32}).collect()
}
pub fn items(&self) -> &Vec<ItemType> {
&self.items
}
}