Public Member Functions | |
MeshInspectGrid (const MeshCore::MeshKernel &mesh, float fGridLen, const Base::Matrix4D &m) | |
void | Validate (const MeshCore::MeshKernel &) |
Validates the grid structure and rebuilds it if needed. More... | |
void | Validate (void) |
bool | Verify () const |
Verifies the grid structure and returns false if inconsistencies are found. More... | |
Public Member Functions inherited from MeshCore::MeshGrid | |
virtual unsigned long | Inside (const Base::BoundBox3f &rclBB, std::vector< ElementIndex > &raulElements, bool bDelDoubles=true) const |
Searches for elements lying in the intersection area of the grid and the bounding box. More... | |
virtual unsigned long | Inside (const Base::BoundBox3f &rclBB, std::set< ElementIndex > &raulElementss) const |
Searches for elements lying in the intersection area of the grid and the bounding box. More... | |
virtual unsigned long | Inside (const Base::BoundBox3f &rclBB, std::vector< ElementIndex > &raulElements, const Base::Vector3f &rclOrg, float fMaxDist, bool bDelDoubles=true) const |
Searches for elements lying in the intersection area of the grid and the bounding box. More... | |
void | SearchNearestFromPoint (const Base::Vector3f &rclPt, std::set< ElementIndex > &rclInd) const |
Searches for the nearest grids that contain elements from a point, the result are grid indices. More... | |
unsigned long | GetElements (unsigned long ulX, unsigned long ulY, unsigned long ulZ, std::set< ElementIndex > &raclInd) const |
Returns the indices of the elements in the given grid. More... | |
unsigned long | GetElements (const Base::Vector3f &rclPoint, std::vector< ElementIndex > &aulFacets) const |
virtual void | GetGridLengths (float &rfLenX, float &rfLenY, float &rfLenZ) const |
Returns the lengths of the grid elements in x,y and z direction. More... | |
virtual void | GetCtGrids (unsigned long &rulX, unsigned long &rulY, unsigned long &rulZ) const |
Returns the number of grid elements in x,y and z direction. More... | |
Base::BoundBox3f | GetBoundBox (unsigned long ulX, unsigned long ulY, unsigned long ulZ) const |
Returns the bounding box of a given grid element. More... | |
Base::BoundBox3f | GetBoundBox () const |
Returns the bounding box of the whole. More... | |
Base::BoundBox3f | GetMeshBoundBox () const |
Returns an extended bounding box of the mesh object. More... | |
unsigned long | GetIndexToPosition (unsigned long ulX, unsigned long ulY, unsigned long ulZ) const |
Returns an index for the given grid position. More... | |
bool | GetPositionToIndex (unsigned long id, unsigned long &ulX, unsigned long &ulY, unsigned long &ulZ) const |
Returns the grid position to the given index. More... | |
unsigned long | GetCtElements (unsigned long ulX, unsigned long ulY, unsigned long ulZ) const |
Returns the number of elements in a given grid. More... | |
bool | CheckPosition (const Base::Vector3f &rclPoint, unsigned long &rulX, unsigned long &rulY, unsigned long &rulZ) const |
Checks whether the point is inside the grid. More... | |
virtual void | Position (const Base::Vector3f &rclPoint, unsigned long &rulX, unsigned long &rulY, unsigned long &rulZ) const |
Returns the indices of the grid this point lies in. More... | |
bool | CheckPos (unsigned long ulX, unsigned long ulY, unsigned long ulZ) const |
Checks if this is a valid grid position. More... | |
void | GetHull (unsigned long ulX, unsigned long ulY, unsigned long ulZ, unsigned long ulDistance, std::set< ElementIndex > &raclInd) const |
Get the indices of all elements lying in the grids around a given grid with distance ulDistance. More... | |
virtual | ~MeshGrid () |
Destruction. More... | |
virtual void | Attach (const MeshKernel &rclM) |
Attaches the mesh kernel to this grid, an already attached mesh gets detached. More... | |
virtual void | Rebuild (unsigned long ulPerGrid=MESH_CT_GRID, unsigned long ulMaxGrid=MESH_MAX_GRIDS) |
Rebuilds the grid structure. More... | |
virtual void | Rebuild (int iCtGridPerAxis=MESH_CT_GRID_PER_AXIS) |
Rebuilds the grid structure. More... | |
virtual void | Rebuild (unsigned long ulX, unsigned long ulY, unsigned long ulZ) |
Rebuilds the grid structure. More... | |
Protected Member Functions | |
void | AddFacet (const MeshCore::MeshGeomFacet &rclFacet, unsigned long ulFacetIndex) |
void | CalculateGridLength (int) |
Calculates the grid length dependent on the number of grids per axis. More... | |
void | CalculateGridLength (unsigned long, unsigned long) |
Calculates the grid length dependent on maximum number of grids. More... | |
unsigned long | HasElements (void) const |
Returns the number of stored elements. More... | |
void | InitGrid (void) |
Initializes the size of the internal structure. More... | |
void | Pos (const Base::Vector3f &rclPoint, unsigned long &rulX, unsigned long &rulY, unsigned long &rulZ) const |
void | RebuildGrid (void) |
Rebuilds the grid structure. More... | |
Protected Member Functions inherited from MeshCore::MeshGrid | |
virtual void | Clear () |
Deletes the grid structure. More... | |
MeshGrid (const MeshKernel &rclM) | |
Construction. More... | |
MeshGrid () | |
Construction. More... | |
Inspection::MeshInspectGrid::MeshInspectGrid | ( | const MeshCore::MeshKernel & | mesh, |
float | fGridLen, | ||
const Base::Matrix4D & | m | ||
) |
|
protected |
References Base::BoundBox3< _Precision >::Add(), MeshCore::MeshGrid::GetBoundBox(), MeshCore::MeshGeomFacet::IntersectBoundingBox(), Base::BoundBox3< _Precision >::MaxX, Base::BoundBox3< _Precision >::MaxY, Base::BoundBox3< _Precision >::MaxZ, Base::BoundBox3< _Precision >::MinX, Base::BoundBox3< _Precision >::MinY, Base::BoundBox3< _Precision >::MinZ, and Pos().
Referenced by RebuildGrid().
|
protectedvirtual |
Calculates the grid length dependent on the number of grids per axis.
Reimplemented from MeshCore::MeshGrid.
|
protectedvirtual |
Calculates the grid length dependent on maximum number of grids.
Reimplemented from MeshCore::MeshGrid.
|
protectedvirtual |
Returns the number of stored elements.
Must be implemented in sub-classes.
Implements MeshCore::MeshGrid.
|
protectedvirtual |
Initializes the size of the internal structure.
Reimplemented from MeshCore::MeshGrid.
References Base::BoundBox3< _Precision >::LengthX(), Base::BoundBox3< _Precision >::LengthY(), Base::BoundBox3< _Precision >::LengthZ(), Base::BoundBox3< _Precision >::MinX, Base::BoundBox3< _Precision >::MinY, Base::BoundBox3< _Precision >::MinZ, and Base::BoundBox3< _Precision >::Transformed().
Referenced by RebuildGrid().
|
protected |
References Base::Vector3< _Precision >::x, Base::Vector3< _Precision >::y, and Base::Vector3< _Precision >::z.
Referenced by AddFacet().
|
protectedvirtual |
Rebuilds the grid structure.
Must be implemented in sub-classes.
Implements MeshCore::MeshGrid.
References AddFacet(), MeshCore::MeshFacetIterator::Init(), InitGrid(), MeshCore::MeshFacetIterator::More(), MeshCore::MeshFacetIterator::Next(), and MeshCore::MeshFacetIterator::Transform().
|
virtual |
Validates the grid structure and rebuilds it if needed.
Must be implemented in sub-classes.
Implements MeshCore::MeshGrid.
void Inspection::MeshInspectGrid::Validate | ( | void | ) |
|
virtual |
Verifies the grid structure and returns false if inconsistencies are found.
Implements MeshCore::MeshGrid.