The PointsGridIterator class provides an interface to walk through all grid elements of a point grid. More...
#include <PointsGrid.h>
Classes | |
struct | GridElement |
Checks if a grid position is already visited by NextOnRay(). More... | |
Public Member Functions | |
Base::BoundBox3d | GetBoundBox () const |
Returns the bounding box of the current grid element. More... | |
void | GetElements (std::vector< unsigned long > &raulElements) const |
Returns indices of the elements in the current grid. More... | |
PointsGridIterator (const PointsGrid &rclG) | |
Construction. More... | |
Iteration | |
void | Init () |
Sets the iterator to the first element. More... | |
bool | More () const |
Checks if the iterator has not yet reached the end position. More... | |
void | Next () |
Go to the next grid. More... | |
Tests with rays | |
bool | InitOnRay (const Base::Vector3d &rclPt, const Base::Vector3d &rclDir, std::vector< unsigned long > &raulElements) |
Searches for facets around the ray. More... | |
bool | InitOnRay (const Base::Vector3d &rclPt, const Base::Vector3d &rclDir, float fMaxSearchArea, std::vector< unsigned long > &raulElements) |
Searches for facets around the ray. More... | |
bool | NextOnRay (std::vector< unsigned long > &raulElements) |
Searches for facets around the ray. More... | |
void | GetGridPos (unsigned long &rulX, unsigned long &rulY, unsigned long &rulZ) const |
Returns the grid number of the current position. More... | |
The PointsGridIterator class provides an interface to walk through all grid elements of a point grid.
PointsGridIterator::PointsGridIterator | ( | const PointsGrid & | rclG | ) |
Construction.
Base::BoundBox3d Points::PointsGridIterator::GetBoundBox | ( | ) | const |
Returns the bounding box of the current grid element.
Referenced by Points::PointsGrid::Verify().
void Points::PointsGridIterator::GetElements | ( | std::vector< unsigned long > & | raulElements | ) | const |
Returns indices of the elements in the current grid.
Referenced by Points::PointsGrid::Verify().
void Points::PointsGridIterator::GetGridPos | ( | unsigned long & | rulX, |
unsigned long & | rulY, | ||
unsigned long & | rulZ | ||
) | const |
Returns the grid number of the current position.
void Points::PointsGridIterator::Init | ( | ) |
Sets the iterator to the first element.
Referenced by Points::PointsGrid::Verify().
bool PointsGridIterator::InitOnRay | ( | const Base::Vector3d & | rclPt, |
const Base::Vector3d & | rclDir, | ||
float | fMaxSearchArea, | ||
std::vector< unsigned long > & | raulElements | ||
) |
Searches for facets around the ray.
References InitOnRay().
bool PointsGridIterator::InitOnRay | ( | const Base::Vector3d & | rclPt, |
const Base::Vector3d & | rclDir, | ||
std::vector< unsigned long > & | raulElements | ||
) |
Searches for facets around the ray.
Referenced by InitOnRay().
bool Points::PointsGridIterator::More | ( | void | ) | const |
Checks if the iterator has not yet reached the end position.
Referenced by Points::PointsGrid::Verify().
void Points::PointsGridIterator::Next | ( | void | ) |
Go to the next grid.
Referenced by Points::PointsGrid::Verify().
bool PointsGridIterator::NextOnRay | ( | std::vector< unsigned long > & | raulElements | ) |
Searches for facets around the ray.
References Base::BoundBox3< double >::BACK, Base::BoundBox3< double >::BOTTOM, Base::BoundBox3< double >::FRONT, Base::BoundBox3< double >::INVALID, Base::BoundBox3< double >::LEFT, Base::BoundBox3< double >::RIGHT, and Base::BoundBox3< double >::TOP.