Helper class to search on triSurface. Creates an octree for each region of the surface and only searches on the specified regions. More...
#include <triSurfaceRegionSearch.H>


Public Member Functions | |
| triSurfaceRegionSearch (const triSurface &) | |
| Construct from surface. Holds reference to surface! | |
| triSurfaceRegionSearch (const triSurface &, const dictionary &dict) | |
| Construct from surface and dictionary. Holds reference to surface! | |
| ~triSurfaceRegionSearch () | |
| Destructor. | |
| void | clearOut () |
| Clear storage. | |
| const PtrList< treeType > & | treeByRegion () const |
| Demand driven construction of octree for each region. | |
| void | findNearest (const pointField &samples, const scalarField &nearestDistSqr, const labelList ®ionIndices, List< pointIndexHit > &info) const |
| Find the nearest point on the surface out of the regions. | |
| void | flip () |
| Flip orientation. | |
| Public Member Functions inherited from triSurfaceSearch | |
| triSurfaceSearch (const triSurface &surface) | |
| Construct from surface. Holds reference to surface! | |
| triSurfaceSearch (const triSurface &surface, const dictionary &dict) | |
| Construct from surface and dictionary. | |
| triSurfaceSearch (const triSurface &surface, const scalar tolerance, const label maxTreeDepth=10) | |
| Construct from components. | |
| ~triSurfaceSearch () | |
| Destructor. | |
| void | clearOut () |
| Clear storage. | |
| const indexedOctree< treeDataTriSurface > & | tree () const |
| Demand driven construction of the octree. | |
| void | flip () |
| Flip orientation (if cached on octree). | |
| const triSurface & | surface () const |
| Return reference to the surface. | |
| scalar | tolerance () const |
| Return tolerance to use in searches. | |
| label | maxTreeDepth () const |
| Return max tree depth of octree. | |
| boolList | calcInside (const pointField &searchPoints) const |
| Calculate for each searchPoint inside/outside status. | |
| void | findNearest (const pointField &samples, const scalarField &nearestDistSqr, List< pointIndexHit > &info) const |
| pointIndexHit | nearest (const point &pt, const vector &span) const |
| Calculate nearest point on surface for single searchPoint. Returns. | |
| 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. | |
Helper class to search on triSurface. Creates an octree for each region of the surface and only searches on the specified regions.
Definition at line 54 of file triSurfaceRegionSearch.H.
|
explicit |
Construct from surface. Holds reference to surface!
Definition at line 29 of file triSurfaceRegionSearch.C.
References triSurfaceSearch::surface().

| triSurfaceRegionSearch | ( | const triSurface & | surface, |
| const dictionary & | dict ) |
Construct from surface and dictionary. Holds reference to surface!
Definition at line 37 of file triSurfaceRegionSearch.C.
References dict, and triSurfaceSearch::surface().

| ~triSurfaceRegionSearch | ( | ) |
Destructor.
Definition at line 51 of file triSurfaceRegionSearch.C.
References clearOut().

| void clearOut | ( | ) |
Clear storage.
Definition at line 57 of file triSurfaceRegionSearch.C.
References triSurfaceSearch::clearOut().
Referenced by triSurfaceMesh::clearOut(), triSurfaceMesh::movePoints(), and ~triSurfaceRegionSearch().


| 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 67 of file triSurfaceRegionSearch.C.
References PatchTools::calcBounds(), e, forAll, boundBox::inflate(), Foam::max(), triSurfaceSearch::maxTreeDepth(), nPoints, indexedOctreeBase::perturbTol(), points, rndGen, List< T >::setSize(), triSurfaceSearch::surface(), triSurfaceSearch::tolerance(), Foam::Zero, and VectorSpace< Form, Cmpt, Ncmpts >::zero.
Referenced by 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 179 of file triSurfaceRegionSearch.C.
References UList< T >::empty(), triSurfaceSearch::findNearest(), forAll, UList< T >::found(), PointIndexHit< PointType >::hit(), indexedOctreeBase::perturbTol(), PointIndexHit< PointType >::point(), samples(), List< T >::setSize(), triSurfaceSearch::tolerance(), and treeByRegion().
Referenced by triSurfaceMesh::findNearest().


| void flip | ( | ) |
Flip orientation.
Definition at line 247 of file triSurfaceRegionSearch.C.
References triSurfaceSearch::flip(), forAll, volumeType::INSIDE, volumeType::OUTSIDE, and triSurfaceSearch::tree().
Referenced by triSurfaceMesh::flip().

