ergo
Box Class Reference

Class Box provides an ability to determine box containing all Objects. More...

#include <dft_common.h>

Public Member Functions

real getDistanceTo (const real *v) const
 Returns the shortest distance of the border of the box to the specified point in space. More...
 
int getMaxDim () const
 Return the index of the largest Cartesian dimension: 0 for x, 1 for y and 2 for z. More...
 
real size (int dim) const
 
bool overlapsWith (const real *center, real radius) const
 
bool contains (const real *p) const
 Determines whether given point is inside the box. More...
 

Public Attributes

real lo [3]
 
real hi [3]
 

Detailed Description

Class Box provides an ability to determine box containing all Objects.

The class Object must provide field center[] and method radius().

Member Function Documentation

◆ contains()

bool Box::contains ( const real p) const
inline

Determines whether given point is inside the box.

In order to avoid double counting, the points that are overlap with the lower limits are included but those that overlap with the higher limit are excluded.

References hi, and lo.

Referenced by Stream::saveAtomGridInBox().

◆ getDistanceTo()

real Box::getDistanceTo ( const real v) const

Returns the shortest distance of the border of the box to the specified point in space.

References Vector3D::dist(), hi, and lo.

Referenced by overlapsWith(), and Stream::saveAtomGridInBox().

◆ getMaxDim()

int Box::getMaxDim ( ) const

Return the index of the largest Cartesian dimension: 0 for x, 1 for y and 2 for z.

References hi, and lo.

Referenced by clusterShells(), ShellTree::init(), Stream::saveAtomsRecursively(), and ActiveBfShells::setForBox().

◆ overlapsWith()

bool Box::overlapsWith ( const real center,
real  radius 
) const
inline

References getDistanceTo().

Referenced by Stream::saveAtomsRecursively().

◆ size()

real Box::size ( int  dim) const
inline

References hi, and lo.

Referenced by Stream::saveAtomsRecursively(), and ActiveBfShells::setForBox().

Member Data Documentation

◆ hi

◆ lo


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