Struct pasture_core::math::Octant [−][src]
Wrapper type around an u8 that encodes the index of an octant within an octree. Since there are only 8 possible octants,
this type is only valid for values in [0;7]
and acts as a safeguard to prevent out-of-bounds errors when passing around
and setting octant indices
Implementations
impl Octant
[src]
pub const ZERO: Octant
[src]
Constant for the octant with index 0
pub const ONE: Octant
[src]
Constant for the octant with index 1
pub const TWO: Octant
[src]
Constant for the octant with index 2
pub const THREE: Octant
[src]
Constant for the octant with index 3
pub const FOUR: Octant
[src]
Constant for the octant with index 4
pub const FIVE: Octant
[src]
Constant for the octant with index 5
pub const SIX: Octant
[src]
Constant for the octant with index 6
pub const SEVEN: Octant
[src]
Constant for the octant with index 7
pub fn index(&self) -> u8
[src]
The index of the associated Octant
as an u8
value
Trait Implementations
impl Clone for Octant
[src]
impl Copy for Octant
[src]
impl Debug for Octant
[src]
impl Eq for Octant
[src]
impl Ord for Octant
[src]
fn cmp(&self, other: &Octant) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<Octant> for Octant
[src]
impl PartialOrd<Octant> for Octant
[src]
fn partial_cmp(&self, other: &Octant) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for Octant
[src]
impl StructuralPartialEq for Octant
[src]
impl TryFrom<u8> for Octant
[src]
Auto Trait Implementations
impl RefUnwindSafe for Octant
impl Send for Octant
impl Sync for Octant
impl Unpin for Octant
impl UnwindSafe for Octant
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> Scalar for T where
T: Copy + PartialEq<T> + Debug + Any,
[src]
T: Copy + PartialEq<T> + Debug + Any,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
pub fn is_in_subset(&self) -> bool
pub fn to_subset_unchecked(&self) -> SS
pub fn from_subset(element: &SS) -> SP
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,