pub struct PlanSegment { /* private fields */ }Expand description
A straight edge in plan whose ends are known within radius metres.
A tread’s nosing is one: the edge the walking line climbs onto it across. An exact mesh gives its ends as points (radius zero); a tessellation widens them by its chord deviation.
Implementations§
Source§impl PlanSegment
impl PlanSegment
Sourcepub fn try_new(
from: [f64; 2],
to: [f64; 2],
radius: f64,
) -> Result<Self, WalkingSurfaceError>
pub fn try_new( from: [f64; 2], to: [f64; 2], radius: f64, ) -> Result<Self, WalkingSurfaceError>
The edge from from to to, each end within radius of the given
point. Coordinates must be finite, the ends distinct and the radius
finite and not negative.
Sourcepub fn angle_to(&self, other: &PlanSegment) -> Option<MeasuredInterval>
pub fn angle_to(&self, other: &PlanSegment) -> Option<MeasuredInterval>
The angle between the lines of two edges, in radians from 0
(parallel) to π/2 (square), as an interval sure to hold the angle
between any two edges whose ends lie within the radii. None when an
edge is too short for its radius to fix a direction.
Trait Implementations§
Source§impl Clone for PlanSegment
impl Clone for PlanSegment
impl Copy for PlanSegment
Source§impl Debug for PlanSegment
impl Debug for PlanSegment
Source§impl PartialEq for PlanSegment
impl PartialEq for PlanSegment
impl StructuralPartialEq for PlanSegment
Auto Trait Implementations§
impl Freeze for PlanSegment
impl RefUnwindSafe for PlanSegment
impl Send for PlanSegment
impl Sync for PlanSegment
impl Unpin for PlanSegment
impl UnsafeUnpin for PlanSegment
impl UnwindSafe for PlanSegment
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