walberla::geometry::CellAABB Struct Reference

Detailed Description

Helper class to provide a cell based axis-aligned bounding box.

The AABB includes the cells with their x coordinate lying in [xBegin, xEnd], their y coordinate lying in [yBegin, yEnd] and their z coordinate lying in [zBegin, zEnd].

#include <BasicVoxelFileReader.h>

Public Member Functions

 CellAABB ()
 Constructor to initialize all members to 0. More...
 
 CellAABB (std::size_t _xBegin, std::size_t _yBegin, std::size_t _zBegin, std::size_t _xEnd, std::size_t _yEnd, std::size_t _zEnd)
 Constructor to initialize all members. More...
 
std::size_t numCells () const
 Gets the number cells included in the AABB. More...
 
std::size_t xSize () const
 Gets the extent of the AABB in z direction. More...
 
std::size_t ySize () const
 Gets the extent of the AABB in y direction. More...
 
std::size_t zSize () const
 Gets the extent of the AABB in z direction. More...
 

Public Attributes

std::size_t xBegin
 The minimal x coordinate of all cells included in the AABB. More...
 
std::size_t yBegin
 The minimal y coordinate of all cells included in the AABB. More...
 
std::size_t zBegin
 The minimal z coordinate of all cells included in the AABB. More...
 
std::size_t xEnd
 The maximal x coordinate of all cells included in the AABB. More...
 
std::size_t yEnd
 The maximal y coordinate of all cells included in the AABB. More...
 
std::size_t zEnd
 The maximal z coordinate of all cells included in the AABB. More...
 

Constructor & Destructor Documentation

◆ CellAABB() [1/2]

walberla::geometry::CellAABB::CellAABB ( )
inline

Constructor to initialize all members to 0.

Postcondition
xBegin = 0.
yBegin = 0.
zBegin = 0.
xEnd = 0.
yEnd = 0.
zEnd = 0.
xSize() = 1
ySize() = 1
zSize() = 1
numCells() = 1

◆ CellAABB() [2/2]

walberla::geometry::CellAABB::CellAABB ( std::size_t  _xBegin,
std::size_t  _yBegin,
std::size_t  _zBegin,
std::size_t  _xEnd,
std::size_t  _yEnd,
std::size_t  _zEnd 
)
inline

Constructor to initialize all members.

Precondition
_xBegin <= _xEnd.
_yBegin <= _yEnd.
_zBegin <= _zEnd.
Postcondition
xBegin = _xBegin.
yBegin = _yBegin.
zBegin = _zBegin.
xEnd = _xEnd.
yEnd = _yEnd.
zEnd = _zEnd.
Parameters
_xBeginThe minimal x coordinate of all cells included in the AABB.
_yBeginThe minimal y coordinate of all cells included in the AABB.
_zBeginThe minimal z coordinate of all cells included in the AABB.
_xEndThe maximal x coordinate of all cells included in the AABB.
_yEndThe maximal y coordinate of all cells included in the AABB.
_zEndThe maximal z coordinate of all cells included in the AABB.

Member Function Documentation

◆ numCells()

std::size_t walberla::geometry::CellAABB::numCells ( ) const
inline

Gets the number cells included in the AABB.

Precondition
xBegin <= xEnd.
yBegin <= yEnd.
zBegin <= zEnd.
Returns
xSize() * ySize() * zSize().

◆ xSize()

std::size_t walberla::geometry::CellAABB::xSize ( ) const
inline

Gets the extent of the AABB in z direction.

Precondition
xBegin <= xEnd.
Returns
xEnd - xBegin + 1.

◆ ySize()

std::size_t walberla::geometry::CellAABB::ySize ( ) const
inline

Gets the extent of the AABB in y direction.

Precondition
yBegin <= yEnd.
Returns
yEnd - yBegin + 1.

◆ zSize()

std::size_t walberla::geometry::CellAABB::zSize ( ) const
inline

Gets the extent of the AABB in z direction.

Precondition
zBegin <= zEnd.
Returns
zEnd - zBegin + 1.

Member Data Documentation

◆ xBegin

std::size_t walberla::geometry::CellAABB::xBegin

The minimal x coordinate of all cells included in the AABB.

◆ xEnd

std::size_t walberla::geometry::CellAABB::xEnd

The maximal x coordinate of all cells included in the AABB.

◆ yBegin

std::size_t walberla::geometry::CellAABB::yBegin

The minimal y coordinate of all cells included in the AABB.

◆ yEnd

std::size_t walberla::geometry::CellAABB::yEnd

The maximal y coordinate of all cells included in the AABB.

◆ zBegin

std::size_t walberla::geometry::CellAABB::zBegin

The minimal z coordinate of all cells included in the AABB.

◆ zEnd

std::size_t walberla::geometry::CellAABB::zEnd

The maximal z coordinate of all cells included in the AABB.


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