MeshCore::MeshSearchNeighbours Class Reference

The MeshSearchNeighbours class provides methods to get all points in the neighbourhood of a given facet. More...

#include <Tools.h>

List of all members.

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.
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.
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.
void Reinit (float fSampleDistance)
 Re-initilaizes internal structures.
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.
bool TriangleCutsSphere (const MeshFacet &rclF) const

Protected Attributes

std::set< unsigned long > _aclOuter
std::vector< Base::Vector3f_aclPointsResult
std::set< unsigned long > _aclResult
std::vector< std::vector
< Base::Vector3f > > 
_aclSampledFacets
Wm4::Sphere3< float > _akSphere
bool _bTooFewPoints
Base::Vector3f _clCenter
MeshRefPointToFacets _clPt2Fa
float _fMaxDistanceP2
float _fSampleDistance
const MeshFacetArray_rclFAry
const MeshKernel_rclMesh
const MeshPointArray_rclPAry

Detailed Description

The MeshSearchNeighbours class provides methods to get all points in the neighbourhood of a given facet.

Definition at line 43 of file Mod/Mesh/App/Core/Tools.h.


Constructor & Destructor Documentation

MeshSearchNeighbours::MeshSearchNeighbours ( const MeshKernel rclM,
float  fSampleDistance = 1.0f 
)
virtual MeshCore::MeshSearchNeighbours::~MeshSearchNeighbours (  )  [inline, virtual]

Definition at line 47 of file Mod/Mesh/App/Core/Tools.h.


Member Function Documentation

bool MeshSearchNeighbours::AccumulateNeighbours ( const MeshFacet rclF,
unsigned long  ulFIdx 
) [protected]
bool MeshCore::MeshSearchNeighbours::CheckDistToFacet ( const MeshFacet rclF  )  [inline, protected]
bool MeshSearchNeighbours::ExpandRadius ( unsigned long  ulMinPoints  )  [protected]
bool MeshCore::MeshSearchNeighbours::InnerPoint ( const Base::Vector3f rclPt  )  const [inline, protected]
unsigned long MeshSearchNeighbours::NeighboursFacetFromFacet ( unsigned long  ulFacetIdx,
float  fDistance,
std::vector< Base::Vector3f > &  raclResultPoints,
std::vector< unsigned long > &  raclResultFacets 
)
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.

Definition at line 54 of file Mod/Mesh/App/Core/Tools.cpp.

References _aclOuter, _aclResult, _clCenter, _clPt2Fa, _fMaxDistanceP2, _rclFAry, _rclMesh, _rclPAry, CheckDistToFacet(), ExpandRadius(), MeshCore::MeshKernel::GetFacet(), MeshCore::MeshGeomFacet::GetGravityPoint(), MeshCore::MeshFacet::IsFlag(), MeshCore::MeshPoint::MARKED, MeshCore::MeshFacet::MARKED, MeshCore::MeshFacet::SetFlag(), and MeshCore::MeshFacetArray::SetFlag().

unsigned long MeshSearchNeighbours::NeighboursFromSampledFacets ( unsigned long  ulFacetIdx,
float  fDistance,
std::vector< Base::Vector3f > &  raclResultPoints 
)
void MeshSearchNeighbours::Reinit ( float  fSampleDistance  ) 

Re-initilaizes internal structures.

Definition at line 47 of file Mod/Mesh/App/Core/Tools.cpp.

References _fSampleDistance, _rclMesh, MeshCore::MeshPoint::MARKED, and MeshCore::MeshFacet::MARKED.

void MeshSearchNeighbours::SampleAllFacets ( void   )  [protected]
bool MeshCore::MeshSearchNeighbours::TriangleCutsSphere ( const MeshFacet rclF  )  const [inline, protected]

Member Data Documentation

std::set<unsigned long> MeshCore::MeshSearchNeighbours::_aclOuter [protected]

Definition at line 86 of file Mod/Mesh/App/Core/Tools.h.

Referenced by AccumulateNeighbours(), and NeighboursFromSampledFacets().

std::set<unsigned long> MeshCore::MeshSearchNeighbours::_aclResult [protected]
std::vector<std::vector<Base::Vector3f> > MeshCore::MeshSearchNeighbours::_aclSampledFacets [protected]

Definition at line 87 of file Mod/Mesh/App/Core/Tools.h.

Referenced by AccumulateNeighbours(), and SampleAllFacets().

Definition at line 89 of file Mod/Mesh/App/Core/Tools.h.

Referenced by NeighboursFromSampledFacets(), and TriangleCutsSphere().

Definition at line 90 of file Mod/Mesh/App/Core/Tools.h.

Definition at line 88 of file Mod/Mesh/App/Core/Tools.h.

Referenced by Reinit(), and SampleAllFacets().


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

Generated on Wed Nov 23 19:02:25 2011 for FreeCAD by  doxygen 1.6.1