Skip to main content

FloatCurveOverlayOptions

Struct FloatCurveOverlayOptions 

Source
#[non_exhaustive]
pub struct FloatCurveOverlayOptions<F: FloatNumber> { pub min_chord_length: Option<F>, pub angle_tolerance: F, pub max_approximation_depth: u32, pub refinement_subdivision_power: u32, pub refinement_angle_tolerance_power: u32, pub max_refinement_iterations: u32, }
Expand description

Curve approximation options expressed in float input coordinates.

Construct this non-exhaustive configuration from Default and override only the values your application needs.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§min_chord_length: Option<F>

Absolute chord length below which a curve segment is accepted without further subdivision.

None preserves the scale-relative default used by the integer engine.

§angle_tolerance: F

Maximum dimensionless sine deviation used to classify a curve segment as nearly linear. The value must be finite and in the range (0, 1].

§max_approximation_depth: u32

Hard safety limit for local approximation subdivision. The value must not exceed CurveOverlayOptions::MAX_APPROXIMATION_DEPTH.

§refinement_subdivision_power: u32

Power-of-two subdivision used when another chord endpoint lies inside a curve piece’s convex hull. The default produces eight pieces.

§refinement_angle_tolerance_power: u32

Negative power-of-two sine tolerance below which a curve piece is too flat to containment-refine.

§max_refinement_iterations: u32

Maximum number of containment-refinement passes.

Implementations§

Source§

impl<F: FloatNumber> FloatCurveOverlayOptions<F>

Source

pub fn with_min_chord_length(self, length: F) -> Self

Sets the absolute minimum accepted chord length.

Source

pub fn with_angle_tolerance(self, tolerance: F) -> Self

Sets the maximum sine deviation used for near-linear classification.

Source

pub fn with_max_approximation_depth(self, depth: u32) -> Self

Sets the local approximation subdivision limit.

Source

pub fn with_refinement_subdivision_power(self, power: u32) -> Self

Sets the power-of-two subdivision used by containment refinement.

Source

pub fn with_refinement_angle_tolerance_power(self, power: u32) -> Self

Sets the near-linear angle threshold used by containment refinement.

Source

pub fn with_max_refinement_iterations(self, iterations: u32) -> Self

Sets the maximum number of containment-refinement passes.

Trait Implementations§

Source§

impl<F: Clone + FloatNumber> Clone for FloatCurveOverlayOptions<F>

Source§

fn clone(&self) -> FloatCurveOverlayOptions<F>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<F: Copy + FloatNumber> Copy for FloatCurveOverlayOptions<F>

Source§

impl<F: Debug + FloatNumber> Debug for FloatCurveOverlayOptions<F>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<F: FloatNumber> Default for FloatCurveOverlayOptions<F>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<F: PartialEq + FloatNumber> PartialEq for FloatCurveOverlayOptions<F>

Source§

fn eq(&self, other: &FloatCurveOverlayOptions<F>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<F: PartialEq + FloatNumber> StructuralPartialEq for FloatCurveOverlayOptions<F>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.