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,

source

pub fn new( cells: Vec<Cell>, vertices: Vec<Vertex<F>>, edges: Vec<Edge> ) -> SyncDiagram<F>

source

pub fn cells(&self) -> &Vec<Cell>

Returns a reference to the list of cells

source

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.

source

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.

source

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.

source

pub fn edge_get_next(&self, edge_id: EdgeIndex) -> Result<EdgeIndex, BvError>

Returns the next edge or an error

source

pub fn edge_get_prev(&self, edge_id: EdgeIndex) -> Result<EdgeIndex, BvError>

Returns the previous edge or an BvError if it does not exist

source

pub fn edge_get_twin(&self, edge_id: EdgeIndex) -> Result<EdgeIndex, BvError>

Returns the twin edge or a BvError if it does not exists

source

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).

source

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).

source

pub fn edges(&self) -> &Vec<Edge>

source

pub fn edge_get(&self, edge_id: EdgeIndex) -> Result<&Edge, BvError>

source

pub fn edge_get_mut(&mut self, edge_id: EdgeIndex) -> Result<&mut Edge, BvError>

source

pub fn edge_get_vertex0( &self, edge_id: EdgeIndex ) -> Result<Option<VertexIndex>, BvError>

Returns the optional vertex0 of the edge

source

pub fn edge_get_vertex1( &self, edge_id: EdgeIndex ) -> Result<Option<VertexIndex>, BvError>

Returns the optional vertex1 of the edge

source

pub fn cell_get(&self, cell_id: CellIndex) -> Result<&Cell, BvError>

source

pub fn vertices(&self) -> &Vec<Vertex<F>>

Returns a reference to all of the vertices

source

pub fn vertex_get(&self, vertex_id: VertexIndex) -> Result<&Vertex<F>, BvError>

Returns a reference to a vertex

source

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,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<F> Default for SyncDiagram<F>
where F: Default + OutputType,

source§

fn default() -> SyncDiagram<F>

Returns the “default value” for a type. Read more
source§

impl<F> From<Diagram<F>> for SyncDiagram<F>
where F: OutputType,

source§

fn from(other: Diagram<F>) -> SyncDiagram<F>

Converts a Diagram into a SyncDiagram by dropping the std::cell::Cell and Rc

Auto Trait Implementations§

§

impl<F> RefUnwindSafe for SyncDiagram<F>
where F: RefUnwindSafe,

§

impl<F> Send for SyncDiagram<F>
where F: Send,

§

impl<F> Sync for SyncDiagram<F>

§

impl<F> Unpin for SyncDiagram<F>

§

impl<F> UnwindSafe for SyncDiagram<F>
where F: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.