#[non_exhaustive]pub struct Mitre {
pub incoming: SectionFrame,
pub outgoing: SectionFrame,
pub normal: DVec3,
}Expand description
The plane a section stands in where a run crosses a seam whose tangents differ; see the module documentation.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.incoming: SectionFrameThe section frame of the piece ending at the seam.
outgoing: SectionFrameThe section frame of the piece starting there.
normal: DVec3Unit normal of the mitre plane, (t_in + t_out) / |t_in + t_out|.
Implementations§
Source§impl Mitre
impl Mitre
Sourcepub fn between(
incoming: &SectionFrame,
outgoing: &SectionFrame,
) -> Result<Option<Mitre>, GeomError>
pub fn between( incoming: &SectionFrame, outgoing: &SectionFrame, ) -> Result<Option<Mitre>, GeomError>
The mitre between the two frames of a seam, or None when their
tangents agree within SEAM_TANGENT_TOLERANCE.
§Errors
Tangents that nearly reverse (the cosine of half the turn at most
MITRE_TOLERANCE), and two frames that do not share their point
(a seam that is not position continuous), by name.
Sourcepub fn place(
&self,
incoming: DVec3,
outgoing: DVec3,
longitudinal: f64,
) -> DVec3
pub fn place( &self, incoming: DVec3, outgoing: DVec3, longitudinal: f64, ) -> DVec3
A section point in the mitre plane: incoming and outgoing are
the same section point placed in each side’s frame (without a
longitudinal offset); each is projected along its side’s tangent
onto the plane, and the midpoint is moved longitudinal along the
normal.
Trait Implementations§
impl Copy for Mitre
impl StructuralPartialEq for Mitre
Auto Trait Implementations§
impl Freeze for Mitre
impl RefUnwindSafe for Mitre
impl Send for Mitre
impl Sync for Mitre
impl Unpin for Mitre
impl UnsafeUnpin for Mitre
impl UnwindSafe for Mitre
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more