triSurfaceRegionSearch Class Reference

Helper class to search on triSurface. Creates an octree for each region of the surface and only searches on the specified regions. More...

Inheritance diagram for triSurfaceRegionSearch:
Collaboration diagram for triSurfaceRegionSearch:

Public Member Functions

 triSurfaceRegionSearch (const triSurface &)
 Construct from surface. Holds reference to surface! More...
 
 triSurfaceRegionSearch (const triSurface &, const dictionary &dict)
 Construct from surface and dictionary. Holds reference to surface! More...
 
 triSurfaceRegionSearch (const triSurfaceRegionSearch &)=delete
 Disallow default bitwise copy construction. More...
 
 ~triSurfaceRegionSearch ()
 Destructor. More...
 
void clearOut ()
 Clear storage. More...
 
const PtrList< treeType > & treeByRegion () const
 Demand driven construction of octree for each region. More...
 
void findNearest (const pointField &samples, const scalarField &nearestDistSqr, const labelList &regionIndices, List< pointIndexHit > &info) const
 Find the nearest point on the surface out of the regions. More...
 
void operator= (const triSurfaceRegionSearch &)=delete
 Disallow default bitwise assignment. More...
 
- Public Member Functions inherited from triSurfaceSearch
 triSurfaceSearch (const triSurface &)
 Construct from surface. Holds reference to surface! More...
 
 triSurfaceSearch (const triSurface &, const dictionary &dict)
 Construct from surface and dictionary. More...
 
 triSurfaceSearch (const triSurface &surface, const scalar tolerance, const label maxTreeDepth)
 Construct from components. More...
 
 triSurfaceSearch (const triSurfaceSearch &)=delete
 Disallow default bitwise copy construction. More...
 
 ~triSurfaceSearch ()
 Destructor. More...
 
void clearOut ()
 Clear storage. More...
 
const indexedOctree< treeDataTriSurface > & tree () const
 Demand driven construction of the octree. More...
 
const triSurfacesurface () const
 Return reference to the surface. More...
 
scalar tolerance () const
 Return tolerance to use in searches. More...
 
label maxTreeDepth () const
 Return max tree depth of octree. More...
 
boolList calcInside (const pointField &searchPoints) const
 Calculate for each searchPoint inside/outside status. More...
 
void findNearest (const pointField &samples, const scalarField &nearestDistSqr, List< pointIndexHit > &info) const
 
pointIndexHit nearest (const point &, const vector &span) const
 Calculate nearest point on surface for single searchPoint. Returns. More...
 
void findLine (const pointField &start, const pointField &end, List< pointIndexHit > &info) const
 
void findLineAny (const pointField &start, const pointField &end, List< pointIndexHit > &info) const
 
void findLineAll (const pointField &start, const pointField &end, List< List< pointIndexHit >> &info) const
 Calculate all intersections from start to end. More...
 
void operator= (const triSurfaceSearch &)=delete
 Disallow default bitwise assignment. More...
 

Detailed Description

Helper class to search on triSurface. Creates an octree for each region of the surface and only searches on the specified regions.

Source files

Definition at line 55 of file triSurfaceRegionSearch.H.

Constructor & Destructor Documentation

◆ triSurfaceRegionSearch() [1/3]

triSurfaceRegionSearch ( const triSurface surface)
explicit

Construct from surface. Holds reference to surface!

Definition at line 33 of file triSurfaceRegionSearch.C.

◆ triSurfaceRegionSearch() [2/3]

triSurfaceRegionSearch ( const triSurface surface,
const dictionary dict 
)

Construct from surface and dictionary. Holds reference to surface!

Definition at line 42 of file triSurfaceRegionSearch.C.

◆ triSurfaceRegionSearch() [3/3]

Disallow default bitwise copy construction.

◆ ~triSurfaceRegionSearch()

Destructor.

Definition at line 55 of file triSurfaceRegionSearch.C.

References triSurfaceRegionSearch::clearOut().

Here is the call graph for this function:

Member Function Documentation

◆ clearOut()

void clearOut ( )

Clear storage.

Definition at line 61 of file triSurfaceRegionSearch.C.

References triSurfaceSearch::clearOut().

Referenced by triSurfaceMesh::clearOut(), triSurfaceMesh::movePoints(), and triSurfaceRegionSearch::~triSurfaceRegionSearch().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ treeByRegion()

const Foam::PtrList< Foam::triSurfaceRegionSearch::treeType > & treeByRegion ( ) const

Demand driven construction of octree for each region.

Currently creates a tree for each region; could optimise by only constructing trees when they are in regionIndices

Definition at line 71 of file triSurfaceRegionSearch.C.

References PatchTools::calcBounds(), Foam::e, treeBoundBox::extend(), triSurfaceRegionSearch::findNearest(), forAll, triSurfaceSearch::maxTreeDepth(), nPoints, indexedOctree< Type >::perturbTol(), points, HashTable< T, Key, Hash >::size(), triSurfaceSearch::surface(), triSurfaceSearch::tolerance(), and Foam::Zero.

Referenced by triSurfaceRegionSearch::findNearest().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ findNearest()

void findNearest ( const pointField samples,
const scalarField nearestDistSqr,
const labelList regionIndices,
List< pointIndexHit > &  info 
) const

Find the nearest point on the surface out of the regions.

supplied in the list regionIndices. Ignores regions that are not specified

Definition at line 180 of file triSurfaceRegionSearch.C.

References UList< T >::empty(), Foam::findIndex(), triSurfaceSearch::findNearest(), forAll, PointIndexHit< Point >::hit(), PointIndexHit< Point >::hitPoint(), Foam::magSqr(), indexedOctree< Type >::perturbTol(), List< T >::setSize(), List< T >::size(), triSurfaceSearch::tolerance(), and triSurfaceRegionSearch::treeByRegion().

Referenced by triSurfaceMesh::findNearest(), and triSurfaceRegionSearch::treeByRegion().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=()

void operator= ( const triSurfaceRegionSearch )
delete

Disallow default bitwise assignment.


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