MeshCore::MeshSearchNeighbours Class Reference

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 MeshCore::MeshSearchNeighbours::~MeshSearchNeighbours ( )
virtual

Member Function Documentation

◆ AccumulateNeighbours()

bool MeshSearchNeighbours::AccumulateNeighbours ( const MeshFacet rclF,
unsigned long  ulFIdx 
)
protected

◆ CheckDistToFacet()

bool MeshCore::MeshSearchNeighbours::CheckDistToFacet ( const MeshFacet rclF)
protected

◆ ExpandRadius()

bool MeshSearchNeighbours::ExpandRadius ( unsigned long  ulMinPoints)
protected

◆ InnerPoint()

bool MeshCore::MeshSearchNeighbours::InnerPoint ( const Base::Vector3f rclPt) const
protected

◆ NeighboursFacetFromFacet()

unsigned long MeshSearchNeighbours::NeighboursFacetFromFacet ( unsigned long  ulFacetIdx,
float  fDistance,
std::vector< Base::Vector3f > &  raclResultPoints,
std::vector< unsigned long > &  raclResultFacets 
)

◆ 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)

◆ SampleAllFacets()

void MeshSearchNeighbours::SampleAllFacets ( void  )
protected

◆ TriangleCutsSphere()

bool MeshCore::MeshSearchNeighbours::TriangleCutsSphere ( const MeshFacet rclF) const
protected

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