Struct centerline::Centerline [−][src]
pub struct Centerline<I, F> where
I: InputType + Neg<Output = I>,
F: BaseFloat + Sync + OutputType + Neg<Output = F>, { pub segments: Vec<Line<I>>, pub diagram: SyncDiagram<I, F>, pub lines: Option<Vec<Line3<F>>>, pub line_strings: Option<Vec<LineString3<F>>>, // some fields omitted }
Expand description
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<I>>
the input data to the voronoi diagram
diagram: SyncDiagram<I, F>
the voronoi diagram itself
lines: Option<Vec<Line3<F>>>
the individual two-point edges
line_strings: Option<Vec<LineString3<F>>>
concatenated connected edges
Implementations
impl<I, F> Centerline<I, F> where
I: InputType + Neg<Output = I>,
F: BaseFloat + Sync + OutputType + Neg<Output = F>,
impl<I, F> Centerline<I, F> where
I: InputType + Neg<Output = I>,
F: BaseFloat + Sync + OutputType + Neg<Output = F>,
Creates a Centerline container with a set of segments
builds the voronoi diagram and filter out infinite edges and other ‘outside’ geometry
pub fn calculate_centerline(
&mut self,
cos_angle: F,
discrete_limit: F,
ignored_regions: Option<&Vec<(Aabb2<F>, LineString2<F>)>>
) -> Result<(), CenterlineError>
pub fn calculate_centerline(
&mut self,
cos_angle: F,
discrete_limit: F,
ignored_regions: Option<&Vec<(Aabb2<F>, LineString2<F>)>>
) -> 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 calculate_centerline_mesh(
&mut self,
discrete_limit: F,
ignored_regions: Option<&Vec<(Aabb2<F>, LineString2<F>)>>
) -> Result<(), CenterlineError>
pub fn calculate_centerline_mesh(
&mut self,
discrete_limit: F,
ignored_regions: Option<&Vec<(Aabb2<F>, LineString2<F>)>>
) -> Result<(), CenterlineError>
Collects lines and linestrings from the centerline. This version of calculate_centerline() tries to keep as many edges as possible. The intention is to use the data for mesh generation. TODO: make this return a true mesh
returns a copy of the ignored edges bit field
returns a copy of the rejected edges bit field
returns a reference to the internal voronoi diagram
Auto Trait Implementations
impl<I, F> RefUnwindSafe for Centerline<I, F> where
F: RefUnwindSafe,
I: RefUnwindSafe,
impl<I, F> Send for Centerline<I, F> where
F: Send,
I: Send,
impl<I, F> Sync for Centerline<I, F> where
I: Sync,
impl<I, F> Unpin for Centerline<I, F>
impl<I, F> UnwindSafe for Centerline<I, F> where
F: UnwindSafe,
I: UnwindSafe,