Optimized polygon scan iterator for triangles. More...
#include <vgl_triangle_scan_iterator.h>
Classes | |
struct | pt |
Vertices of triangle. More... | |
Public Member Functions | |
void | reset () |
Resets the scan iterator to before the first scan line. | |
bool | next () |
Tries to move to the next scan line. | |
int | scany () const |
y-coordinate of the current scan line. | |
int | startx () const |
Returns starting x-value of the current scan line. | |
int | endx () const |
Returns ending x-value of the current scan line. | |
int | count () |
Number of image points (= integer grid points) inside the region. | |
Public Attributes | |
struct vgl_triangle_scan_iterator::pt | a |
struct vgl_triangle_scan_iterator::pt | b |
struct vgl_triangle_scan_iterator::pt | c |
Private Attributes | |
int | scany_ |
int | startx_ |
int | endx_ |
int | y0 |
int | y1 |
int | x0 |
int | x1 |
pt | g |
T | data [3][3] |
Optimized polygon scan iterator for triangles.
Definition at line 19 of file vgl_triangle_scan_iterator.h.
int vgl_region_scan_iterator::count | ( | ) | [inline, inherited] |
Number of image points (= integer grid points) inside the region.
Definition at line 48 of file vgl_region_scan_iterator.h.
int vgl_triangle_scan_iterator< T >::endx | ( | ) | const [inline, virtual] |
Returns ending x-value of the current scan line.
endx() should be larger than startx(), unless the scan line is empty
Implements vgl_region_scan_iterator.
Definition at line 34 of file vgl_triangle_scan_iterator.h.
bool vgl_triangle_scan_iterator< T >::next | ( | ) | [virtual] |
Tries to move to the next scan line.
Returns false if there are no more scan lines.
Implements vgl_region_scan_iterator.
Definition at line 137 of file vgl_triangle_scan_iterator.txx.
void vgl_triangle_scan_iterator< T >::reset | ( | ) | [virtual] |
Resets the scan iterator to before the first scan line.
After calling this function, next() needs to be called before startx() and endx() form a valid scan line.
Implements vgl_region_scan_iterator.
Definition at line 69 of file vgl_triangle_scan_iterator.txx.
int vgl_triangle_scan_iterator< T >::scany | ( | ) | const [inline, virtual] |
y-coordinate of the current scan line.
The next scan line is not guaranteed to have scany()+1; use next() instead.
Implements vgl_region_scan_iterator.
Definition at line 32 of file vgl_triangle_scan_iterator.h.
int vgl_triangle_scan_iterator< T >::startx | ( | ) | const [inline, virtual] |
Returns starting x-value of the current scan line.
startx() should be smaller than endx(), unless the scan line is empty
Implements vgl_region_scan_iterator.
Definition at line 33 of file vgl_triangle_scan_iterator.h.
struct vgl_triangle_scan_iterator::pt vgl_triangle_scan_iterator< T >::a |
struct vgl_triangle_scan_iterator::pt vgl_triangle_scan_iterator< T >::b |
struct vgl_triangle_scan_iterator::pt vgl_triangle_scan_iterator< T >::c |
T vgl_triangle_scan_iterator< T >::data[3][3] [private] |
Definition at line 49 of file vgl_triangle_scan_iterator.h.
int vgl_triangle_scan_iterator< T >::endx_ [private] |
Definition at line 39 of file vgl_triangle_scan_iterator.h.
pt vgl_triangle_scan_iterator< T >::g [private] |
Definition at line 48 of file vgl_triangle_scan_iterator.h.
int vgl_triangle_scan_iterator< T >::scany_ [private] |
Definition at line 37 of file vgl_triangle_scan_iterator.h.
int vgl_triangle_scan_iterator< T >::startx_ [private] |
Definition at line 38 of file vgl_triangle_scan_iterator.h.
int vgl_triangle_scan_iterator< T >::x0 [private] |
Definition at line 46 of file vgl_triangle_scan_iterator.h.
int vgl_triangle_scan_iterator< T >::x1 [private] |
Definition at line 46 of file vgl_triangle_scan_iterator.h.
int vgl_triangle_scan_iterator< T >::y0 [private] |
Definition at line 45 of file vgl_triangle_scan_iterator.h.
int vgl_triangle_scan_iterator< T >::y1 [private] |
Definition at line 45 of file vgl_triangle_scan_iterator.h.