Public Member Functions | Private Types | Private Member Functions | Private Attributes
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:
Inheritance graph
[legend]
Collaboration diagram for triSurfaceRegionSearch:
Collaboration graph
[legend]

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

Private Types

typedef PrimitivePatch< labelledTri, IndirectList, const pointField & > indirectTriSurface
 
typedef treeDataPrimitivePatch< indirectTriSurfacetreeDataIndirectTriSurface
 
typedef indexedOctree< treeDataIndirectTriSurfacetreeType
 

Private Member Functions

 triSurfaceRegionSearch (const triSurfaceRegionSearch &)
 Disallow default bitwise copy construct. More...
 
void operator= (const triSurfaceRegionSearch &)
 Disallow default bitwise assignment. More...
 

Private Attributes

PtrList< indirectTriSurfaceindirectRegionPatches_
 Surface is split into patches by region. More...
 
PtrList< treeTypetreeByRegion_
 Search tree for each region. 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.

Member Typedef Documentation

◆ indirectTriSurface

Definition at line 66 of file triSurfaceRegionSearch.H.

◆ treeDataIndirectTriSurface

Definition at line 69 of file triSurfaceRegionSearch.H.

◆ treeType

Definition at line 71 of file triSurfaceRegionSearch.H.

Constructor & Destructor Documentation

◆ triSurfaceRegionSearch() [1/3]

Disallow default bitwise copy construct.

◆ triSurfaceRegionSearch() [2/3]

triSurfaceRegionSearch ( const triSurface surface)
explicit

Construct from surface. Holds reference to surface!

Definition at line 33 of file triSurfaceRegionSearch.C.

◆ triSurfaceRegionSearch() [3/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()

Destructor.

Definition at line 55 of file triSurfaceRegionSearch.C.

Member Function Documentation

◆ operator=()

void operator= ( const triSurfaceRegionSearch )
private

Disallow default bitwise assignment.

◆ clearOut()

void clearOut ( )

Clear storage.

Definition at line 61 of file triSurfaceRegionSearch.C.

References triSurfaceSearch::clearOut().

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

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.

Definition at line 71 of file triSurfaceRegionSearch.C.

References PatchTools::calcBounds(), Foam::e, treeBoundBox::extend(), forAll, boundBox::max(), boundBox::min(), nPoints, points, rndGen(), and Vector< scalar >::zero.

Here is the call 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 186 of file triSurfaceRegionSearch.C.

References Foam::findIndex(), triSurfaceSearch::findNearest(), indexedOctree::findNearest(), forAll, PointIndexHit< Point >::hit(), PointIndexHit< Point >::hitPoint(), Foam::magSqr(), samples(), and List::setSize().

Referenced by triSurfaceMesh::findNearest().

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

Field Documentation

◆ indirectRegionPatches_

PtrList<indirectTriSurface> indirectRegionPatches_
mutableprivate

Surface is split into patches by region.

Definition at line 77 of file triSurfaceRegionSearch.H.

◆ treeByRegion_

PtrList<treeType> treeByRegion_
mutableprivate

Search tree for each region.

Definition at line 80 of file triSurfaceRegionSearch.H.


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