pub type Extent3d<T> = Extent<T, 3>;
Expand description
A 3-dimensional Extent
.
Aliased Type§
struct Extent3d<T> {
pub size: [T; 3],
}
Fields§
§size: [T; 3]
The D-dimensional size.
Implementations§
Source§impl<T> Extent3d<T>
impl<T> Extent3d<T>
Sourcepub fn is_uniform_3d(&self) -> boolwhere
T: PartialEq,
pub fn is_uniform_3d(&self) -> boolwhere
T: PartialEq,
Returns true
if the 3 dimensions of the extent are equal.
Source§impl<T, const D: usize> Extent<T, D>
impl<T, const D: usize> Extent<T, D>
Sourcepub const fn new(dimensions: [T; D]) -> Self
pub const fn new(dimensions: [T; D]) -> Self
Constructs a new Extent
from the given dimensions.
Sourcepub fn as_slice_mut(&mut self) -> &mut [T] ⓘ
pub fn as_slice_mut(&mut self) -> &mut [T] ⓘ
Returns an exclusive reference to the extent as a slice.
Sourcepub fn is_uniform_nd(&self) -> boolwhere
T: PartialEq,
pub fn is_uniform_nd(&self) -> boolwhere
T: PartialEq,
Returns true
if all dimensions of the extent are equal.
Source§impl<T, const D: usize> Extent<T, D>
§Interval-related methods
impl<T, const D: usize> Extent<T, D>
§Interval-related methods
Sourcepub fn as_intervals(self) -> [Interval<T>; D]where
T: Default,
pub fn as_intervals(self) -> [Interval<T>; D]where
T: Default,
TODO
Sourcepub const fn as_intervals_const(self) -> [Interval<T>; D]where
T: Copy + ConstDefault,
pub const fn as_intervals_const(self) -> [Interval<T>; D]where
T: Copy + ConstDefault,
TODO
Sourcepub fn to_intervals(&self) -> [Interval<T>; D]
pub fn to_intervals(&self) -> [Interval<T>; D]
Converts each dimension into an interval from zero to the dimension’s extent.
Sourcepub fn fits_within(&self, interval: &Interval<T>) -> boolwhere
T: PartialOrd,
pub fn fits_within(&self, interval: &Interval<T>) -> boolwhere
T: PartialOrd,
Checks if each dimension of the extent is within the given interval.
Source§impl<const D: usize> Extent<f32, D>
impl<const D: usize> Extent<f32, D>
Source§impl<const D: usize> Extent<f64, D>
impl<const D: usize> Extent<f64, D>
Source§impl<const D: usize> Extent<i128, D>
impl<const D: usize> Extent<i128, D>
Sourcepub const fn c_measure(self) -> i128
pub const fn c_measure(self) -> i128
Returns the internal measure, the product of the extents.
It’s equivalent to length, area, and volume in 1, 2 and 3 dimensions.
Sourcepub const fn c_boundary(self) -> i128
pub const fn c_boundary(self) -> i128
Returns the external boundary, the sum of the extents.
It’s equivalent to 2, perimeter and surface area in 1, 2 and 3 dimensions.
Source§impl<const D: usize> Extent<i16, D>
impl<const D: usize> Extent<i16, D>
Sourcepub const fn c_measure(self) -> i16
pub const fn c_measure(self) -> i16
Returns the internal measure, the product of the extents.
It’s equivalent to length, area, and volume in 1, 2 and 3 dimensions.
Sourcepub const fn c_boundary(self) -> i16
pub const fn c_boundary(self) -> i16
Returns the external boundary, the sum of the extents.
It’s equivalent to 2, perimeter and surface area in 1, 2 and 3 dimensions.
Source§impl<const D: usize> Extent<i32, D>
impl<const D: usize> Extent<i32, D>
Sourcepub const fn c_measure(self) -> i32
pub const fn c_measure(self) -> i32
Returns the internal measure, the product of the extents.
It’s equivalent to length, area, and volume in 1, 2 and 3 dimensions.
Sourcepub const fn c_boundary(self) -> i32
pub const fn c_boundary(self) -> i32
Returns the external boundary, the sum of the extents.
It’s equivalent to 2, perimeter and surface area in 1, 2 and 3 dimensions.
Source§impl<const D: usize> Extent<i64, D>
impl<const D: usize> Extent<i64, D>
Sourcepub const fn c_measure(self) -> i64 ⓘ
pub const fn c_measure(self) -> i64 ⓘ
Returns the internal measure, the product of the extents.
It’s equivalent to length, area, and volume in 1, 2 and 3 dimensions.
Sourcepub const fn c_boundary(self) -> i64 ⓘ
pub const fn c_boundary(self) -> i64 ⓘ
Returns the external boundary, the sum of the extents.
It’s equivalent to 2, perimeter and surface area in 1, 2 and 3 dimensions.
Source§impl<const D: usize> Extent<i8, D>
impl<const D: usize> Extent<i8, D>
Sourcepub const fn c_measure(self) -> i8
pub const fn c_measure(self) -> i8
Returns the internal measure, the product of the extents.
It’s equivalent to length, area, and volume in 1, 2 and 3 dimensions.
Sourcepub const fn c_boundary(self) -> i8
pub const fn c_boundary(self) -> i8
Returns the external boundary, the sum of the extents.
It’s equivalent to 2, perimeter and surface area in 1, 2 and 3 dimensions.
Source§impl<const D: usize> Extent<isize, D>
impl<const D: usize> Extent<isize, D>
Sourcepub const fn c_measure(self) -> isize
pub const fn c_measure(self) -> isize
Returns the internal measure, the product of the extents.
It’s equivalent to length, area, and volume in 1, 2 and 3 dimensions.
Sourcepub const fn c_boundary(self) -> isize
pub const fn c_boundary(self) -> isize
Returns the external boundary, the sum of the extents.
It’s equivalent to 2, perimeter and surface area in 1, 2 and 3 dimensions.
Source§impl<const D: usize> Extent<u128, D>
impl<const D: usize> Extent<u128, D>
Sourcepub const fn c_measure(self) -> u128
pub const fn c_measure(self) -> u128
Returns the internal measure, the product of the extents.
It’s equivalent to length, area, and volume in 1, 2 and 3 dimensions.
Sourcepub const fn c_boundary(self) -> u128
pub const fn c_boundary(self) -> u128
Returns the external boundary, the sum of the extents.
It’s equivalent to 2, perimeter and surface area in 1, 2 and 3 dimensions.
Source§impl<const D: usize> Extent<u16, D>
impl<const D: usize> Extent<u16, D>
Sourcepub const fn c_measure(self) -> u16
pub const fn c_measure(self) -> u16
Returns the internal measure, the product of the extents.
It’s equivalent to length, area, and volume in 1, 2 and 3 dimensions.
Sourcepub const fn c_boundary(self) -> u16
pub const fn c_boundary(self) -> u16
Returns the external boundary, the sum of the extents.
It’s equivalent to 2, perimeter and surface area in 1, 2 and 3 dimensions.
Source§impl<const D: usize> Extent<u32, D>
impl<const D: usize> Extent<u32, D>
Sourcepub const fn c_measure(self) -> u32 ⓘ
pub const fn c_measure(self) -> u32 ⓘ
Returns the internal measure, the product of the extents.
It’s equivalent to length, area, and volume in 1, 2 and 3 dimensions.
Sourcepub const fn c_boundary(self) -> u32 ⓘ
pub const fn c_boundary(self) -> u32 ⓘ
Returns the external boundary, the sum of the extents.
It’s equivalent to 2, perimeter and surface area in 1, 2 and 3 dimensions.
Source§impl<const D: usize> Extent<u64, D>
impl<const D: usize> Extent<u64, D>
Sourcepub const fn c_measure(self) -> u64
pub const fn c_measure(self) -> u64
Returns the internal measure, the product of the extents.
It’s equivalent to length, area, and volume in 1, 2 and 3 dimensions.
Sourcepub const fn c_boundary(self) -> u64
pub const fn c_boundary(self) -> u64
Returns the external boundary, the sum of the extents.
It’s equivalent to 2, perimeter and surface area in 1, 2 and 3 dimensions.
Source§impl<const D: usize> Extent<u8, D>
impl<const D: usize> Extent<u8, D>
Sourcepub const fn c_measure(self) -> u8
pub const fn c_measure(self) -> u8
Returns the internal measure, the product of the extents.
It’s equivalent to length, area, and volume in 1, 2 and 3 dimensions.
Sourcepub const fn c_boundary(self) -> u8
pub const fn c_boundary(self) -> u8
Returns the external boundary, the sum of the extents.
It’s equivalent to 2, perimeter and surface area in 1, 2 and 3 dimensions.
Source§impl<const D: usize> Extent<usize, D>
impl<const D: usize> Extent<usize, D>
Sourcepub const fn c_measure(self) -> usize
pub const fn c_measure(self) -> usize
Returns the internal measure, the product of the extents.
It’s equivalent to length, area, and volume in 1, 2 and 3 dimensions.
Sourcepub const fn c_boundary(self) -> usize
pub const fn c_boundary(self) -> usize
Returns the external boundary, the sum of the extents.
It’s equivalent to 2, perimeter and surface area in 1, 2 and 3 dimensions.