The MeshSearchNeighbours class provides methods to get all points in the neighbourhood of a given facet. More...
#include <Tools.h>
Classes | |
struct | CDistRad |
Public Member Functions | |
MeshSearchNeighbours (const MeshKernel &rclM, float fSampleDistance=1.0f) | |
unsigned long | NeighboursFacetFromFacet (unsigned long ulFacetIdx, float fDistance, std::vector< Base::Vector3f > &raclResultPoints, std::vector< unsigned long > &raclResultFacets) |
Searches for facets from the start facet. More... | |
unsigned long | NeighboursFromFacet (unsigned long ulFacetIdx, float fDistance, unsigned long ulMinPoints, std::vector< Base::Vector3f > &raclResultPoints) |
Collects all neighbour points from the facet (by index), the result are the points of the facets lying inside a sphere of radius fDistance, center center of the original facet. More... | |
unsigned long | NeighboursFromSampledFacets (unsigned long ulFacetIdx, float fDistance, std::vector< Base::Vector3f > &raclResultPoints) |
Searches for facets from the start facet, sample the neighbour facets and accumulates the points. More... | |
void | Reinit (float fSampleDistance) |
Re-initilaizes internal structures. More... | |
virtual | ~MeshSearchNeighbours () |
Protected Member Functions | |
bool | AccumulateNeighbours (const MeshFacet &rclF, unsigned long ulFIdx) |
bool | CheckDistToFacet (const MeshFacet &rclF) |
bool | ExpandRadius (unsigned long ulMinPoints) |
bool | InnerPoint (const Base::Vector3f &rclPt) const |
void | SampleAllFacets (void) |
Subsamples the mesh. More... | |
bool | TriangleCutsSphere (const MeshFacet &rclF) const |
Detailed Description
The MeshSearchNeighbours class provides methods to get all points in the neighbourhood of a given facet.
Constructor & Destructor Documentation
◆ MeshSearchNeighbours()
MeshSearchNeighbours::MeshSearchNeighbours | ( | const MeshKernel & | rclM, |
float | fSampleDistance = 1.0f |
||
) |
◆ ~MeshSearchNeighbours()
|
virtual |
Member Function Documentation
◆ AccumulateNeighbours()
|
protected |
References Base::DistanceP2(), InnerPoint(), and TriangleCutsSphere().
Referenced by NeighboursFromSampledFacets().
◆ CheckDistToFacet()
Referenced by NeighboursFacetFromFacet(), and NeighboursFromFacet().
◆ ExpandRadius()
|
protected |
References MeshCore::MeshPoint::MARKED.
Referenced by NeighboursFromFacet().
◆ InnerPoint()
|
protected |
Referenced by AccumulateNeighbours(), and NeighboursFromSampledFacets().
◆ NeighboursFacetFromFacet()
unsigned long MeshSearchNeighbours::NeighboursFacetFromFacet | ( | unsigned long | ulFacetIdx, |
float | fDistance, | ||
std::vector< Base::Vector3f > & | raclResultPoints, | ||
std::vector< unsigned long > & | raclResultFacets | ||
) |
Searches for facets from the start facet.
References CheckDistToFacet(), Base::DistanceP2(), MeshCore::MeshFacet::IsFlag(), MeshCore::MeshPoint::MARKED, MeshCore::MeshFacet::MARKED, and MeshCore::MeshFacet::SetFlag().
◆ NeighboursFromFacet()
unsigned long MeshSearchNeighbours::NeighboursFromFacet | ( | unsigned long | ulFacetIdx, |
float | fDistance, | ||
unsigned long | ulMinPoints, | ||
std::vector< Base::Vector3f > & | raclResultPoints | ||
) |
Collects all neighbour points from the facet (by index), the result are the points of the facets lying inside a sphere of radius fDistance, center center of the original facet.
This method uses the MARKED flags.
References CheckDistToFacet(), ExpandRadius(), MeshCore::MeshFacet::IsFlag(), MeshCore::MeshPoint::MARKED, MeshCore::MeshFacet::MARKED, and MeshCore::MeshFacet::SetFlag().
◆ NeighboursFromSampledFacets()
unsigned long MeshSearchNeighbours::NeighboursFromSampledFacets | ( | unsigned long | ulFacetIdx, |
float | fDistance, | ||
std::vector< Base::Vector3f > & | raclResultPoints | ||
) |
Searches for facets from the start facet, sample the neighbour facets and accumulates the points.
References AccumulateNeighbours(), InnerPoint(), MeshCore::MeshFacet::IsFlag(), MeshCore::MeshFacet::MARKED, SampleAllFacets(), and MeshCore::MeshFacet::SetFlag().
◆ Reinit()
void MeshSearchNeighbours::Reinit | ( | float | fSampleDistance | ) |
Re-initilaizes internal structures.
References MeshCore::MeshPoint::MARKED, MeshCore::MeshFacet::MARKED, MeshCore::MeshAlgorithm::ResetFacetFlag(), and MeshCore::MeshAlgorithm::ResetPointFlag().
◆ SampleAllFacets()
|
protected |
Subsamples the mesh.
References MeshCore::MeshFacetIterator::Init(), MeshCore::MeshFacetIterator::More(), MeshCore::MeshFacetIterator::Next(), and MeshCore::MeshGeomFacet::SubSample().
Referenced by NeighboursFromSampledFacets().
◆ TriangleCutsSphere()
Referenced by AccumulateNeighbours().
The documentation for this class was generated from the following files:
- src/Mod/Mesh/App/Core/Tools.h
- src/Mod/Mesh/App/Core/Tools.cpp