Struct boostvoronoi::SyncDiagram
source · pub struct SyncDiagram<F>where
F: OutputType,{ /* private fields */ }
Expand description
Sync version of the boostvoronoi::Diagram struct. This is useful when traversing the diagram in a multi threaded environment.
It also comes in an optional serde
flavor.
Implementations§
source§impl<F> SyncDiagram<F>where
F: OutputType,
impl<F> SyncDiagram<F>where
F: OutputType,
pub fn new( cells: Vec<Cell>, vertices: Vec<Vertex<F>>, edges: Vec<Edge> ) -> SyncDiagram<F>
sourcepub fn edge_rot_next_iterator(
&self,
edge_id: EdgeIndex
) -> EdgeRotNextIterator<'_, F>
pub fn edge_rot_next_iterator( &self, edge_id: EdgeIndex ) -> EdgeRotNextIterator<'_, F>
Returns an edge iterator, the edges will all originate at the same vertex as ‘edge_id’. ‘edge_id’ will be the first edge returned by the iterator.
sourcepub fn edge_rot_next(&self, edge_id: EdgeIndex) -> Result<EdgeIndex, BvError>
pub fn edge_rot_next(&self, edge_id: EdgeIndex) -> Result<EdgeIndex, BvError>
Returns a pointer to the rotation next edge over the starting point of the half-edge.
sourcepub fn edge_rot_prev(&self, edge_id: EdgeIndex) -> Result<EdgeIndex, BvError>
pub fn edge_rot_prev(&self, edge_id: EdgeIndex) -> Result<EdgeIndex, BvError>
Returns a pointer to the rotation previous edge over the starting point of the half-edge.
sourcepub fn edge_get_next(&self, edge_id: EdgeIndex) -> Result<EdgeIndex, BvError>
pub fn edge_get_next(&self, edge_id: EdgeIndex) -> Result<EdgeIndex, BvError>
Returns the next edge or an error
sourcepub fn edge_get_prev(&self, edge_id: EdgeIndex) -> Result<EdgeIndex, BvError>
pub fn edge_get_prev(&self, edge_id: EdgeIndex) -> Result<EdgeIndex, BvError>
Returns the previous edge or an BvError if it does not exist
sourcepub fn edge_get_twin(&self, edge_id: EdgeIndex) -> Result<EdgeIndex, BvError>
pub fn edge_get_twin(&self, edge_id: EdgeIndex) -> Result<EdgeIndex, BvError>
Returns the twin edge or a BvError if it does not exists
sourcepub fn edge_is_finite(&self, edge_id: EdgeIndex) -> Result<bool, BvError>
pub fn edge_is_finite(&self, edge_id: EdgeIndex) -> Result<bool, BvError>
Returns true if the edge is finite (segment, parabolic arc). Returns false if the edge is infinite (ray, line).
sourcepub fn edge_is_infinite(&self, edge_id: EdgeIndex) -> Result<bool, BvError>
pub fn edge_is_infinite(&self, edge_id: EdgeIndex) -> Result<bool, BvError>
Returns true if the edge is infinite (ray, line). Returns false if the edge is finite (segment, parabolic arc).
pub fn edges(&self) -> &Vec<Edge>
pub fn edge_get(&self, edge_id: EdgeIndex) -> Result<&Edge, BvError>
pub fn edge_get_mut(&mut self, edge_id: EdgeIndex) -> Result<&mut Edge, BvError>
sourcepub fn edge_get_vertex0(
&self,
edge_id: EdgeIndex
) -> Result<Option<VertexIndex>, BvError>
pub fn edge_get_vertex0( &self, edge_id: EdgeIndex ) -> Result<Option<VertexIndex>, BvError>
Returns the optional vertex0 of the edge
sourcepub fn edge_get_vertex1(
&self,
edge_id: EdgeIndex
) -> Result<Option<VertexIndex>, BvError>
pub fn edge_get_vertex1( &self, edge_id: EdgeIndex ) -> Result<Option<VertexIndex>, BvError>
Returns the optional vertex1 of the edge
pub fn cell_get(&self, cell_id: CellIndex) -> Result<&Cell, BvError>
sourcepub fn vertex_get(&self, vertex_id: VertexIndex) -> Result<&Vertex<F>, BvError>
pub fn vertex_get(&self, vertex_id: VertexIndex) -> Result<&Vertex<F>, BvError>
Returns a reference to a vertex
sourcepub fn vertex_get_mut(
&mut self,
vertex_id: VertexIndex
) -> Result<&mut Vertex<F>, BvError>
pub fn vertex_get_mut( &mut self, vertex_id: VertexIndex ) -> Result<&mut Vertex<F>, BvError>
Returns a mutable reference to a vertex
Trait Implementations§
source§impl<F> Debug for SyncDiagram<F>where
F: Debug + OutputType,
impl<F> Debug for SyncDiagram<F>where
F: Debug + OutputType,
source§impl<F> Default for SyncDiagram<F>where
F: Default + OutputType,
impl<F> Default for SyncDiagram<F>where
F: Default + OutputType,
source§fn default() -> SyncDiagram<F>
fn default() -> SyncDiagram<F>
source§impl<F> From<Diagram<F>> for SyncDiagram<F>where
F: OutputType,
impl<F> From<Diagram<F>> for SyncDiagram<F>where
F: OutputType,
source§fn from(other: Diagram<F>) -> SyncDiagram<F>
fn from(other: Diagram<F>) -> SyncDiagram<F>
Converts a Diagram
into a SyncDiagram
by dropping the std::cell::Cell
and Rc