Helper class to search on triSurface. More...
#include <triSurfaceSearch.H>

Public Member Functions | |
| 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.
Definition at line 54 of file triSurfaceSearch.H.
|
explicit |
Construct from surface. Holds reference to surface!
Definition at line 129 of file triSurfaceSearch.C.
References surface().

| triSurfaceSearch | ( | const triSurface & | surface, |
| const dictionary & | dict ) |
Construct from surface and dictionary.
Definition at line 138 of file triSurfaceSearch.C.
References dict, if(), and surface().

| triSurfaceSearch | ( | const triSurface & | surface, |
| const scalar | tolerance, | ||
| const label | maxTreeDepth = 10 ) |
Construct from components.
A invalid (negative) tolerance uses the default tolerance.
Definition at line 163 of file triSurfaceSearch.C.
References maxTreeDepth(), indexedOctreeBase::perturbTol(), surface(), and tolerance().

| ~triSurfaceSearch | ( | ) |
Destructor.
Definition at line 184 of file triSurfaceSearch.C.
References clearOut().

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

| const Foam::indexedOctree< Foam::treeDataTriSurface > & tree | ( | ) | const |
Demand driven construction of the octree.
Definition at line 199 of file triSurfaceSearch.C.
References PatchTools::calcBounds(), e, Foam::endl(), boundBox::inflate(), nPoints, indexedOctreeBase::perturbTol(), points, rndGen, surface(), WarningInFunction, and VectorSpace< Form, Cmpt, Ncmpts >::zero.
Referenced by triSurfaceRegionSearch::flip().


| void flip | ( | ) |
Flip orientation (if cached on octree).
Definition at line 251 of file triSurfaceSearch.C.
References forAll, volumeType::INSIDE, and volumeType::OUTSIDE.
Referenced by triSurfaceRegionSearch::flip().

|
inline |
Return reference to the surface.
Definition at line 160 of file triSurfaceSearch.H.
Referenced by edgeIntersections::removeDegenerates(), surfaceIntersection::surfaceIntersection(), surfaceIntersection::surfaceIntersection(), tree(), triSurfaceRegionSearch::treeByRegion(), triSurfaceRegionSearch::triSurfaceRegionSearch(), triSurfaceRegionSearch::triSurfaceRegionSearch(), triSurfaceSearch(), triSurfaceSearch(), and triSurfaceSearch().

|
inline |
Return tolerance to use in searches.
Definition at line 168 of file triSurfaceSearch.H.
Referenced by triSurfaceMesh::edgeTree(), findLine(), findLineAll(), findLineAny(), triSurfaceRegionSearch::findNearest(), findNearest(), triSurfaceMesh::getVolumeType(), triSurfaceRegionSearch::treeByRegion(), and triSurfaceSearch().

|
inline |
Return max tree depth of octree.
Definition at line 176 of file triSurfaceSearch.H.
Referenced by triSurfaceMesh::edgeTree(), triSurfaceRegionSearch::treeByRegion(), and triSurfaceSearch().

| Foam::boolList calcInside | ( | const pointField & | searchPoints | ) | const |
Calculate for each searchPoint inside/outside status.
Definition at line 272 of file triSurfaceSearch.C.
References forAll, volumeType::INSIDE, samples(), and tree().

| void findNearest | ( | const pointField & | samples, |
| const scalarField & | nearestDistSqr, | ||
| List< pointIndexHit > & | info ) const |
Definition at line 300 of file triSurfaceSearch.C.
References forAll, indexedOctreeBase::perturbTol(), samples(), List< T >::setSize(), tolerance(), and tree().
Referenced by triSurfaceMesh::findNearest(), and triSurfaceRegionSearch::findNearest().


| Foam::pointIndexHit nearest | ( | const point & | pt, |
| const vector & | span ) const |
Calculate nearest point on surface for single searchPoint. Returns.
in pointIndexHit:
Definition at line 330 of file triSurfaceSearch.C.
References Foam::magSqr(), and tree().
Referenced by distributedTriSurfaceMesh::getNormal().


| void findLine | ( | const pointField & | start, |
| const pointField & | end, | ||
| List< pointIndexHit > & | info ) const |
Definition at line 343 of file triSurfaceSearch.C.
References forAll, indexedOctreeBase::perturbTol(), List< T >::setSize(), UList< T >::size(), tolerance(), and tree().
Referenced by triSurfaceMesh::findLine(), and powerLawLopesdaCostaZone::powerLawLopesdaCostaZone().


| void findLineAny | ( | const pointField & | start, |
| const pointField & | end, | ||
| List< pointIndexHit > & | info ) const |
Definition at line 366 of file triSurfaceSearch.C.
References indexedOctree< Type >::findLineAny(), forAll, indexedOctreeBase::perturbTol(), List< T >::setSize(), UList< T >::size(), tolerance(), and tree().
Referenced by triSurfaceMesh::findLineAny().


| void findLineAll | ( | const pointField & | start, |
| const pointField & | end, | ||
| List< List< pointIndexHit > > & | info ) const |
Calculate all intersections from start to end.
Definition at line 389 of file triSurfaceSearch.C.
References DynamicList< T, SizeMin >::append(), DynamicList< T, SizeMin >::clear(), forAll, PointIndexHit< PointType >::hit(), PointIndexHit< PointType >::index(), Foam::normalised(), indexedOctreeBase::perturbTol(), UList< T >::size(), tolerance(), and tree().
Referenced by triSurfaceMesh::findLineAll().

