[−][src]Trait building_blocks::prelude::IntegerExtent
The methods that all ExtentN<N>
should have when the scalar type is an integer, but only those
which are implemented specially for each ExtentN<N>
. This enables us to assume that any finite
extent contains only a finite number of points.
Associated Types
Loading content...Required methods
fn num_points(&self) -> usize
The number of points contained in the extent.
fn iter_points(&self) -> Self::PointIter
Iterate over all points in the extent.
let extent = Extent3i::from_min_and_shape(PointN([0, 0, 0]), PointN([2, 2, 1])); let points = extent.iter_points().collect::<Vec<_>>(); assert_eq!(points, vec![ PointN([0, 0, 0]), PointN([1, 0, 0]), PointN([0, 1, 0]), PointN([1, 1, 0]) ]);
Implementors
impl IntegerExtent<[i32; 2]> for ExtentN<[i32; 2]>
[src]
type PointIter = Extent2PointIter<i32>
pub fn num_points(&self) -> usize
[src]
pub fn iter_points(
&self
) -> <ExtentN<[i32; 2]> as IntegerExtent<[i32; 2]>>::PointIter
[src]
&self
) -> <ExtentN<[i32; 2]> as IntegerExtent<[i32; 2]>>::PointIter
impl IntegerExtent<[i32; 3]> for ExtentN<[i32; 3]>
[src]
type PointIter = Extent3PointIter<i32>
pub fn num_points(&self) -> usize
[src]
pub fn iter_points(
&self
) -> <ExtentN<[i32; 3]> as IntegerExtent<[i32; 3]>>::PointIter
[src]
&self
) -> <ExtentN<[i32; 3]> as IntegerExtent<[i32; 3]>>::PointIter