Struct boostvoronoi::Edge
source · pub struct Edge { /* private fields */ }
Expand description
Half-edge data structure. Represents a Voronoi edge.
Data members:
- id of the corresponding cell
- id of to the vertex that is the starting point of the half-edge (optional)
- id of to the twin edge
- id of of the CCW next edge
- id of to the CCW prev edge
- mutable color member
Implementations§
source§impl Edge
impl Edge
sourcepub fn cell(&self) -> Result<CellIndex, BvError>
pub fn cell(&self) -> Result<CellIndex, BvError>
Returns the cell index of this edge, or a BvError
sourcepub fn vertex0(&self) -> Option<VertexIndex>
pub fn vertex0(&self) -> Option<VertexIndex>
Returns vertex0, it is perfectly ok for an edge to not contain a vertex0 so no Result<..> is needed here.
sourcepub fn next(&self) -> Result<EdgeIndex, BvError>
pub fn next(&self) -> Result<EdgeIndex, BvError>
returns the next edge (counter clockwise winding) or an error
sourcepub fn prev(&self) -> Result<EdgeIndex, BvError>
pub fn prev(&self) -> Result<EdgeIndex, BvError>
returns the previous edge (counter clockwise winding)
sourcepub fn is_linear(&self) -> bool
pub fn is_linear(&self) -> bool
Returns true if the edge is linear (segment, ray, line). Returns false if the edge is curved (parabolic arc).
sourcepub fn is_curved(&self) -> bool
pub fn is_curved(&self) -> bool
Returns true if the edge is curved (parabolic arc). Returns false if the edge is linear (segment, ray, line).
sourcepub fn is_primary(&self) -> bool
pub fn is_primary(&self) -> bool
Returns false if edge goes through the endpoint of the segment. Returns true else.
sourcepub fn is_secondary(&self) -> bool
pub fn is_secondary(&self) -> bool
Returns true if edge goes through the endpoint of the segment. Returns false else.
sourcepub fn get_color(&self) -> u32
pub fn get_color(&self) -> u32
get_color returns the custom edge info. (does not contain the reserved bits)