Classes | Public Member Functions | Public Attributes | Private Attributes
vgl_triangle_scan_iterator< T > Class Template Reference

Optimized polygon scan iterator for triangles. More...

#include <vgl_triangle_scan_iterator.h>

Inheritance diagram for vgl_triangle_scan_iterator< T >:
Inheritance graph
[legend]

List of all members.

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
data [3][3]

Detailed Description

template<class T>
class vgl_triangle_scan_iterator< T >

Optimized polygon scan iterator for triangles.

Definition at line 19 of file vgl_triangle_scan_iterator.h.


Member Function Documentation

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.

template<class T >
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.

template<class T >
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.

template<class T >
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.

template<class T >
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.

template<class T >
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.


Member Data Documentation

template<class T >
T vgl_triangle_scan_iterator< T >::data[3][3] [private]

Definition at line 49 of file vgl_triangle_scan_iterator.h.

template<class T >
int vgl_triangle_scan_iterator< T >::endx_ [private]

Definition at line 39 of file vgl_triangle_scan_iterator.h.

template<class T >
pt vgl_triangle_scan_iterator< T >::g [private]

Definition at line 48 of file vgl_triangle_scan_iterator.h.

template<class T >
int vgl_triangle_scan_iterator< T >::scany_ [private]

Definition at line 37 of file vgl_triangle_scan_iterator.h.

template<class T >
int vgl_triangle_scan_iterator< T >::startx_ [private]

Definition at line 38 of file vgl_triangle_scan_iterator.h.

template<class T >
int vgl_triangle_scan_iterator< T >::x0 [private]

Definition at line 46 of file vgl_triangle_scan_iterator.h.

template<class T >
int vgl_triangle_scan_iterator< T >::x1 [private]

Definition at line 46 of file vgl_triangle_scan_iterator.h.

template<class T >
int vgl_triangle_scan_iterator< T >::y0 [private]

Definition at line 45 of file vgl_triangle_scan_iterator.h.

template<class T >
int vgl_triangle_scan_iterator< T >::y1 [private]

Definition at line 45 of file vgl_triangle_scan_iterator.h.


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