Struct boostvoronoi::Cell
source · pub struct Cell { /* private fields */ }
Expand description
Represents a Voronoi cell.
Data members:
- index of the source within the initial input set
- id of the incident edge
- mutable color member Cell may contain point or segment site inside.
Implementations§
source§impl Cell
impl Cell
pub fn new(id: CellIndex, source_index: usize, source_category: u32) -> Cell
pub fn source_category(&self) -> SourceCategory
sourcepub fn contains_point(&self) -> bool
pub fn contains_point(&self) -> bool
Returns true if the cell contains point site, false else.
sourcepub fn contains_segment(&self) -> bool
pub fn contains_segment(&self) -> bool
Returns true if the cell contains segment site, false otherwise.
sourcepub fn contains_segment_startpoint(&self) -> bool
pub fn contains_segment_startpoint(&self) -> bool
Returns true if the cell contains segment start point, false otherwise.
sourcepub fn contains_segment_endpoint(&self) -> bool
pub fn contains_segment_endpoint(&self) -> bool
Returns true if the cell contains segment end point, false otherwise.
pub fn id(&self) -> CellIndex
sourcepub fn source_index(&self) -> usize
pub fn source_index(&self) -> usize
Returns the origin index of the cell.
sourcepub fn source_index_2(&self) -> (usize, SourceCategory)
pub fn source_index_2(&self) -> (usize, SourceCategory)
Returns the origin index of the point that created this cell. It also returns the source category
sourcepub fn is_degenerate(&self) -> bool
pub fn is_degenerate(&self) -> bool
Degenerate cells don’t have any incident edges.
sourcepub fn get_incident_edge(&self) -> Option<EdgeIndex>
pub fn get_incident_edge(&self) -> Option<EdgeIndex>
returns a random edge defined by this cell.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Cell
impl Send for Cell
impl Sync for Cell
impl Unpin for Cell
impl UnwindSafe for Cell
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