pub struct InputRelation {
pub contains: bool,
pub strict_contains: bool,
pub contained: bool,
pub strict_contained: bool,
pub intersect: bool,
pub disjoint: bool,
pub early_exit: bool,
}Expand description
This struct is used to query the specific relationship between two shapes. By default nothing is enabled and no relation are computed.
Fields§
§contains: boolReturn true if any part on the first shape contains any part of the second shape.
strict_contains: boolReturn true if any parts of the first shape contains all parts of the second shape. The difference between the strict and lose contains are when dealing with multi-shape. Contains would return true if only one point of a multi-poins is contained in the first shape. The strict contains only returns true if all the points of the multi-points are contained in the first shape. It’s also way more expensive to compute.
contained: boolReturn true if any part on the first shape is contained in any part of the second shape.
strict_contained: bool§intersect: bool§disjoint: bool§early_exit: boolIf set to true the relation algorithm will stop as soon as possible after filling any value.
For example if you are asking if a shape contains, is contained or intersect with another but
don’t really care about which of these happened you can set early_exit to true and the relation
algorithm will be able to exit directly after finding the first intersection for example.
Implementations§
Source§impl InputRelation
impl InputRelation
pub fn all() -> Self
pub fn any() -> Self
pub fn swap_contains_relation(self) -> Self
pub fn none() -> Self
pub fn to_false(self) -> OutputRelation
pub fn to_true(self) -> OutputRelation
pub fn strip_strict(self) -> Self
pub fn strip_strict_contained(self) -> Self
pub fn strip_disjoint(self) -> Self
Trait Implementations§
Source§impl Clone for InputRelation
impl Clone for InputRelation
Source§fn clone(&self) -> InputRelation
fn clone(&self) -> InputRelation
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InputRelation
impl Debug for InputRelation
Source§impl Default for InputRelation
impl Default for InputRelation
Source§fn default() -> InputRelation
fn default() -> InputRelation
Source§impl PartialEq for InputRelation
impl PartialEq for InputRelation
impl Copy for InputRelation
impl Eq for InputRelation
impl StructuralPartialEq for InputRelation
Auto Trait Implementations§
impl Freeze for InputRelation
impl RefUnwindSafe for InputRelation
impl Send for InputRelation
impl Sync for InputRelation
impl Unpin for InputRelation
impl UnwindSafe for InputRelation
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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