Struct ImplicitCell

Source
pub struct ImplicitCell {
    pub axis: Axis,
    pub from: Scalar,
    pub to: Scalar,
    pub low: Scalar,
    pub high: Scalar,
    pub bridge: Option<(Scalar, Scalar)>,
}
Expand description

One stretch of an ImplicitCurve2: as the free parameter runs from from to to, the curve is the unique zero of the field for the other parameter in [low, high], where the field is strictly monotone in it.

A bridge is the last stretch into a point where two branches cross (a saddle of the field on its zero set, where the surfaces touch). Near there the zero cannot be isolated with certainty, so the bridge carries the solved parameter as the cubic that matches the branch’s value and slope at both ends: at the certified end the field’s own, at the crossing the direction where the field’s Hessian vanishes, which is the branch’s tangent there. It leaves the branch by about its length to the fourth power (ADR 0077).

Fields§

§axis: Axis

The free parameter.

§from: Scalar

Where the free parameter starts.

§to: Scalar

Where it ends (it may run either way).

§low: Scalar

Lower end of the bracket of the solved parameter.

§high: Scalar

Upper end of the bracket.

§bridge: Option<(Scalar, Scalar)>

For a bridge into a crossing, the slopes d solved / d free at from and at to.

Implementations§

Source§

impl ImplicitCell

Source

pub fn bridge(from: Point2, to: Point2, start: Vec2, end: Vec2) -> Self

A bridge from from to to in (u, v), leaving along start and arriving along end (directions in (u, v)), free along the parameter both directions move in most.

Source

pub fn part(&self, s0: Scalar, s1: Scalar) -> Self

The part of the cell over local parameters [s0, s1].

Source

pub fn reversed(&self) -> Self

The cell run backwards.

Source

pub fn solved_range(&self) -> (Scalar, Scalar)

The smallest and largest solved value the cell can take: a bridge’s range is bounded by its Bezier control values.

Trait Implementations§

Source§

impl Clone for ImplicitCell

Source§

fn clone(&self) -> ImplicitCell

Returns a copy of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for ImplicitCell

Source§

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

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

impl PartialEq for ImplicitCell

Source§

fn eq(&self, other: &ImplicitCell) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for ImplicitCell

Source§

impl StructuralPartialEq for ImplicitCell

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.