Enum libreda_pnr::db::LineIntersection[]

pub enum LineIntersection<TP, TE> where
    TP: CoordinateType,
    TE: CoordinateType
{ None, Point(Point<TP>, (TE, TE, TE)), Collinear, }

Return type for the line-line intersection functions. Stores all possible results of a line to line intersection.

Variants

None

No intersection at all.

Point(Point<TP>, (TE, TE, TE))

Intersection in a single point. Besides the intersection point also an other expression for the intersection point is given. The three values (a, b, c) describe the intersection point in terms of a starting point (the starting point of the edge which defines the line) and the direction of the edge multiplied by a fraction.

edge.start + edge.vector()*a/c == p and other_edge.start + other_edge.vector()*b/c == p.

Collinear

Lines are collinear.

Trait Implementations

impl<TP, TE> Clone for LineIntersection<TP, TE> where
    TP: CoordinateType + Clone,
    TE: CoordinateType + Clone

impl<TP, TE> Copy for LineIntersection<TP, TE> where
    TP: CoordinateType + Copy,
    TE: CoordinateType + Copy

impl<TP, TE> Debug for LineIntersection<TP, TE> where
    TP: CoordinateType + Debug,
    TE: CoordinateType + Debug

impl<TP, TE> PartialEq<LineIntersection<TP, TE>> for LineIntersection<TP, TE> where
    TP: CoordinateType + PartialEq<TP>,
    TE: CoordinateType + PartialEq<TE>, 

impl<TP, TE> StructuralPartialEq for LineIntersection<TP, TE> where
    TP: CoordinateType,
    TE: CoordinateType

Auto Trait Implementations

impl<TP, TE> RefUnwindSafe for LineIntersection<TP, TE> where
    TE: RefUnwindSafe,
    TP: RefUnwindSafe

impl<TP, TE> Send for LineIntersection<TP, TE> where
    TE: Send,
    TP: Send

impl<TP, TE> Sync for LineIntersection<TP, TE> where
    TE: Sync,
    TP: Sync

impl<TP, TE> Unpin for LineIntersection<TP, TE> where
    TE: Unpin,
    TP: Unpin

impl<TP, TE> UnwindSafe for LineIntersection<TP, TE> where
    TE: UnwindSafe,
    TP: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.