pub struct GeometryStore { /* private fields */ }Expand description
The geometry a model’s topology refers into.
Implementations§
Source§impl GeometryStore
impl GeometryStore
Sourcepub fn add_pcurve(&mut self, curve: PlanarCurve) -> PCurveId
pub fn add_pcurve(&mut self, curve: PlanarCurve) -> PCurveId
Add a curve in parameter space.
Sourcepub fn add_surface(&mut self, surface: SurfaceGeometry) -> SurfaceId
pub fn add_surface(&mut self, surface: SurfaceGeometry) -> SurfaceId
Add a surface.
Sourcepub fn add_triangulation(&mut self, mesh: Triangulation) -> TriangulationId
pub fn add_triangulation(&mut self, mesh: Triangulation) -> TriangulationId
Add a cached triangulation.
Sourcepub fn pcurve(&self, id: PCurveId) -> Option<&PlanarCurve>
pub fn pcurve(&self, id: PCurveId) -> Option<&PlanarCurve>
The parameter-space curve behind id.
Sourcepub fn pcurve_mut(&mut self, id: PCurveId) -> Option<&mut PlanarCurve>
pub fn pcurve_mut(&mut self, id: PCurveId) -> Option<&mut PlanarCurve>
A pcurve, for rewriting in place: an image shifted by whole periods onto its neighbour’s branch is the same curve on the same edge.
Sourcepub fn surface(&self, id: SurfaceId) -> Option<&SurfaceGeometry>
pub fn surface(&self, id: SurfaceId) -> Option<&SurfaceGeometry>
The surface behind id.
Sourcepub fn surface_mut(&mut self, id: SurfaceId) -> Option<&mut SurfaceGeometry>
pub fn surface_mut(&mut self, id: SurfaceId) -> Option<&mut SurfaceGeometry>
A surface, for rewriting in place: a plane or a cylinder widened to hold the trims a file puts on it is the same surface, asked over a wider window.
Sourcepub fn triangulation(&self, id: TriangulationId) -> Option<&Triangulation>
pub fn triangulation(&self, id: TriangulationId) -> Option<&Triangulation>
The cached triangulation behind id.
Sourcepub fn holds(&self, repr: &EdgeRepr) -> bool
pub fn holds(&self, repr: &EdgeRepr) -> bool
Whether every piece of geometry a representation names is held here.
The check a restored model needs: a handle that does not resolve is not a finding, it is a document that does not describe itself.
Sourcepub fn curves(&self) -> impl Iterator<Item = (CurveId, &Curve)>
pub fn curves(&self) -> impl Iterator<Item = (CurveId, &Curve)>
Every space curve, with its handle, in arena order.
Sourcepub fn pcurves(&self) -> impl Iterator<Item = (PCurveId, &PlanarCurve)>
pub fn pcurves(&self) -> impl Iterator<Item = (PCurveId, &PlanarCurve)>
Every parameter-space curve, with its handle, in arena order.
Sourcepub fn surfaces(&self) -> impl Iterator<Item = (SurfaceId, &SurfaceGeometry)>
pub fn surfaces(&self) -> impl Iterator<Item = (SurfaceId, &SurfaceGeometry)>
Every surface, with its handle, in arena order.
Sourcepub fn triangulations(
&self,
) -> impl Iterator<Item = (TriangulationId, &Triangulation)>
pub fn triangulations( &self, ) -> impl Iterator<Item = (TriangulationId, &Triangulation)>
Every cached triangulation, with its handle, in arena order.
Sourcepub fn triangulation_count(&self) -> usize
pub fn triangulation_count(&self) -> usize
How many cached triangulations are held.
Trait Implementations§
Source§impl Clone for GeometryStore
impl Clone for GeometryStore
Source§fn clone(&self) -> GeometryStore
fn clone(&self) -> GeometryStore
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GeometryStore
impl Debug for GeometryStore
Source§impl Default for GeometryStore
impl Default for GeometryStore
Source§fn default() -> GeometryStore
fn default() -> GeometryStore
Auto Trait Implementations§
impl Freeze for GeometryStore
impl RefUnwindSafe for GeometryStore
impl Send for GeometryStore
impl Sync for GeometryStore
impl Unpin for GeometryStore
impl UnsafeUnpin for GeometryStore
impl UnwindSafe for GeometryStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.