pub struct Triangulator<K: RTreeNum, PC: KeyedCollection = Vec<Polygon<K, FaceId>>, PR: KeyedCollection = AsRefRTree<GeomWithData<Rectangle<[K; 2]>, usize>>, UFPC = Vec<usize>, UFRC = Vec<usize>, VC = StableVec<Vertex<VertexWeight<K>>>, HEC = StableVec<HalfEdge<HalfEdgeWeight>>, FC = StableVec<Face<FaceWeight>>, ER = AsRefRTree<GeomWithData<Rectangle<[K; 2]>, EdgeId>>, FR = AsRefRTree<GeomWithData<Rectangle<[K; 2]>, FaceId>>> { /* private fields */ }Implementations§
Source§impl<K: FromPrimitive + RTreeNum + ToPrimitive + Hash + Ord + Eq, PC: Clone + IntoIter<usize> + Get<usize, Value = Polygon<K, FaceId>> + Default + Push<usize> + Set<usize>, PR: AsRef<RTree<GeomWithData<Rectangle<[K; 2]>, usize>>> + Default + Insert<GeomWithData<Rectangle<[K; 2]>, usize>, Value = ()>, UFPC: Get<usize, Value = usize> + Insert<usize, Value = usize> + Default + Push<usize> + Set<usize>, UFRC: Get<usize, Value = usize> + Insert<usize, Value = usize> + Default + Push<usize> + Set<usize>, VC: Get<usize, Value = Vertex<VertexWeight<K>>> + Default + Insert<usize> + KeyedCollection + Push<usize> + StableRemove<usize>, HEC: Get<usize, Value = HalfEdge<HalfEdgeWeight>> + Default + Insert<usize> + KeyedCollection + Push<usize> + StableRemove<usize>, FC: Get<usize, Value = Face<FaceWeight>> + Default + Insert<usize> + KeyedCollection + Push<usize> + StableRemove<usize>, ER: AsRef<RTree<GeomWithData<Rectangle<[K; 2]>, EdgeId>>> + Get<GeomWithData<Rectangle<[K; 2]>, EdgeId>, Value = ()> + Default + Insert<GeomWithData<Rectangle<[K; 2]>, EdgeId>> + Remove<GeomWithData<Rectangle<[K; 2]>, EdgeId>> + KeyedCollection, FR: AsRef<RTree<GeomWithData<Rectangle<[K; 2]>, FaceId>>> + Get<GeomWithData<Rectangle<[K; 2]>, FaceId>, Value = ()> + Default + Insert<GeomWithData<Rectangle<[K; 2]>, FaceId>> + Remove<GeomWithData<Rectangle<[K; 2]>, FaceId>> + KeyedCollection> Triangulator<K, PC, PR, UFPC, UFRC, VC, HEC, FC, ER, FR>
impl<K: FromPrimitive + RTreeNum + ToPrimitive + Hash + Ord + Eq, PC: Clone + IntoIter<usize> + Get<usize, Value = Polygon<K, FaceId>> + Default + Push<usize> + Set<usize>, PR: AsRef<RTree<GeomWithData<Rectangle<[K; 2]>, usize>>> + Default + Insert<GeomWithData<Rectangle<[K; 2]>, usize>, Value = ()>, UFPC: Get<usize, Value = usize> + Insert<usize, Value = usize> + Default + Push<usize> + Set<usize>, UFRC: Get<usize, Value = usize> + Insert<usize, Value = usize> + Default + Push<usize> + Set<usize>, VC: Get<usize, Value = Vertex<VertexWeight<K>>> + Default + Insert<usize> + KeyedCollection + Push<usize> + StableRemove<usize>, HEC: Get<usize, Value = HalfEdge<HalfEdgeWeight>> + Default + Insert<usize> + KeyedCollection + Push<usize> + StableRemove<usize>, FC: Get<usize, Value = Face<FaceWeight>> + Default + Insert<usize> + KeyedCollection + Push<usize> + StableRemove<usize>, ER: AsRef<RTree<GeomWithData<Rectangle<[K; 2]>, EdgeId>>> + Get<GeomWithData<Rectangle<[K; 2]>, EdgeId>, Value = ()> + Default + Insert<GeomWithData<Rectangle<[K; 2]>, EdgeId>> + Remove<GeomWithData<Rectangle<[K; 2]>, EdgeId>> + KeyedCollection, FR: AsRef<RTree<GeomWithData<Rectangle<[K; 2]>, FaceId>>> + Get<GeomWithData<Rectangle<[K; 2]>, FaceId>, Value = ()> + Default + Insert<GeomWithData<Rectangle<[K; 2]>, FaceId>> + Remove<GeomWithData<Rectangle<[K; 2]>, FaceId>> + KeyedCollection> Triangulator<K, PC, PR, UFPC, UFRC, VC, HEC, FC, ER, FR>
pub fn new() -> Self
pub fn insert_free_vertex(&mut self, position: [K; 2]) -> VertexId
pub fn insert_free_vertex_in_obstacle( &mut self, obstacle: usize, position: [K; 2], ) -> VertexId
pub fn insert_free_vertex_in_face( &mut self, face: FaceId, position: [K; 2], ) -> VertexId
pub fn insert_obstacle( &mut self, vertices: impl IntoIterator<Item = [K; 2]>, ) -> usize
pub fn insert_obstacles( &mut self, obstacles: impl IntoIterator<Item = impl IntoIterator<Item = [K; 2]>>, ) -> impl IntoIterator<Item = usize>
pub fn obstacles(&mut self) -> impl Iterator<Item = &Polygon<K, FaceId>>
pub fn triangulation(&self) -> &Triangulation<K, VC, HEC, FC, ER, FR>
pub fn bounding_rectangle(&mut self) -> [[K; 2]; 4]
Source§impl<K: FromPrimitive + RTreeNum + ToPrimitive + Hash + Ord + Eq, PC: Clear + Clone + IntoIter<usize> + Get<usize, Value = Polygon<K, FaceId>> + Default + Push<usize> + Set<usize>, PR: Clear + AsRef<RTree<GeomWithData<Rectangle<[K; 2]>, usize>>> + Default + Insert<GeomWithData<Rectangle<[K; 2]>, usize>, Value = ()>, UFPC: Clear + Get<usize, Value = usize> + Insert<usize, Value = usize> + Default + Push<usize> + Set<usize>, UFRC: Clear + Get<usize, Value = usize> + Insert<usize, Value = usize> + Default + Push<usize> + Set<usize>, VC: Clear + Get<usize, Value = Vertex<VertexWeight<K>>> + Default + Insert<usize> + KeyedCollection + Push<usize> + StableRemove<usize>, HEC: Clear + Get<usize, Value = HalfEdge<HalfEdgeWeight>> + Default + Insert<usize> + KeyedCollection + Push<usize> + StableRemove<usize>, FC: Clear + Get<usize, Value = Face<FaceWeight>> + Default + Insert<usize> + KeyedCollection + Push<usize> + StableRemove<usize>, ER: Clear + AsRef<RTree<GeomWithData<Rectangle<[K; 2]>, EdgeId>>> + Get<GeomWithData<Rectangle<[K; 2]>, EdgeId>, Value = ()> + Default + Insert<GeomWithData<Rectangle<[K; 2]>, EdgeId>> + Remove<GeomWithData<Rectangle<[K; 2]>, EdgeId>> + KeyedCollection, FR: Clear + AsRef<RTree<GeomWithData<Rectangle<[K; 2]>, FaceId>>> + Get<GeomWithData<Rectangle<[K; 2]>, FaceId>, Value = ()> + Default + Insert<GeomWithData<Rectangle<[K; 2]>, FaceId>> + Remove<GeomWithData<Rectangle<[K; 2]>, FaceId>> + KeyedCollection> Triangulator<K, PC, PR, UFPC, UFRC, VC, HEC, FC, ER, FR>
impl<K: FromPrimitive + RTreeNum + ToPrimitive + Hash + Ord + Eq, PC: Clear + Clone + IntoIter<usize> + Get<usize, Value = Polygon<K, FaceId>> + Default + Push<usize> + Set<usize>, PR: Clear + AsRef<RTree<GeomWithData<Rectangle<[K; 2]>, usize>>> + Default + Insert<GeomWithData<Rectangle<[K; 2]>, usize>, Value = ()>, UFPC: Clear + Get<usize, Value = usize> + Insert<usize, Value = usize> + Default + Push<usize> + Set<usize>, UFRC: Clear + Get<usize, Value = usize> + Insert<usize, Value = usize> + Default + Push<usize> + Set<usize>, VC: Clear + Get<usize, Value = Vertex<VertexWeight<K>>> + Default + Insert<usize> + KeyedCollection + Push<usize> + StableRemove<usize>, HEC: Clear + Get<usize, Value = HalfEdge<HalfEdgeWeight>> + Default + Insert<usize> + KeyedCollection + Push<usize> + StableRemove<usize>, FC: Clear + Get<usize, Value = Face<FaceWeight>> + Default + Insert<usize> + KeyedCollection + Push<usize> + StableRemove<usize>, ER: Clear + AsRef<RTree<GeomWithData<Rectangle<[K; 2]>, EdgeId>>> + Get<GeomWithData<Rectangle<[K; 2]>, EdgeId>, Value = ()> + Default + Insert<GeomWithData<Rectangle<[K; 2]>, EdgeId>> + Remove<GeomWithData<Rectangle<[K; 2]>, EdgeId>> + KeyedCollection, FR: Clear + AsRef<RTree<GeomWithData<Rectangle<[K; 2]>, FaceId>>> + Get<GeomWithData<Rectangle<[K; 2]>, FaceId>, Value = ()> + Default + Insert<GeomWithData<Rectangle<[K; 2]>, FaceId>> + Remove<GeomWithData<Rectangle<[K; 2]>, FaceId>> + KeyedCollection> Triangulator<K, PC, PR, UFPC, UFRC, VC, HEC, FC, ER, FR>
pub fn insert_obstacle_and_rebuild( &mut self, obstacle: impl IntoIterator<Item = [K; 2]>, superpolygon: impl IntoIterator<Item = [K; 2]>, ) -> usize
pub fn insert_obstacles_and_rebuild( &mut self, obstacles: impl IntoIterator<Item = impl IntoIterator<Item = [K; 2]>>, superpolygon: impl IntoIterator<Item = [K; 2]>, ) -> impl IntoIterator<Item = usize>
Trait Implementations§
Source§impl<K: RTreeNum, PCD: Clone + KeyedCollection, PC: Clone + KeyedCollection + ApplyDelta<PCD>, PRD: Clone + KeyedCollection, PR: Clone + KeyedCollection + ApplyDelta<PRD>, UFPCD: Clone + KeyedCollection, UFPC: Clone + KeyedCollection + ApplyDelta<UFPCD>, UFRCD: Clone + KeyedCollection, UFRC: Clone + KeyedCollection + ApplyDelta<UFRCD>, VCD: Clone + KeyedCollection, VC: Clone + KeyedCollection + ApplyDelta<VCD>, HECD: Clone + KeyedCollection, HEC: Clone + KeyedCollection + ApplyDelta<HECD>, FCD: Clone + KeyedCollection, FC: Clone + KeyedCollection + ApplyDelta<FCD>, ERD: Clone + KeyedCollection, ER: Clone + KeyedCollection + ApplyDelta<ERD>, FRD: Clone + KeyedCollection, FR: Clone + KeyedCollection + ApplyDelta<FRD>> ApplyDelta<Triangulator<K, PCD, PRD, UFPCD, UFRCD, VCD, HECD, FCD, ERD, FRD>> for Triangulator<K, PC, PR, UFPC, UFRC, VC, HEC, FC, ER, FR>
Available on crate feature undoredo only.
impl<K: RTreeNum, PCD: Clone + KeyedCollection, PC: Clone + KeyedCollection + ApplyDelta<PCD>, PRD: Clone + KeyedCollection, PR: Clone + KeyedCollection + ApplyDelta<PRD>, UFPCD: Clone + KeyedCollection, UFPC: Clone + KeyedCollection + ApplyDelta<UFPCD>, UFRCD: Clone + KeyedCollection, UFRC: Clone + KeyedCollection + ApplyDelta<UFRCD>, VCD: Clone + KeyedCollection, VC: Clone + KeyedCollection + ApplyDelta<VCD>, HECD: Clone + KeyedCollection, HEC: Clone + KeyedCollection + ApplyDelta<HECD>, FCD: Clone + KeyedCollection, FC: Clone + KeyedCollection + ApplyDelta<FCD>, ERD: Clone + KeyedCollection, ER: Clone + KeyedCollection + ApplyDelta<ERD>, FRD: Clone + KeyedCollection, FR: Clone + KeyedCollection + ApplyDelta<FRD>> ApplyDelta<Triangulator<K, PCD, PRD, UFPCD, UFRCD, VCD, HECD, FCD, ERD, FRD>> for Triangulator<K, PC, PR, UFPC, UFRC, VC, HEC, FC, ER, FR>
Available on crate feature
undoredo only.Source§fn apply_delta(
&mut self,
delta: &Delta<Triangulator<K, PCD, PRD, UFPCD, UFRCD, VCD, HECD, FCD, ERD, FRD>>,
)
fn apply_delta( &mut self, delta: &Delta<Triangulator<K, PCD, PRD, UFPCD, UFRCD, VCD, HECD, FCD, ERD, FRD>>, )
Apply the changes in an delta to a collection. Read more
Source§impl<K: Clone + RTreeNum, PC: Clone + KeyedCollection, PR: Clone + KeyedCollection, UFPC: Clone, UFRC: Clone, VC: Clone, HEC: Clone, FC: Clone, ER: Clone, FR: Clone> Clone for Triangulator<K, PC, PR, UFPC, UFRC, VC, HEC, FC, ER, FR>
impl<K: Clone + RTreeNum, PC: Clone + KeyedCollection, PR: Clone + KeyedCollection, UFPC: Clone, UFRC: Clone, VC: Clone, HEC: Clone, FC: Clone, ER: Clone, FR: Clone> Clone for Triangulator<K, PC, PR, UFPC, UFRC, VC, HEC, FC, ER, FR>
Source§fn clone(&self) -> Triangulator<K, PC, PR, UFPC, UFRC, VC, HEC, FC, ER, FR>
fn clone(&self) -> Triangulator<K, PC, PR, UFPC, UFRC, VC, HEC, FC, ER, FR>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<K: Debug + RTreeNum, PC: Debug + KeyedCollection, PR: Debug + KeyedCollection, UFPC: Debug, UFRC: Debug, VC: Debug, HEC: Debug, FC: Debug, ER: Debug, FR: Debug> Debug for Triangulator<K, PC, PR, UFPC, UFRC, VC, HEC, FC, ER, FR>
impl<K: Debug + RTreeNum, PC: Debug + KeyedCollection, PR: Debug + KeyedCollection, UFPC: Debug, UFRC: Debug, VC: Debug, HEC: Debug, FC: Debug, ER: Debug, FR: Debug> Debug for Triangulator<K, PC, PR, UFPC, UFRC, VC, HEC, FC, ER, FR>
Source§impl<K: RTreeNum, PCD: Clone + KeyedCollection, PC: Clone + KeyedCollection + FlushDelta<PCD>, PRD: Clone + KeyedCollection, PR: Clone + KeyedCollection + FlushDelta<PRD>, UFPCD: Clone + KeyedCollection, UFPC: Clone + KeyedCollection + FlushDelta<UFPCD>, UFRCD: Clone + KeyedCollection, UFRC: Clone + KeyedCollection + FlushDelta<UFRCD>, VCD: Clone + KeyedCollection, VC: Clone + KeyedCollection + FlushDelta<VCD>, HECD: Clone + KeyedCollection, HEC: Clone + KeyedCollection + FlushDelta<HECD>, FCD: Clone + KeyedCollection, FC: Clone + KeyedCollection + FlushDelta<FCD>, ERD: Clone + KeyedCollection, ER: Clone + KeyedCollection + FlushDelta<ERD>, FRD: Clone + KeyedCollection, FR: Clone + KeyedCollection + FlushDelta<FRD>> FlushDelta<Triangulator<K, PCD, PRD, UFPCD, UFRCD, VCD, HECD, FCD, ERD, FRD>> for Triangulator<K, PC, PR, UFPC, UFRC, VC, HEC, FC, ER, FR>
Available on crate feature undoredo only.
impl<K: RTreeNum, PCD: Clone + KeyedCollection, PC: Clone + KeyedCollection + FlushDelta<PCD>, PRD: Clone + KeyedCollection, PR: Clone + KeyedCollection + FlushDelta<PRD>, UFPCD: Clone + KeyedCollection, UFPC: Clone + KeyedCollection + FlushDelta<UFPCD>, UFRCD: Clone + KeyedCollection, UFRC: Clone + KeyedCollection + FlushDelta<UFRCD>, VCD: Clone + KeyedCollection, VC: Clone + KeyedCollection + FlushDelta<VCD>, HECD: Clone + KeyedCollection, HEC: Clone + KeyedCollection + FlushDelta<HECD>, FCD: Clone + KeyedCollection, FC: Clone + KeyedCollection + FlushDelta<FCD>, ERD: Clone + KeyedCollection, ER: Clone + KeyedCollection + FlushDelta<ERD>, FRD: Clone + KeyedCollection, FR: Clone + KeyedCollection + FlushDelta<FRD>> FlushDelta<Triangulator<K, PCD, PRD, UFPCD, UFRCD, VCD, HECD, FCD, ERD, FRD>> for Triangulator<K, PC, PR, UFPC, UFRC, VC, HEC, FC, ER, FR>
Available on crate feature
undoredo only.Source§fn flush_delta(
&mut self,
) -> Delta<Triangulator<K, PCD, PRD, UFPCD, UFRCD, VCD, HECD, FCD, ERD, FRD>>
fn flush_delta( &mut self, ) -> Delta<Triangulator<K, PCD, PRD, UFPCD, UFRCD, VCD, HECD, FCD, ERD, FRD>>
Flush the recorder, returning the recorded delta and replacing it with a
new empty one.
Auto Trait Implementations§
impl<K, PC, PR, UFPC, UFRC, VC, HEC, FC, ER, FR> Freeze for Triangulator<K, PC, PR, UFPC, UFRC, VC, HEC, FC, ER, FR>
impl<K, PC, PR, UFPC, UFRC, VC, HEC, FC, ER, FR> RefUnwindSafe for Triangulator<K, PC, PR, UFPC, UFRC, VC, HEC, FC, ER, FR>where
PC: RefUnwindSafe,
PR: RefUnwindSafe,
UFPC: RefUnwindSafe,
UFRC: RefUnwindSafe,
K: RefUnwindSafe,
ER: RefUnwindSafe,
FR: RefUnwindSafe,
VC: RefUnwindSafe,
HEC: RefUnwindSafe,
FC: RefUnwindSafe,
impl<K, PC, PR, UFPC, UFRC, VC, HEC, FC, ER, FR> Send for Triangulator<K, PC, PR, UFPC, UFRC, VC, HEC, FC, ER, FR>
impl<K, PC, PR, UFPC, UFRC, VC, HEC, FC, ER, FR> Sync for Triangulator<K, PC, PR, UFPC, UFRC, VC, HEC, FC, ER, FR>
impl<K, PC, PR, UFPC, UFRC, VC, HEC, FC, ER, FR> Unpin for Triangulator<K, PC, PR, UFPC, UFRC, VC, HEC, FC, ER, FR>
impl<K, PC, PR, UFPC, UFRC, VC, HEC, FC, ER, FR> UnsafeUnpin for Triangulator<K, PC, PR, UFPC, UFRC, VC, HEC, FC, ER, FR>where
PC: UnsafeUnpin,
PR: UnsafeUnpin,
UFPC: UnsafeUnpin,
UFRC: UnsafeUnpin,
ER: UnsafeUnpin,
FR: UnsafeUnpin,
VC: UnsafeUnpin,
HEC: UnsafeUnpin,
FC: UnsafeUnpin,
impl<K, PC, PR, UFPC, UFRC, VC, HEC, FC, ER, FR> UnwindSafe for Triangulator<K, PC, PR, UFPC, UFRC, VC, HEC, FC, ER, FR>where
PC: UnwindSafe,
PR: UnwindSafe,
UFPC: UnwindSafe,
UFRC: UnwindSafe,
K: UnwindSafe,
ER: UnwindSafe,
FR: UnwindSafe,
VC: UnwindSafe,
HEC: UnwindSafe,
FC: UnwindSafe,
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
Mutably borrows from an owned value. Read more