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 (FacetIndex ulFacetIdx, float fDistance, std::vector< Base::Vector3f > &raclResultPoints, std::vector< FacetIndex > &raclResultFacets) |
Searches for facets from the start facet. More... | |
unsigned long | NeighboursFromFacet (FacetIndex 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 (FacetIndex 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, FacetIndex ulFIdx) |
bool | CheckDistToFacet (const MeshFacet &rclF) |
bool | ExpandRadius (unsigned long ulMinPoints) |
bool | InnerPoint (const Base::Vector3f &rclPt) const |
void | SampleAllFacets () |
Subsamples the mesh. More... | |
bool | TriangleCutsSphere (const MeshFacet &rclF) const |
The MeshSearchNeighbours class provides methods to get all points in the neighbourhood of a given facet.
MeshSearchNeighbours::MeshSearchNeighbours | ( | const MeshKernel & | rclM, |
float | fSampleDistance = 1.0f |
||
) |
|
virtual |
|
protected |
References Base::DistanceP2(), InnerPoint(), and TriangleCutsSphere().
Referenced by NeighboursFromSampledFacets().
References Base::DistanceP2(), and MeshCore::MeshPoint::MARKED.
Referenced by NeighboursFacetFromFacet(), and NeighboursFromFacet().
|
protected |
References MeshCore::MeshPoint::MARKED.
Referenced by NeighboursFromFacet().
|
protected |
References Base::DistanceP2().
Referenced by AccumulateNeighbours(), and NeighboursFromSampledFacets().
unsigned long MeshSearchNeighbours::NeighboursFacetFromFacet | ( | FacetIndex | ulFacetIdx, |
float | fDistance, | ||
std::vector< Base::Vector3f > & | raclResultPoints, | ||
std::vector< FacetIndex > & | 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().
unsigned long MeshSearchNeighbours::NeighboursFromFacet | ( | FacetIndex | 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().
unsigned long MeshSearchNeighbours::NeighboursFromSampledFacets | ( | FacetIndex | 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().
void MeshSearchNeighbours::Reinit | ( | float | fSampleDistance | ) |
Re-initilaizes internal structures.
References MeshCore::MeshPoint::MARKED, MeshCore::MeshFacet::MARKED, MeshCore::MeshAlgorithm::ResetFacetFlag(), and MeshCore::MeshAlgorithm::ResetPointFlag().
|
protected |
Subsamples the mesh.
References MeshCore::MeshFacetIterator::Init(), MeshCore::MeshFacetIterator::More(), MeshCore::MeshFacetIterator::Next(), and MeshCore::MeshGeomFacet::SubSample().
Referenced by NeighboursFromSampledFacets().
References Base::Vector3< _Precision >::x, Base::Vector3< _Precision >::y, and Base::Vector3< _Precision >::z.
Referenced by AccumulateNeighbours().