2 #ifndef vgl_polygon_scan_iterator_h 3 #define vgl_polygon_scan_iterator_h 94 void reset()
override;
100 inline int scany()
const override {
return y-1; }
106 inline int endx()
const override {
return xr; }
173 #define VGL_POLYGON_SCAN_ITERATOR_INSTANTIATE(T) extern "please include <vgl/vgl_polygon_scan_iterator.hxx> instead" 175 #endif // vgl_polygon_scan_iterator_h int xr
right bound of current span
int boundp
boolean indicating if boundary should be included or not
void get_next_vert(vertind v, vertind &next)
Returns the vertex following v in v's chain.
int curcrossedge
crossedge marking start of next scan segment
T fscany() const
Returns current scan line (floating point value).
T fstartx() const
Returns start of current span (floating point value).
bool next() override
Moves iterator to next segment.
Point2 get_pt(vertind v) const
~vgl_polygon_scan_iterator() override
Destructor.
T fy
floating point value of current scan line (i.e. T(y))
int chainnum
which chain the vertex is part of
int numcrossedges
number of edges currently crossing scan line
Describes an edge crossing the current scan line.
void get_prev_vert(vertind v, vertind &prev)
Returns the vertex preceding v in v's chain.
int xl
left bound of current span
int startx() const override
Returns start of current span.
vertind v
edge goes from vertex v.vertnum to v.vertnum + 1
void insert_edge(vertind v)
Fill a polygonal face with interior scan lines.
vgl_polygon< T >::point_t Point2
crossedge * crossedges
array of edges crossing current scan line
void get_crossedge_vertices(int *&chainnum, int *&vertnum, int &numcrossedges)
T fendx() const
Returns end of current span (floating point value).
vgl_polygon_scan_iterator & operator=(const vgl_polygon_scan_iterator &)=delete
int endx() const override
Returns end of current span.
vgl_polygon_scan_iterator(vgl_polygon< T > const &face, bool boundaryp=true)
Construct with a polygon and bool indicating whether boundary included.
vertind * yverts
array of all vertices ordered by y coordinate
void display_crossedges()
Contains class to represent a cartesian 2D bounding box.
int k
current index of vertices ordered by increasing y
vgl_polygon< T > poly_
the polygon
T dx
change in x with respect to y
Vertex index - uniquely identifies a vertex in the array chains.
Abstract base class for iterating over the pixels in a region of an image.
int vertnum
which vertex in the chain
T fxr
right bound of current span (floating point value)
void delete_edge(vertind v)
int numverts
total number of vertices comprising face
void reset() override
Resets iterator to first segment of first scan line.
T x
x coord of edge's intersection with current scanline
T fxl
left bound of current span (floating point value)
vgl_box_2d< T > win
clipping window
int scany() const override
Returns current scan line.
int y0
bottommost scan line