[−][src]Trait building_blocks_core::extent::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]) ]);