Special grid class that stores point indices of the mesh object in its grids. More...
#include <Grid.h>
Public Member Functions | |
unsigned long | FindElements (const Base::Vector3f &rclPoint, std::set< unsigned long > &aulElements) const |
Finds all points that lie in the same grid as the point rclPoint. | |
virtual void | Validate (void) |
Validates the grid structure and rebuilds it if needed. | |
virtual void | Validate (const MeshKernel &rclM) |
Validates the grid structure and rebuilds it if needed. | |
virtual bool | Verify () const |
Verifies the grid structure and returns false if inconsistencies are found. | |
Construction | |
MeshPointGrid (const MeshKernel &rclM, unsigned long ulX, unsigned long ulY, unsigned long ulZ) | |
Construction. | |
MeshPointGrid (const MeshKernel &rclM, float fGridLen) | |
Construction. | |
MeshPointGrid (const MeshKernel &rclM, int iCtGridPerAxis) | |
Construction. | |
MeshPointGrid (const MeshKernel &rclM) | |
Construction. | |
MeshPointGrid (void) | |
Construction. | |
virtual | ~MeshPointGrid (void) |
Destruction. | |
Protected Member Functions | |
void | AddPoint (const MeshPoint &rclPt, unsigned long ulPtIndex, float fEpsilon=0.0f) |
Adds a new point element to the grid structure. | |
unsigned long | HasElements (void) const |
Returns the number of stored elements. | |
void | Pos (const Base::Vector3f &rclPoint, unsigned long &rulX, unsigned long &rulY, unsigned long &rulZ) const |
Returns the grid numbers to the given point rclPoint. | |
virtual void | RebuildGrid (void) |
Rebuilds the grid structure. |
Special grid class that stores point indices of the mesh object in its grids.
Definition at line 242 of file Grid.h.
MeshPointGrid::MeshPointGrid | ( | const MeshKernel & | rclM | ) |
MeshPointGrid::MeshPointGrid | ( | const MeshKernel & | rclM, | |
int | iCtGridPerAxis | |||
) |
MeshPointGrid::MeshPointGrid | ( | const MeshKernel & | rclM, | |
float | fGridLen | |||
) |
Construction.
Definition at line 958 of file Grid.cpp.
References MeshCore::MeshGrid::_pclMesh, MeshCore::MeshKernel::GetBoundBox(), Base::BoundBox3< _Precision >::LengthX(), Base::BoundBox3< _Precision >::LengthY(), Base::BoundBox3< _Precision >::LengthZ(), and MeshCore::MeshGrid::Rebuild().
MeshPointGrid::MeshPointGrid | ( | const MeshKernel & | rclM, | |
unsigned long | ulX, | |||
unsigned long | ulY, | |||
unsigned long | ulZ | |||
) |
virtual MeshCore::MeshPointGrid::~MeshPointGrid | ( | void | ) | [inline, virtual] |
void MeshPointGrid::AddPoint | ( | const MeshPoint & | rclPt, | |
unsigned long | ulPtIndex, | |||
float | fEpsilon = 0.0f | |||
) | [protected] |
Adds a new point element to the grid structure.
rclPt is the geometric point and ulPtIndex the corresponding index in the mesh kernel.
Definition at line 967 of file Grid.cpp.
References MeshCore::MeshGrid::_aulGrid, MeshCore::MeshGrid::_ulCtGridsX, MeshCore::MeshGrid::_ulCtGridsY, MeshCore::MeshGrid::_ulCtGridsZ, Pos(), Base::Vector3< _Precision >::x, Base::Vector3< _Precision >::y, and Base::Vector3< _Precision >::z.
Referenced by RebuildGrid().
unsigned long MeshPointGrid::FindElements | ( | const Base::Vector3f & | rclPoint, | |
std::set< unsigned long > & | aulElements | |||
) | const |
Finds all points that lie in the same grid as the point rclPoint.
Definition at line 1040 of file Grid.cpp.
References MeshCore::MeshGrid::_ulCtGridsX, MeshCore::MeshGrid::_ulCtGridsY, MeshCore::MeshGrid::_ulCtGridsZ, MeshCore::MeshGrid::GetElements(), and Pos().
unsigned long MeshCore::MeshPointGrid::HasElements | ( | void | ) | const [inline, protected, virtual] |
Returns the number of stored elements.
Implements MeshCore::MeshGrid.
void MeshPointGrid::Pos | ( | const Base::Vector3f & | rclPoint, | |
unsigned long & | rulX, | |||
unsigned long & | rulY, | |||
unsigned long & | rulZ | |||
) | const [protected] |
Returns the grid numbers to the given point rclPoint.
Definition at line 1033 of file Grid.cpp.
References MeshCore::MeshGrid::_fGridLenX, MeshCore::MeshGrid::_fGridLenY, MeshCore::MeshGrid::_fGridLenZ, MeshCore::MeshGrid::_fMinX, MeshCore::MeshGrid::_fMinY, MeshCore::MeshGrid::_fMinZ, Py::long, Base::Vector3< _Precision >::x, Base::Vector3< _Precision >::y, and Base::Vector3< _Precision >::z.
Referenced by AddPoint(), and FindElements().
void MeshPointGrid::RebuildGrid | ( | void | ) | [protected, virtual] |
Rebuilds the grid structure.
Implements MeshCore::MeshGrid.
Definition at line 1016 of file Grid.cpp.
References MeshCore::MeshGrid::_pclMesh, MeshCore::MeshGrid::_ulCtElements, AddPoint(), MeshCore::MeshKernel::CountPoints(), MeshCore::MeshPointIterator::Init(), MeshCore::MeshGrid::InitGrid(), MeshCore::MeshPointIterator::More(), and MeshCore::MeshPointIterator::Next().
Referenced by MeshPointGrid(), and Validate().
void MeshPointGrid::Validate | ( | void | ) | [virtual] |
Validates the grid structure and rebuilds it if needed.
Definition at line 983 of file Grid.cpp.
References MeshCore::MeshGrid::_pclMesh, MeshCore::MeshGrid::_ulCtElements, MeshCore::MeshKernel::CountPoints(), and RebuildGrid().
void MeshPointGrid::Validate | ( | const MeshKernel & | rclM | ) | [virtual] |
Validates the grid structure and rebuilds it if needed.
Implements MeshCore::MeshGrid.
Definition at line 975 of file Grid.cpp.
References MeshCore::MeshGrid::_pclMesh, MeshCore::MeshGrid::_ulCtElements, MeshCore::MeshGrid::Attach(), MeshCore::MeshKernel::CountPoints(), and RebuildGrid().
bool MeshPointGrid::Verify | ( | ) | const [virtual] |
Verifies the grid structure and returns false if inconsistencies are found.
Implements MeshCore::MeshGrid.
Definition at line 992 of file Grid.cpp.
References MeshCore::MeshGrid::_pclMesh, MeshCore::MeshGrid::_ulCtElements, MeshCore::MeshKernel::CountFacets(), MeshCore::MeshGridIterator::GetBoundBox(), MeshCore::MeshGridIterator::GetElements(), MeshCore::MeshGridIterator::Init(), Base::BoundBox3< _Precision >::IsInBox(), MeshCore::MeshGridIterator::More(), MeshCore::MeshGridIterator::Next(), and MeshCore::MeshPointIterator::Set().