mod components;
mod mesh3d_presets;
pub use components::{Face, Transform3D, Vec3D};
#[derive(Debug, Clone)]
pub struct Mesh3D {
pub transform: Transform3D,
pub vertices: Vec<Vec3D>,
pub faces: Vec<Face>,
}
impl Mesh3D {
#[must_use]
pub const fn new(vertices: Vec<Vec3D>, faces: Vec<Face>) -> Self {
Self {
transform: Transform3D::IDENTITY,
vertices,
faces,
}
}
#[must_use]
pub const fn with_transform(mut self, transform: Transform3D) -> Self {
self.transform = transform;
self
}
}