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 (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
 

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,
FacetIndex  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 ( FacetIndex  ulFacetIdx,
float  fDistance,
std::vector< Base::Vector3f > &  raclResultPoints,
std::vector< FacetIndex > &  raclResultFacets 
)

◆ NeighboursFromFacet()

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().

◆ NeighboursFromSampledFacets()

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().

◆ Reinit()

void MeshSearchNeighbours::Reinit ( float  fSampleDistance)

◆ SampleAllFacets()

void MeshSearchNeighbours::SampleAllFacets ( )
protected

◆ TriangleCutsSphere()

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

The documentation for this class was generated from the following files: