Enum BoundaryTreatment
pub enum BoundaryTreatment {
Lower,
Upper,
Average(f64),
}
Expand description
Method variants for dealing with a Point on boundaries
Leaving the treatment of a Point on a voxel boundary to the user’s imagination is a bad idea. Providing a variant of this type forces the behaviour to be explicit.
The variants may be:
- Lower - ON the boundary returns the lower voxel result
- Upper - ON the boundary returns the higher voxel result
- Average - NEAR the boundary returns average of both voxels
For example, if the x-bounds of two voxels were [1.0, 2.0, 3.0] and you specified x=2.0: > lower => (1.0 < x <= 2.0), choose voxel 0 > upper => (2.0 <= x < 3.0), choose voxel 1 > average, tol=0.1 => (1.9 < x < 2.1), average both
Boundary cases are special and will be included for each extreme. For
example, Upper
will return the last voxel for exactly 3.0 in this case.
Variants§
Lower
Values exactly on a boundary return the lower voxel
Upper
Values exactly on a boundary return the higher voxel
Average(f64)
Values within a tolerance of a boundary return an average of both voxels
Trait Implementations§
§impl Clone for BoundaryTreatment
impl Clone for BoundaryTreatment
§fn clone(&self) -> BoundaryTreatment
fn clone(&self) -> BoundaryTreatment
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for BoundaryTreatment
impl Debug for BoundaryTreatment
§impl Default for BoundaryTreatment
impl Default for BoundaryTreatment
§fn default() -> BoundaryTreatment
fn default() -> BoundaryTreatment
§impl Display for BoundaryTreatment
impl Display for BoundaryTreatment
§impl PartialEq for BoundaryTreatment
impl PartialEq for BoundaryTreatment
impl Copy for BoundaryTreatment
impl StructuralPartialEq for BoundaryTreatment
Auto Trait Implementations§
impl Freeze for BoundaryTreatment
impl RefUnwindSafe for BoundaryTreatment
impl Send for BoundaryTreatment
impl Sync for BoundaryTreatment
impl Unpin for BoundaryTreatment
impl UnwindSafe for BoundaryTreatment
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<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<T> Pointable for T
impl<T> Pointable for T
§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.