LSSTApplications  10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
lsst::afw::geom::SpanPixelIterator Class Reference

An iterator that yields Point2I and increases in the x direction. More...

#include <SpanPixelIterator.h>

Inheritance diagram for lsst::afw::geom::SpanPixelIterator:

Public Member Functions

 SpanPixelIterator (Point2I const &p=Point2I())
 

Private Member Functions

Point2I const & dereference () const
 
void increment ()
 
void decrement ()
 
void advance (int n)
 
bool equal (SpanPixelIterator const &other) const
 
int distance_to (SpanPixelIterator const &other) const
 

Private Attributes

Point2I _p
 

Friends

class boost::iterator_core_access
 

Detailed Description

An iterator that yields Point2I and increases in the x direction.

This is used to iterate over the pixels in a Span, and by extension to iterate over regions like boxes and ellipses.

Definition at line 40 of file SpanPixelIterator.h.

Constructor & Destructor Documentation

lsst::afw::geom::SpanPixelIterator::SpanPixelIterator ( Point2I const &  p = Point2I())
inlineexplicit

Definition at line 45 of file SpanPixelIterator.h.

Member Function Documentation

void lsst::afw::geom::SpanPixelIterator::advance ( int  n)
inlineprivate

Definition at line 57 of file SpanPixelIterator.h.

57 { _p.getX() += n; }
void lsst::afw::geom::SpanPixelIterator::decrement ( )
inlineprivate

Definition at line 55 of file SpanPixelIterator.h.

55 { --_p.getX(); }
Point2I const& lsst::afw::geom::SpanPixelIterator::dereference ( ) const
inlineprivate

Definition at line 51 of file SpanPixelIterator.h.

int lsst::afw::geom::SpanPixelIterator::distance_to ( SpanPixelIterator const &  other) const
inlineprivate

Definition at line 63 of file SpanPixelIterator.h.

63  {
64  assert(other._p.getY() == _p.getY());
65  return other._p.getX() - _p.getX();
66  }
bool lsst::afw::geom::SpanPixelIterator::equal ( SpanPixelIterator const &  other) const
inlineprivate

Definition at line 59 of file SpanPixelIterator.h.

59  {
60  return _p.getX() == other._p.getX() && _p.getY() == other._p.getY();
61  }
void lsst::afw::geom::SpanPixelIterator::increment ( )
inlineprivate

Definition at line 53 of file SpanPixelIterator.h.

53 { ++_p.getX(); }

Friends And Related Function Documentation

friend class boost::iterator_core_access
friend

Definition at line 49 of file SpanPixelIterator.h.

Member Data Documentation

Point2I lsst::afw::geom::SpanPixelIterator::_p
private

Definition at line 68 of file SpanPixelIterator.h.


The documentation for this class was generated from the following file: