Classes | Public Member Functions | Public Attributes | Private Attributes | List of all members
vgl_triangle_scan_iterator< T > Class Template Reference

Optimized polygon scan iterator for triangles. More...

#include <vgl_fwd.h>

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

Classes

struct  pt
 Vertices of triangle. More...
 

Public Member Functions

void reset () override
 Resets the scan iterator to before the first scan line. More...
 
bool next () override
 Tries to move to the next scan line. More...
 
int scany () const override
 y-coordinate of the current scan line. More...
 
int startx () const override
 Returns starting x-value of the current scan line. More...
 
int endx () const override
 Returns ending x-value of the current scan line. More...
 
int count ()
 Number of image points (= integer grid points) inside the region. More...
 

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 34 of file vgl_fwd.h.

Member Function Documentation

◆ count()

int vgl_region_scan_iterator::count ( )
inlineinherited

Number of image points (= integer grid points) inside the region.

Definition at line 48 of file vgl_region_scan_iterator.h.

◆ endx()

template<class T >
int vgl_triangle_scan_iterator< T >::endx ( ) const
inlineoverridevirtual

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.

◆ next()

template<class T >
bool vgl_triangle_scan_iterator< T >::next ( )
overridevirtual

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 140 of file vgl_triangle_scan_iterator.hxx.

◆ reset()

template<class T >
void vgl_triangle_scan_iterator< T >::reset ( )
overridevirtual

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 72 of file vgl_triangle_scan_iterator.hxx.

◆ scany()

template<class T >
int vgl_triangle_scan_iterator< T >::scany ( ) const
inlineoverridevirtual

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.

◆ startx()

template<class T >
int vgl_triangle_scan_iterator< T >::startx ( ) const
inlineoverridevirtual

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

◆ a

◆ b

◆ c

◆ data

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

Definition at line 49 of file vgl_triangle_scan_iterator.h.

◆ endx_

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

Definition at line 39 of file vgl_triangle_scan_iterator.h.

◆ g

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

Definition at line 48 of file vgl_triangle_scan_iterator.h.

◆ scany_

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

Definition at line 37 of file vgl_triangle_scan_iterator.h.

◆ startx_

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

Definition at line 38 of file vgl_triangle_scan_iterator.h.

◆ x0

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

Definition at line 46 of file vgl_triangle_scan_iterator.h.

◆ x1

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

Definition at line 46 of file vgl_triangle_scan_iterator.h.

◆ y0

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

Definition at line 45 of file vgl_triangle_scan_iterator.h.

◆ y1

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: