Struct centerline::Centerline [−][src]
pub struct Centerline<I1, F1> where
I1: InputType + Neg<Output = I1>,
F1: BaseFloat + Sync + OutputType + Neg<Output = F1>, { pub segments: Vec<Line<I1>>, pub diagram: SyncVoronoiDiagram<I1, F1>, pub lines: Option<Vec<Line3<F1>>>, pub line_strings: Option<Vec<LineString3<F1>>>, // some fields omitted }
Center line calculation object. It: * calculates the segmented voronoi diagram. * Filter out voronoi edges based on the angle to input geometry. * Collects connected edges into line strings and line segments. * Performs line simplification on those line strings.
Fields
segments: Vec<Line<I1>>
the input data to the voronoi diagram
diagram: SyncVoronoiDiagram<I1, F1>
the voronoi diagram itself
lines: Option<Vec<Line3<F1>>>
the individual two-point edges
line_strings: Option<Vec<LineString3<F1>>>
concatenated connected edges
Implementations
impl<I1, F1> Centerline<I1, F1> where
I1: InputType + Neg<Output = I1>,
F1: BaseFloat + Sync + OutputType + Neg<Output = F1>,
[src]
I1: InputType + Neg<Output = I1>,
F1: BaseFloat + Sync + OutputType + Neg<Output = F1>,
pub fn default() -> Self
[src]
Creates a Centerline container with a set of segments
pub fn with_segments(segments: Vec<Line<I1>>) -> Self
[src]
Creates a Centerline container with a set of segments
pub fn build_voronoi(&mut self) -> Result<(), CenterlineError>
[src]
builds the voronoi diagram and filter out infinite edges and other ‘outside’ geometry
pub fn calculate_centerline(
&mut self,
dot_limit: F1,
discrete_limit: F1,
ignored_regions: Option<&Vec<(Aabb2<F1>, LineString2<F1>)>>
) -> Result<(), CenterlineError>
[src]
&mut self,
dot_limit: F1,
discrete_limit: F1,
ignored_regions: Option<&Vec<(Aabb2<F1>, LineString2<F1>)>>
) -> Result<(), CenterlineError>
perform the angle-to-geometry test and filter out some edges. Collect the rest of the edges into connected line-strings and line segments.
pub fn ignored_edges(&self) -> Option<Yabf>
[src]
returns a copy of the ignored edges bit field
pub fn rejected_edges(&self) -> Option<Yabf>
[src]
returns a copy of the rejected edges bit field
pub fn retrieve_point(
&self,
cell_id: VoronoiCellIndex
) -> Result<Point<I1>, CenterlineError>
[src]
&self,
cell_id: VoronoiCellIndex
) -> Result<Point<I1>, CenterlineError>
pub fn retrieve_segment(
&self,
cell_id: VoronoiCellIndex
) -> Result<Line<I1>, CenterlineError>
[src]
&self,
cell_id: VoronoiCellIndex
) -> Result<Line<I1>, CenterlineError>
pub fn diagram(&self) -> &SyncVoronoiDiagram<I1, F1>
[src]
returns a reference to the internal voronoi diagram
pub fn i2f(input: I1) -> F1
[src]
Auto Trait Implementations
impl<I1, F1> RefUnwindSafe for Centerline<I1, F1> where
F1: RefUnwindSafe,
I1: RefUnwindSafe,
F1: RefUnwindSafe,
I1: RefUnwindSafe,
impl<I1, F1> Send for Centerline<I1, F1> where
F1: Send,
I1: Send,
F1: Send,
I1: Send,
impl<I1, F1> Sync for Centerline<I1, F1> where
I1: Sync,
I1: Sync,
impl<I1, F1> Unpin for Centerline<I1, F1> where
F1: Unpin,
I1: Unpin,
F1: Unpin,
I1: Unpin,
impl<I1, F1> UnwindSafe for Centerline<I1, F1> where
F1: UnwindSafe,
I1: UnwindSafe,
F1: UnwindSafe,
I1: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,