mirror of
https://github.com/hannobraun/Fornjot
synced 2025-01-18 22:26:09 +00:00
Add Surfaces
This commit is contained in:
parent
e02c595247
commit
c1972f618c
@ -83,8 +83,6 @@ mod solid;
|
||||
mod surface;
|
||||
mod vertex;
|
||||
|
||||
use crate::storage::Store;
|
||||
|
||||
pub use self::{
|
||||
curve::{Curve, GlobalCurve},
|
||||
cycle::Cycle,
|
||||
@ -97,6 +95,8 @@ pub use self::{
|
||||
vertex::{GlobalVertex, SurfaceVertex, Vertex},
|
||||
};
|
||||
|
||||
use crate::storage::{Handle, Store};
|
||||
|
||||
/// The available object stores
|
||||
///
|
||||
/// # Implementation Note
|
||||
@ -117,7 +117,7 @@ pub struct Objects {
|
||||
pub global_vertices: Store<GlobalVertex>,
|
||||
|
||||
/// Store for surfaces
|
||||
pub surfaces: Store<Surface>,
|
||||
pub surfaces: Surfaces,
|
||||
}
|
||||
|
||||
impl Objects {
|
||||
@ -126,3 +126,16 @@ impl Objects {
|
||||
Self::default()
|
||||
}
|
||||
}
|
||||
|
||||
/// The store for [`Surface`]s
|
||||
#[derive(Debug, Default)]
|
||||
pub struct Surfaces {
|
||||
store: Store<Surface>,
|
||||
}
|
||||
|
||||
impl Surfaces {
|
||||
/// Insert a surface into the store
|
||||
pub fn insert(&self, surface: Surface) -> Handle<Surface> {
|
||||
self.store.insert(surface)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user