iLand
Public Member Functions | List of all members
GridIterator< T > Class Template Reference

GridIterator is a iterator used to navigate over grids with different size. More...

#include <griditerator.h>

Public Member Functions

 GridIterator ()
 
 GridIterator (const Grid< T > &targetGrid)
 

Detailed Description

template<class T>
class GridIterator< T >

GridIterator is a iterator used to navigate over grids with different size.

Usage: GridIterator<float> gi(HeightGrid); // create the iterator and link to a grid of type float gi.setRect(QRect(10., 10., 1120., 120.)); while (float *p=gi.next()) { do something with *p } usage (2) gi.targetSize(targetGrid.size()); gi.setTargetIndex(targetGrid.indexOf(coord)); while (float *p=gi.next()) p++; usage(3) gi.neighboursOf(index); // 8-neighbourhood gi.neighboursOf(index, 2); // 2 rings, ..24 neighbours while (float *p=gi.next()) p=0.;

Constructor & Destructor Documentation

◆ GridIterator() [1/2]

template<class T >
GridIterator< T >::GridIterator ( )

◆ GridIterator() [2/2]

template<class T >
GridIterator< T >::GridIterator ( const Grid< T > &  targetGrid)

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