mirror of https://github.com/hannobraun/Fornjot
parent
d1d1f6d561
commit
9cded04202
|
@ -4,7 +4,7 @@ use crate::objects::{Curve, Cycle, Edge, Face, Surface, Vertex};
|
||||||
|
|
||||||
use super::{
|
use super::{
|
||||||
stores::{Store, Stores},
|
stores::{Store, Stores},
|
||||||
Handle, Iter, Object, Update,
|
Handle, Iter, Object,
|
||||||
};
|
};
|
||||||
|
|
||||||
/// The boundary representation of a shape
|
/// The boundary representation of a shape
|
||||||
|
@ -144,14 +144,6 @@ impl Shape {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Update objects in the shape
|
|
||||||
///
|
|
||||||
/// Returns [`Update`], and API that can be used to update objects in the
|
|
||||||
/// shape.
|
|
||||||
pub fn update(&mut self) -> Update {
|
|
||||||
Update::new(&mut self.stores)
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Access an iterator over all curves
|
/// Access an iterator over all curves
|
||||||
///
|
///
|
||||||
/// The caller must not make any assumptions about the order of curves.
|
/// The caller must not make any assumptions about the order of curves.
|
||||||
|
|
|
@ -8,10 +8,6 @@ pub struct Update<'r> {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'r> Update<'r> {
|
impl<'r> Update<'r> {
|
||||||
pub(super) fn new(stores: &'r mut Stores) -> Self {
|
|
||||||
Self { stores }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Update all objects of a specific type
|
/// Update all objects of a specific type
|
||||||
pub fn update_all<T: Object>(self, f: impl FnMut(&mut T)) -> Self {
|
pub fn update_all<T: Object>(self, f: impl FnMut(&mut T)) -> Self {
|
||||||
self.stores.get::<T>().update(f);
|
self.stores.get::<T>().update(f);
|
||||||
|
|
Loading…
Reference in New Issue