Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Arak::Grid< ItemType >::ConvexPolygonCellIteratorBase< GridType, CellType > Class Template Reference

#include <grid.hpp>

Collaboration diagram for Arak::Grid< ItemType >::ConvexPolygonCellIteratorBase< GridType, CellType >:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<class ItemType>
template<class GridType, class CellType>
class Arak::Grid< ItemType >::ConvexPolygonCellIteratorBase< GridType, CellType >

A forwards iterator that ranges over the cells whose closures intersect a given convex polygon.

Definition at line 811 of file grid.hpp.

Public Member Functions

 ConvexPolygonCellIteratorBase (GridType &g, const Geometry::Polygon &p)
 Constructor for an iterator over all cells whose closures intersect a given convex polygon.

 ConvexPolygonCellIteratorBase ()
 Constructor for an end iterator.

bool operator== (const ConvexPolygonCellIteratorBase< GridType, CellType > &other) const
 Comparison operators.

bool operator!= (const ConvexPolygonCellIteratorBase< GridType, CellType > &other) const
ConvexPolygonCellIteratorBase<
GridType, CellType > & 
operator++ (int)
 Increment operators.

ConvexPolygonCellIteratorBase<
GridType, CellType > & 
operator++ ()
CellType * operator-> () const
 Accessors.

CellType & operator * () const

Protected Attributes

CellType * curCell
 The current cell of the iterator.

GridType * grid
 The grid.

int imin
 The minimum i coordinate of all cells intersecting the polygon.

int imax
 The maximum i coordinate of all cells intersecting the polygon.

std::vector< int > jmins
 Stores for each column between imin and imax (inclusive) the minimum j coordinate of all cells intersecting the polygon.

std::vector< int > jmaxs
 Stores for each column between imin and imax (inclusive) the maximum j coordinate of all cells intersecting the polygon.


Constructor & Destructor Documentation

template<class ItemType>
template<class GridType, class CellType>
Arak::Grid< ItemType >::ConvexPolygonCellIteratorBase< GridType, CellType >::ConvexPolygonCellIteratorBase GridType &  g,
const Geometry::Polygon p
[inline]
 

Constructor for an iterator over all cells whose closures intersect a given convex polygon.

Parameters:
g a grid
p a convex polygon

Definition at line 860 of file grid.hpp.

References Arak::Grid< ItemType >::Cell::col(), Arak::Grid< ItemType >::ConstLineCellIterator, Arak::Geometry::Polygon, Arak::Geometry::Rectangle, and Arak::Grid< ItemType >::Cell::row().

template<class ItemType>
template<class GridType, class CellType>
Arak::Grid< ItemType >::ConvexPolygonCellIteratorBase< GridType, CellType >::ConvexPolygonCellIteratorBase  )  [inline]
 

Constructor for an end iterator.

Definition at line 911 of file grid.hpp.


Member Function Documentation

template<class ItemType>
template<class GridType, class CellType>
CellType& Arak::Grid< ItemType >::ConvexPolygonCellIteratorBase< GridType, CellType >::operator *  )  const [inline]
 

Definition at line 954 of file grid.hpp.

template<class ItemType>
template<class GridType, class CellType>
bool Arak::Grid< ItemType >::ConvexPolygonCellIteratorBase< GridType, CellType >::operator!= const ConvexPolygonCellIteratorBase< GridType, CellType > &  other  )  const [inline]
 

Definition at line 918 of file grid.hpp.

template<class ItemType>
template<class GridType, class CellType>
ConvexPolygonCellIteratorBase<GridType,CellType>& Arak::Grid< ItemType >::ConvexPolygonCellIteratorBase< GridType, CellType >::operator++  )  [inline]
 

Definition at line 929 of file grid.hpp.

template<class ItemType>
template<class GridType, class CellType>
ConvexPolygonCellIteratorBase<GridType,CellType>& Arak::Grid< ItemType >::ConvexPolygonCellIteratorBase< GridType, CellType >::operator++ int   )  [inline]
 

Increment operators.

Definition at line 924 of file grid.hpp.

References Arak::Grid< ItemType >::ConvexPolygonCellIterator.

template<class ItemType>
template<class GridType, class CellType>
CellType* Arak::Grid< ItemType >::ConvexPolygonCellIteratorBase< GridType, CellType >::operator->  )  const [inline]
 

Accessors.

Definition at line 953 of file grid.hpp.

template<class ItemType>
template<class GridType, class CellType>
bool Arak::Grid< ItemType >::ConvexPolygonCellIteratorBase< GridType, CellType >::operator== const ConvexPolygonCellIteratorBase< GridType, CellType > &  other  )  const [inline]
 

Comparison operators.

Definition at line 916 of file grid.hpp.

References Arak::Grid< ItemType >::ConvexPolygonCellIteratorBase< GridType, CellType >::curCell.


Member Data Documentation

template<class ItemType>
template<class GridType, class CellType>
CellType* Arak::Grid< ItemType >::ConvexPolygonCellIteratorBase< GridType, CellType >::curCell [protected]
 

The current cell of the iterator.

Definition at line 818 of file grid.hpp.

Referenced by Arak::Grid< ItemType >::ConvexPolygonCellIteratorBase< GridType, CellType >::operator==().

template<class ItemType>
template<class GridType, class CellType>
GridType* Arak::Grid< ItemType >::ConvexPolygonCellIteratorBase< GridType, CellType >::grid [protected]
 

The grid.

Definition at line 823 of file grid.hpp.

template<class ItemType>
template<class GridType, class CellType>
int Arak::Grid< ItemType >::ConvexPolygonCellIteratorBase< GridType, CellType >::imax [protected]
 

The maximum i coordinate of all cells intersecting the polygon.

Definition at line 835 of file grid.hpp.

template<class ItemType>
template<class GridType, class CellType>
int Arak::Grid< ItemType >::ConvexPolygonCellIteratorBase< GridType, CellType >::imin [protected]
 

The minimum i coordinate of all cells intersecting the polygon.

Definition at line 829 of file grid.hpp.

template<class ItemType>
template<class GridType, class CellType>
std::vector<int> Arak::Grid< ItemType >::ConvexPolygonCellIteratorBase< GridType, CellType >::jmaxs [protected]
 

Stores for each column between imin and imax (inclusive) the maximum j coordinate of all cells intersecting the polygon.

Definition at line 849 of file grid.hpp.

template<class ItemType>
template<class GridType, class CellType>
std::vector<int> Arak::Grid< ItemType >::ConvexPolygonCellIteratorBase< GridType, CellType >::jmins [protected]
 

Stores for each column between imin and imax (inclusive) the minimum j coordinate of all cells intersecting the polygon.

Definition at line 842 of file grid.hpp.


The documentation for this class was generated from the following file:
Generated on Wed May 25 14:41:20 2005 for Arak by doxygen 1.3.6