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

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

#include <grid.hpp>

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

Collaboration graph
[legend]
List of all members.

Detailed Description

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

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

Definition at line 651 of file grid.hpp.

Public Member Functions

 TriangleCellIteratorBase (GridType &g, Geometry::Triangle t)
 Constructor for an iterator over all cells whose closures intersect a given triangle.

 TriangleCellIteratorBase ()
 Constructor for an end iterator.

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

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

TriangleCellIteratorBase<
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 triangle.

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

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

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


Constructor & Destructor Documentation

template<class ItemType>
template<class GridType, class CellType>
Arak::Grid< ItemType >::TriangleCellIteratorBase< GridType, CellType >::TriangleCellIteratorBase GridType &  g,
Geometry::Triangle  t
[inline]
 

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

Parameters:
g a grid
t the triangle

Definition at line 698 of file grid.hpp.

References Arak::Grid< ItemType >::Cell::col(), Arak::Grid< ItemType >::ConstLineCellIterator, Arak::Grid< ItemType >::TriangleCellIteratorBase< GridType, CellType >::imin, Arak::Grid< ItemType >::TriangleCellIteratorBase< GridType, CellType >::jmaxs, Arak::Grid< ItemType >::TriangleCellIteratorBase< GridType, CellType >::jmins, Arak::Geometry::Rectangle, Arak::Grid< ItemType >::Cell::row(), and Arak::Geometry::Triangle.

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

Constructor for an end iterator.

Definition at line 745 of file grid.hpp.


Member Function Documentation

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

Definition at line 788 of file grid.hpp.

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

Definition at line 752 of file grid.hpp.

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

Definition at line 763 of file grid.hpp.

References Arak::Grid< ItemType >::TriangleCellIteratorBase< GridType, CellType >::imin, Arak::Grid< ItemType >::TriangleCellIteratorBase< GridType, CellType >::jmaxs, and Arak::Grid< ItemType >::TriangleCellIteratorBase< GridType, CellType >::jmins.

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

Increment operators.

Definition at line 758 of file grid.hpp.

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

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

Accessors.

Definition at line 787 of file grid.hpp.

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

Comparison operators.

Definition at line 750 of file grid.hpp.

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


Member Data Documentation

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

The current cell of the iterator.

Definition at line 658 of file grid.hpp.

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

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

The grid.

Definition at line 663 of file grid.hpp.

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

The maximum i coordinate of all cells intersecting the triangle.

Definition at line 673 of file grid.hpp.

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

The minimum i coordinate of all cells intersecting the triangle.

Definition at line 668 of file grid.hpp.

Referenced by Arak::Grid< ItemType >::TriangleCellIteratorBase< GridType, CellType >::operator++(), and Arak::Grid< ItemType >::TriangleCellIteratorBase< GridType, CellType >::TriangleCellIteratorBase().

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

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

Definition at line 687 of file grid.hpp.

Referenced by Arak::Grid< ItemType >::TriangleCellIteratorBase< GridType, CellType >::operator++(), and Arak::Grid< ItemType >::TriangleCellIteratorBase< GridType, CellType >::TriangleCellIteratorBase().

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

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

Definition at line 680 of file grid.hpp.

Referenced by Arak::Grid< ItemType >::TriangleCellIteratorBase< GridType, CellType >::operator++(), and Arak::Grid< ItemType >::TriangleCellIteratorBase< GridType, CellType >::TriangleCellIteratorBase().


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