Struct fj_core::geometry::CurveBoundary
source · pub struct CurveBoundary<T: CurveBoundaryElement> {
pub inner: [T::Repr; 2],
}
Expand description
A boundary on a curve
This struct is generic, because different situations require different representations of a boundary. In some cases, curve coordinates are enough, in other cases, vertices are required, and sometimes you need both.
Fields§
§inner: [T::Repr; 2]
The raw representation of the boundary
Implementations§
source§impl<T: CurveBoundaryElement> CurveBoundary<T>
impl<T: CurveBoundaryElement> CurveBoundary<T>
sourcepub fn is_normalized(&self) -> bool
pub fn is_normalized(&self) -> bool
Indicate whether the boundary is normalized
If the boundary is normalized, its bounding elements are in a defined
order, and calling normalize
will return an identical instance.
source§impl CurveBoundary<Point<1>>
impl CurveBoundary<Point<1>>
sourcepub fn contains(&self, point: Point<1>) -> bool
pub fn contains(&self, point: Point<1>) -> bool
Indicate whether the boundary contains the given element
sourcepub fn overlaps(&self, other: &Self) -> bool
pub fn overlaps(&self, other: &Self) -> bool
Indicate whether the boundary overlaps another
Boundaries that touch (i.e. their closest boundary elements are equal) count as overlapping.
sourcepub fn difference(self, other: Self) -> Option<OneOrTwoBoundaries>
pub fn difference(self, other: Self) -> Option<OneOrTwoBoundaries>
Create the difference of this boundary and another
The result will be normalized.
sourcepub fn intersection(self, other: Self) -> Self
pub fn intersection(self, other: Self) -> Self
Create the intersection of this boundary and another
The result will be normalized.
Trait Implementations§
source§impl<T: Clone + CurveBoundaryElement> Clone for CurveBoundary<T>
impl<T: Clone + CurveBoundaryElement> Clone for CurveBoundary<T>
source§fn clone(&self) -> CurveBoundary<T>
fn clone(&self) -> CurveBoundary<T>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<T: Debug + CurveBoundaryElement> Debug for CurveBoundary<T>
impl<T: Debug + CurveBoundaryElement> Debug for CurveBoundary<T>
source§impl<S, T: CurveBoundaryElement> From<[S; 2]> for CurveBoundary<T>
impl<S, T: CurveBoundaryElement> From<[S; 2]> for CurveBoundary<T>
source§impl<T: CurveBoundaryElement> Hash for CurveBoundary<T>
impl<T: CurveBoundaryElement> Hash for CurveBoundary<T>
source§impl<T: CurveBoundaryElement> Ord for CurveBoundary<T>
impl<T: CurveBoundaryElement> Ord for CurveBoundary<T>
source§impl<T: CurveBoundaryElement> PartialEq for CurveBoundary<T>
impl<T: CurveBoundaryElement> PartialEq for CurveBoundary<T>
source§impl<T: CurveBoundaryElement> PartialOrd for CurveBoundary<T>
impl<T: CurveBoundaryElement> PartialOrd for CurveBoundary<T>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl<T: Copy + CurveBoundaryElement> Copy for CurveBoundary<T>
impl<T: CurveBoundaryElement> Eq for CurveBoundary<T>
Auto Trait Implementations§
impl<T> Freeze for CurveBoundary<T>
impl<T> RefUnwindSafe for CurveBoundary<T>
impl<T> Send for CurveBoundary<T>
impl<T> Sync for CurveBoundary<T>
impl<T> Unpin for CurveBoundary<T>
impl<T> UnwindSafe for CurveBoundary<T>
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
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§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
.source§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
.source§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.source§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.source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read moresource§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).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.