HGridCell Class Reference

#include <HGridCell.h>

Public Member Functions

 HGridCell ()
 
bool equals (int x, int y, int z, unsigned int level) const
 Checks if the given (x,y,z,level) is the same as the ones in this cell. More...
 
bool equals (int x, int y, unsigned int level) const
 Checks if the given (x,y,z,level) is the same as the ones in this cell, 2D version. More...
 
bool operator== (const HGridCell &other) const
 Checks if the given cell is the same as the given cell. More...
 
int getHGridX () const
 
void setHGridX (int HGridX)
 
int getHGridY () const
 
void setHGridY (int HGridY)
 
int getHGridZ () const
 
void setHGridZ (int HGridZ)
 
unsigned int getHGridLevel () const
 
void setHGridLevel (unsigned int HGridLevel)
 

Private Attributes

int hGridX_
 Cell position in the grid. More...
 
int hGridY_
 
int hGridZ_
 
unsigned int hGridLevel_
 HGrid-level of the particle containing this cell. More...
 

Detailed Description

Contains the hGrid-information for a certain particle: x,y,z and level of the particle containing this. Note, that each particle contains a HGridCell. All methods are inline for speed reasons: they are called VERY often, so we do need performance here.

Constructor & Destructor Documentation

◆ HGridCell()

HGridCell::HGridCell ( )
inline
35  : hGridX_(0), hGridY_(0), hGridZ_(0), hGridLevel_(0)
36  {}
unsigned int hGridLevel_
HGrid-level of the particle containing this cell.
Definition: HGridCell.h:101
int hGridY_
Definition: HGridCell.h:99
int hGridZ_
Definition: HGridCell.h:99
int hGridX_
Cell position in the grid.
Definition: HGridCell.h:99

Member Function Documentation

◆ equals() [1/2]

◆ equals() [2/2]

bool HGridCell::equals ( int  x,
int  y,
unsigned int  level 
) const
inline

Checks if the given (x,y,z,level) is the same as the ones in this cell, 2D version.

46  {
47  return (x == hGridX_ && y == hGridY_ && level == hGridLevel_);
48  }

References hGridLevel_, hGridX_, and hGridY_.

◆ getHGridLevel()

unsigned int HGridCell::getHGridLevel ( ) const
inline

◆ getHGridX()

int HGridCell::getHGridX ( ) const
inline
57  {
58  return hGridX_;
59  }

References hGridX_.

Referenced by HGrid::computeHashBucketIndex(), BaseParticle::getHGridX(), and BaseParticle::printHGrid().

◆ getHGridY()

int HGridCell::getHGridY ( ) const
inline
67  {
68  return hGridY_;
69  }

References hGridY_.

Referenced by HGrid::computeHashBucketIndex(), BaseParticle::getHGridY(), and BaseParticle::printHGrid().

◆ getHGridZ()

int HGridCell::getHGridZ ( ) const
inline
77  {
78  return hGridZ_;
79  }

References hGridZ_.

Referenced by HGrid::computeHashBucketIndex(), BaseParticle::getHGridZ(), and BaseParticle::printHGrid().

◆ operator==()

bool HGridCell::operator== ( const HGridCell other) const
inline

Checks if the given cell is the same as the given cell.

52  {
53  return equals(other.hGridX_, other.hGridY_, other.hGridZ_, other.hGridLevel_);
54  }
bool equals(int x, int y, int z, unsigned int level) const
Checks if the given (x,y,z,level) is the same as the ones in this cell.
Definition: HGridCell.h:39

References equals(), hGridLevel_, hGridX_, hGridY_, and hGridZ_.

◆ setHGridLevel()

void HGridCell::setHGridLevel ( unsigned int  HGridLevel)
inline
92  {
93  hGridLevel_ = HGridLevel;
94  }

References hGridLevel_.

Referenced by BaseParticle::BaseParticle(), and BaseParticle::setHGridLevel().

◆ setHGridX()

void HGridCell::setHGridX ( int  HGridX)
inline
62  {
63  hGridX_ = HGridX;
64  }

References hGridX_.

Referenced by BaseParticle::BaseParticle(), and BaseParticle::setHGridX().

◆ setHGridY()

void HGridCell::setHGridY ( int  HGridY)
inline
72  {
73  hGridY_ = HGridY;
74  }

References hGridY_.

Referenced by BaseParticle::BaseParticle(), and BaseParticle::setHGridY().

◆ setHGridZ()

void HGridCell::setHGridZ ( int  HGridZ)
inline
82  {
83  hGridZ_ = HGridZ;
84  }

References hGridZ_.

Referenced by BaseParticle::BaseParticle(), and BaseParticle::setHGridZ().

Member Data Documentation

◆ hGridLevel_

unsigned int HGridCell::hGridLevel_
private

HGrid-level of the particle containing this cell.

Referenced by equals(), getHGridLevel(), operator==(), and setHGridLevel().

◆ hGridX_

int HGridCell::hGridX_
private

Cell position in the grid.

Referenced by equals(), getHGridX(), operator==(), and setHGridX().

◆ hGridY_

int HGridCell::hGridY_
private

◆ hGridZ_

int HGridCell::hGridZ_
private

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