Helper class to search on triSurface. More...
Public Member Functions | |
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 triSurface & | surface () 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... | |
Helper class to search on triSurface.
Definition at line 55 of file triSurfaceSearch.H.
|
explicit |
Construct from surface. Holds reference to surface!
Definition at line 133 of file triSurfaceSearch.C.
Referenced by triSurfaceSearch::triSurfaceSearch().
triSurfaceSearch | ( | const triSurface & | surface, |
const dictionary & | dict | ||
) |
Construct from surface and dictionary.
Definition at line 143 of file triSurfaceSearch.C.
References Foam::endl(), Foam::Info, dictionary::readIfPresent(), and triSurfaceSearch::triSurfaceSearch().
triSurfaceSearch | ( | const triSurface & | surface, |
const scalar | tolerance, | ||
const label | maxTreeDepth | ||
) |
Construct from components.
Definition at line 168 of file triSurfaceSearch.C.
|
delete |
Disallow default bitwise copy construction.
~triSurfaceSearch | ( | ) |
Destructor.
Definition at line 183 of file triSurfaceSearch.C.
References triSurfaceSearch::clearOut().
void clearOut | ( | ) |
Clear storage.
Definition at line 189 of file triSurfaceSearch.C.
Referenced by triSurfaceRegionSearch::clearOut(), and triSurfaceSearch::~triSurfaceSearch().
const Foam::indexedOctree< Foam::treeDataTriSurface > & tree | ( | ) | const |
Demand driven construction of the octree.
Definition at line 198 of file triSurfaceSearch.C.
References PatchTools::calcBounds(), triSurfaceSearch::calcInside(), Foam::e, Foam::endl(), treeBoundBox::extend(), nPoints, indexedOctree< Type >::perturbTol(), points, PrimitivePatch< FaceList, PointField >::points(), List< T >::size(), triSurfaceSearch::surface(), WarningInFunction, and Foam::Zero.
Referenced by triSurfaceSearch::calcInside(), triSurfaceSearch::findLine(), triSurfaceSearch::findLineAll(), triSurfaceSearch::findLineAny(), triSurfaceSearch::findNearest(), distributedTriSurfaceMesh::findNearest(), triSurfaceMesh::getVolumeType(), triSurfaceSearch::nearest(), and triSurfaceMesh::overlaps().
|
inline |
Return reference to the surface.
Definition at line 122 of file triSurfaceSearch.H.
Referenced by edgeIntersections::edgeIntersections(), edgeIntersections::removeDegenerates(), surfaceIntersection::surfaceIntersection(), triSurfaceSearch::tree(), and triSurfaceRegionSearch::treeByRegion().
|
inline |
Return tolerance to use in searches.
Definition at line 128 of file triSurfaceSearch.H.
Referenced by searchableSurfaces::checkIntersection(), triSurfaceMesh::edgeTree(), triSurfaceSearch::findLine(), triSurfaceSearch::findLineAll(), triSurfaceSearch::findLineAny(), triSurfaceRegionSearch::findNearest(), triSurfaceSearch::findNearest(), triSurfaceMesh::getVolumeType(), and triSurfaceRegionSearch::treeByRegion().
|
inline |
Return max tree depth of octree.
Definition at line 134 of file triSurfaceSearch.H.
References triSurfaceSearch::calcInside(), triSurfaceSearch::findLine(), triSurfaceSearch::findLineAll(), triSurfaceSearch::findLineAny(), triSurfaceSearch::findNearest(), triSurfaceSearch::nearest(), triSurfaceSearch::operator=(), and samples().
Referenced by triSurfaceMesh::edgeTree(), and triSurfaceRegionSearch::treeByRegion().
Foam::boolList calcInside | ( | const pointField & | searchPoints | ) | const |
Calculate for each searchPoint inside/outside status.
Definition at line 249 of file triSurfaceSearch.C.
References triSurfaceSearch::findNearest(), forAll, volumeType::inside, List< T >::size(), and triSurfaceSearch::tree().
Referenced by triSurfaceSearch::maxTreeDepth(), and triSurfaceSearch::tree().
void findNearest | ( | const pointField & | samples, |
const scalarField & | nearestDistSqr, | ||
List< pointIndexHit > & | info | ||
) | const |
Definition at line 277 of file triSurfaceSearch.C.
References forAll, triSurfaceSearch::nearest(), indexedOctree< Type >::perturbTol(), List< T >::setSize(), List< T >::size(), triSurfaceSearch::tolerance(), and triSurfaceSearch::tree().
Referenced by triSurfaceSearch::calcInside(), triSurfaceRegionSearch::findNearest(), triSurfaceMesh::findNearest(), and triSurfaceSearch::maxTreeDepth().
Foam::pointIndexHit nearest | ( | const point & | pt, |
const vector & | span | ||
) | const |
Calculate nearest point on surface for single searchPoint. Returns.
in pointIndexHit:
Definition at line 305 of file triSurfaceSearch.C.
References triSurfaceSearch::findLine(), Foam::magSqr(), and triSurfaceSearch::tree().
Referenced by triSurfaceSearch::findNearest(), and triSurfaceSearch::maxTreeDepth().
void findLine | ( | const pointField & | start, |
const pointField & | end, | ||
List< pointIndexHit > & | info | ||
) | const |
Definition at line 318 of file triSurfaceSearch.C.
References triSurfaceSearch::findLineAny(), forAll, indexedOctree< Type >::perturbTol(), List< T >::setSize(), List< T >::size(), triSurfaceSearch::tolerance(), and triSurfaceSearch::tree().
Referenced by triSurfaceMesh::findLine(), triSurfaceSearch::maxTreeDepth(), triSurfaceSearch::nearest(), and powerLawLopesdaCostaZone::powerLawLopesdaCostaZone().
void findLineAny | ( | const pointField & | start, |
const pointField & | end, | ||
List< pointIndexHit > & | info | ||
) | const |
Definition at line 345 of file triSurfaceSearch.C.
References triSurfaceSearch::findLineAll(), indexedOctree< Type >::findLineAny(), forAll, indexedOctree< Type >::perturbTol(), List< T >::setSize(), List< T >::size(), triSurfaceSearch::tolerance(), and triSurfaceSearch::tree().
Referenced by triSurfaceSearch::findLine(), triSurfaceMesh::findLineAny(), and triSurfaceSearch::maxTreeDepth().
void findLineAll | ( | const pointField & | start, |
const pointField & | end, | ||
List< List< pointIndexHit >> & | info | ||
) | const |
Calculate all intersections from start to end.
Definition at line 372 of file triSurfaceSearch.C.
References DynamicList< T, SizeInc, SizeMult, SizeDiv >::append(), DynamicList< T, SizeInc, SizeMult, SizeDiv >::clear(), forAll, PointIndexHit< Point >::hit(), PointIndexHit< Point >::index(), Foam::mag(), indexedOctree< Type >::perturbTol(), List< T >::setSize(), List< T >::size(), triSurfaceSearch::tolerance(), List< T >::transfer(), and triSurfaceSearch::tree().
Referenced by triSurfaceMesh::findLineAll(), triSurfaceSearch::findLineAny(), and triSurfaceSearch::maxTreeDepth().
|
delete |
Disallow default bitwise assignment.
Referenced by triSurfaceSearch::maxTreeDepth().