Kinetic Visualization (Visualisierung 2 - S2012)
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Private Attributes
ParticleMapIterator Class Reference

The iterator for the particle datastructure with some extra members, like sigma. More...

#include <ParticleMap.h>

List of all members.

Public Member Functions

 ParticleMapIterator (int x, int y, int z, float sigma, int w, int h, int d, Map3D &m)
 ~ParticleMapIterator ()
bool next ()
Particleget ()
float getGaussian ()

Private Attributes

int _x
int _y
int _z
float _sigma
int _w
int _h
int _d
Map3D_map
int _posX
int _posY
int _posZ
int _fromX
int _fromY
int _fromZ
int _toX
int _toY
int _toZ
std::list< Particle * >::iterator _current
bool _firstRun

Detailed Description

The iterator for the particle datastructure with some extra members, like sigma.

  Note: This iterator deliberatly differs from STL iterators! The reason: there is no real good way to 

represent .end()! On construction it starts with the first neighbor. With the getters the elements can be obtained. If next() returns false the iterator is on it's end.

Example: ParticleMapIterator it = map.iterator(1,1,1,0.5); while (it.next()) { Particle *p = it.get(); // ... }


Constructor & Destructor Documentation

ParticleMapIterator::ParticleMapIterator ( int  x,
int  y,
int  z,
float  sigma,
int  w,
int  h,
int  d,
Map3D m 
)
ParticleMapIterator::~ParticleMapIterator ( )

Member Function Documentation

Particle * ParticleMapIterator::get ( )
float ParticleMapIterator::getGaussian ( )
bool ParticleMapIterator::next ( )

Advances the pointer and returns true if there is a valid element after advancing the pointer.


Member Data Documentation

std::list<Particle *>::iterator ParticleMapIterator::_current
private
int ParticleMapIterator::_d
private
bool ParticleMapIterator::_firstRun
private
int ParticleMapIterator::_fromX
private
int ParticleMapIterator::_fromY
private
int ParticleMapIterator::_fromZ
private
int ParticleMapIterator::_h
private
Map3D& ParticleMapIterator::_map
private
int ParticleMapIterator::_posX
private
int ParticleMapIterator::_posY
private
int ParticleMapIterator::_posZ
private
float ParticleMapIterator::_sigma
private
int ParticleMapIterator::_toX
private
int ParticleMapIterator::_toY
private
int ParticleMapIterator::_toZ
private
int ParticleMapIterator::_w
private
int ParticleMapIterator::_x
private
int ParticleMapIterator::_y
private
int ParticleMapIterator::_z
private

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