[−][src]Type Definition pbrt::core::geometry::Bounds2i
type Bounds2i = Bounds2<isize>;
2D bounding box type with isize
members.
Methods
impl Bounds2i
[src]
pub fn iter(&self) -> impl Iterator<Item = Point2i>
[src]
Returns and iterator that visits each Point2i
within the Bound2i
.
Examples
use pbrt::core::geometry::Bounds2i; use pbrt::core::geometry::Point2i; let b = Bounds2i::from([[2, 2], [4, 4]]); let mut it = b.iter(); assert_eq!(it.next(), Some(Point2i::from([2, 2]))); assert_eq!(it.next(), Some(Point2i::from([3, 2]))); assert_eq!(it.next(), Some(Point2i::from([2, 3]))); assert_eq!(it.next(), Some(Point2i::from([3, 3]))); assert_eq!(it.next(), None);