The MeshGridIterator class provides an interface to walk through all grid elements of a mesh grid. More...
#include <Grid.h>
Classes | |
struct | GridElement |
Checks if a grid position is already visited by NextOnRay(). More... | |
Public Member Functions | |
Base::BoundBox3f | GetBoundBox () const |
Returns the bounding box of the current grid element. More... | |
unsigned long | GetCtElements () const |
Returns the number of elements in the current grid. More... | |
void | GetElements (std::vector< ElementIndex > &raulElements) const |
Returns indices of the elements in the current grid. More... | |
MeshGridIterator (const MeshGrid &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::Vector3f &rclPt, const Base::Vector3f &rclDir, std::vector< ElementIndex > &raulElements) |
Searches for facets around the ray. More... | |
bool | InitOnRay (const Base::Vector3f &rclPt, const Base::Vector3f &rclDir, float fMaxSearchArea, std::vector< ElementIndex > &raulElements) |
Searches for facets around the ray. More... | |
bool | NextOnRay (std::vector< ElementIndex > &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 MeshGridIterator class provides an interface to walk through all grid elements of a mesh grid.
MeshGridIterator::MeshGridIterator | ( | const MeshGrid & | rclG | ) |
Construction.
Base::BoundBox3f MeshCore::MeshGridIterator::GetBoundBox | ( | ) | const |
Returns the bounding box of the current grid element.
Referenced by MeshCore::MeshTrimByPlane::CheckFacets(), MeshCore::MeshAlgorithm::CheckFacets(), MeshCore::MeshTrimming::CheckFacets(), MeshCore::MeshAlgorithm::CutWithPlane(), MeshCore::MeshAlgorithm::GetFacetsFromPlane(), MeshCore::MeshAlgorithm::GetFacetsFromToolMesh(), MeshCore::MeshProjection::projectLineOnMesh(), MeshCore::MeshFacetGrid::Verify(), and MeshCore::MeshPointGrid::Verify().
unsigned long MeshCore::MeshGridIterator::GetCtElements | ( | ) | const |
Returns the number of elements in the current grid.
void MeshCore::MeshGridIterator::GetElements | ( | std::vector< ElementIndex > & | raulElements | ) | const |
Returns indices of the elements in the current grid.
Referenced by MeshCore::MeshTrimByPlane::CheckFacets(), MeshCore::MeshAlgorithm::CheckFacets(), MeshCore::MeshTrimming::CheckFacets(), MeshCore::MeshAlgorithm::CutWithPlane(), MeshCore::MeshEvalSelfIntersection::Evaluate(), MeshCore::MeshAlgorithm::GetFacetsFromPlane(), MeshCore::MeshAlgorithm::GetFacetsFromToolMesh(), MeshCore::MeshEvalSelfIntersection::GetIntersections(), MeshCore::MeshProjection::projectLineOnMesh(), MeshCore::MeshFacetGrid::Verify(), and MeshCore::MeshPointGrid::Verify().
void MeshCore::MeshGridIterator::GetGridPos | ( | unsigned long & | rulX, |
unsigned long & | rulY, | ||
unsigned long & | rulZ | ||
) | const |
Returns the grid number of the current position.
void MeshCore::MeshGridIterator::Init | ( | ) |
Sets the iterator to the first element.
Referenced by MeshCore::MeshTrimByPlane::CheckFacets(), MeshCore::MeshAlgorithm::CheckFacets(), MeshCore::MeshTrimming::CheckFacets(), MeshCore::MeshAlgorithm::CutWithPlane(), MeshCore::MeshEvalSelfIntersection::Evaluate(), MeshCore::MeshAlgorithm::GetFacetsFromPlane(), MeshCore::MeshAlgorithm::GetFacetsFromToolMesh(), MeshCore::MeshEvalSelfIntersection::GetIntersections(), MeshCore::MeshProjection::projectLineOnMesh(), MeshCore::MeshFacetGrid::Verify(), and MeshCore::MeshPointGrid::Verify().
bool MeshGridIterator::InitOnRay | ( | const Base::Vector3f & | rclPt, |
const Base::Vector3f & | rclDir, | ||
float | fMaxSearchArea, | ||
std::vector< ElementIndex > & | raulElements | ||
) |
Searches for facets around the ray.
References InitOnRay().
bool MeshGridIterator::InitOnRay | ( | const Base::Vector3f & | rclPt, |
const Base::Vector3f & | rclDir, | ||
std::vector< ElementIndex > & | raulElements | ||
) |
Searches for facets around the ray.
Referenced by InitOnRay(), and MeshCore::MeshAlgorithm::NearestFacetOnRay().
bool MeshCore::MeshGridIterator::More | ( | void | ) | const |
Checks if the iterator has not yet reached the end position.
Referenced by MeshCore::MeshTrimByPlane::CheckFacets(), MeshCore::MeshAlgorithm::CheckFacets(), MeshCore::MeshTrimming::CheckFacets(), MeshCore::MeshAlgorithm::CutWithPlane(), MeshCore::MeshEvalSelfIntersection::Evaluate(), MeshCore::MeshAlgorithm::GetFacetsFromPlane(), MeshCore::MeshAlgorithm::GetFacetsFromToolMesh(), MeshCore::MeshEvalSelfIntersection::GetIntersections(), MeshCore::MeshProjection::projectLineOnMesh(), MeshCore::MeshFacetGrid::Verify(), and MeshCore::MeshPointGrid::Verify().
void MeshCore::MeshGridIterator::Next | ( | void | ) |
Go to the next grid.
Referenced by MeshCore::MeshTrimByPlane::CheckFacets(), MeshCore::MeshAlgorithm::CheckFacets(), MeshCore::MeshTrimming::CheckFacets(), MeshCore::MeshAlgorithm::CutWithPlane(), MeshCore::MeshEvalSelfIntersection::Evaluate(), MeshCore::MeshAlgorithm::GetFacetsFromPlane(), MeshCore::MeshAlgorithm::GetFacetsFromToolMesh(), MeshCore::MeshEvalSelfIntersection::GetIntersections(), MeshCore::MeshProjection::projectLineOnMesh(), MeshCore::MeshFacetGrid::Verify(), and MeshCore::MeshPointGrid::Verify().
bool MeshGridIterator::NextOnRay | ( | std::vector< ElementIndex > & | raulElements | ) |
Searches for facets around the ray.
References Base::BoundBox3< _Precision >::BACK, Base::BoundBox3< _Precision >::BOTTOM, Base::BoundBox3< _Precision >::FRONT, Base::BoundBox3< _Precision >::INVALID, Base::BoundBox3< _Precision >::LEFT, Base::BoundBox3< _Precision >::RIGHT, and Base::BoundBox3< _Precision >::TOP.
Referenced by MeshCore::MeshAlgorithm::NearestFacetOnRay().