Struct de_pathing::interval::SegmentInterval  
source · pub(crate) struct SegmentInterval {
    segment: Segment,
    is_a_corner: bool,
    is_b_corner: bool,
    edge_id: u32,
}Fields§
§segment: Segment§is_a_corner: bool§is_b_corner: bool§edge_id: u32Implementations§
source§impl SegmentInterval
 
impl SegmentInterval
sourcepub(crate) fn from_projection(
    segment: Segment,
    projection: ParamPair,
    edge_id: u32
) -> Self
 
pub(crate) fn from_projection( segment: Segment, projection: ParamPair, edge_id: u32 ) -> Self
Creates a new interval from projection parameters.
§Arguments
- 
segment- an original segment. Projection parameters correspond to this segment. - 
projection- parameters of endpoints a and b of the interval to be created. - 
edge_id- ID of the original edge / segment. 
§Panics
May panic if projection parameters are not between 0 and 1 (inclusive) or if first projection parameter is larger or equal to the second projection parameter.
sourcepub(crate) fn new(
    segment: Segment,
    is_a_corner: bool,
    is_b_corner: bool,
    edge_id: u32
) -> Self
 
pub(crate) fn new( segment: Segment, is_a_corner: bool, is_b_corner: bool, edge_id: u32 ) -> Self
sourcepub(crate) fn a_corner(&self) -> Option<Point<f32>>
 
pub(crate) fn a_corner(&self) -> Option<Point<f32>>
Returns the corner point of the original edge (see Self::edge_id())
if it corresponds to the endpoint of self.
sourcepub(crate) fn b_corner(&self) -> Option<Point<f32>>
 
pub(crate) fn b_corner(&self) -> Option<Point<f32>>
Returns the corner point of the original edge (see Self::edge_id())
if it corresponds to the endpoint of self.
pub(crate) fn distance_to_point(&self, point: Point<f32>) -> f32
pub(crate) fn project_point(&self, point: Point<f32>) -> Point<f32>
sourcepub(crate) fn cross(&self, a: Point<f32>, b: Point<f32>) -> SegmentCross
 
pub(crate) fn cross(&self, a: Point<f32>, b: Point<f32>) -> SegmentCross
Calculates the cross point of an optimal path from a point a to a
point b via the interval.
sourcepub(crate) fn project_onto_segment(
    &self,
    eye: Point<f32>,
    target: Segment
) -> SegmentOnSegmentProjection
 
pub(crate) fn project_onto_segment( &self, eye: Point<f32>, target: Segment ) -> SegmentOnSegmentProjection
Returns projection of self onto a target segment from a given perspective.
§Arguments
- 
eye- projection perspective. - 
target- self is projected onto this target. 
Trait Implementations§
source§impl Clone for SegmentInterval
 
impl Clone for SegmentInterval
source§fn clone(&self) -> SegmentInterval
 
fn clone(&self) -> SegmentInterval
1.0.0 · source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for SegmentInterval
impl RefUnwindSafe for SegmentInterval
impl Send for SegmentInterval
impl Sync for SegmentInterval
impl Unpin for SegmentInterval
impl UnwindSafe for SegmentInterval
Blanket Implementations§
§impl<T, U> AsBindGroupShaderType<U> for T
 
impl<T, U> AsBindGroupShaderType<U> for T
§fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
 
fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
T [ShaderType] for self. When used in [AsBindGroup]
derives, it is safe to assume that all images in self exist.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<T> Downcast for Twhere
    T: Any,
 
impl<T> Downcast for Twhere
    T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
 
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
 
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
 
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
 
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
 
impl<T> DowncastSync for T
§impl<S> FromSample<S> for S
 
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
 
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
 
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
 
fn in_current_span(self) -> Instrumented<Self>
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§impl<SS, SP> SupersetOf<SS> for SPwhere
    SS: SubsetOf<SP>,
 
impl<SS, SP> SupersetOf<SS> for SPwhere
    SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
 
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
 
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
 
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
 
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.