pub struct ContourSplitMap { /* private fields */ }Expand description
Per-segment split parameters for a contour.
Every segment starts with 0 and 1 so downstream fragment assembly can
build intervals directly after event parameters are merged in.
Implementations§
Source§impl ContourSplitMap
impl ContourSplitMap
Sourcepub fn new(segment_splits: Vec<Vec<Real>>) -> CurveResult<Self>
pub fn new(segment_splits: Vec<Vec<Real>>) -> CurveResult<Self>
Constructs a split map from already-normalized per-segment parameters.
Sourcepub fn with_segment_count(segment_count: usize) -> Self
pub fn with_segment_count(segment_count: usize) -> Self
Constructs a split map containing only segment endpoints.
Sourcepub fn from_intersections(
segment_count: usize,
intersections: &ContourIntersectionSet,
operand: ContourOperand,
policy: &CurvePolicy,
) -> Classification<Self>
pub fn from_intersections( segment_count: usize, intersections: &ContourIntersectionSet, operand: ContourOperand, policy: &CurvePolicy, ) -> Classification<Self>
Builds a split map from one contour-pair event set.
Sourcepub fn params_for_segment(&self, segment_index: usize) -> Option<&[Real]>
pub fn params_for_segment(&self, segment_index: usize) -> Option<&[Real]>
Returns the split parameters for one segment.
Sourcepub fn segment_count(&self) -> usize
pub fn segment_count(&self) -> usize
Returns the segment count represented by this map.
Sourcepub fn merge_intersections(
&mut self,
intersections: &ContourIntersectionSet,
operand: ContourOperand,
policy: &CurvePolicy,
) -> Classification<()>
pub fn merge_intersections( &mut self, intersections: &ContourIntersectionSet, operand: ContourOperand, policy: &CurvePolicy, ) -> Classification<()>
Merges another contour-pair event set into this split map.
Sourcepub fn split_points(&self) -> Vec<SegmentSplitPoint>
pub fn split_points(&self) -> Vec<SegmentSplitPoint>
Returns all split points flattened in segment order.
Trait Implementations§
Source§impl Clone for ContourSplitMap
impl Clone for ContourSplitMap
Source§fn clone(&self) -> ContourSplitMap
fn clone(&self) -> ContourSplitMap
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ContourSplitMap
impl Debug for ContourSplitMap
Source§impl PartialEq for ContourSplitMap
impl PartialEq for ContourSplitMap
Source§fn eq(&self, other: &ContourSplitMap) -> bool
fn eq(&self, other: &ContourSplitMap) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ContourSplitMap
Auto Trait Implementations§
impl !RefUnwindSafe for ContourSplitMap
impl !Sync for ContourSplitMap
impl Freeze for ContourSplitMap
impl Send for ContourSplitMap
impl Unpin for ContourSplitMap
impl UnsafeUnpin for ContourSplitMap
impl UnwindSafe for ContourSplitMap
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