Helper class to search on triSurface. More...
#include <meshTools/triSurfaceSearch.H>
Helper class to search on triSurface.
Definition at line 58 of file triSurfaceSearch.H.
Public Member Functions | |
triSurfaceSearch (const triSurface &) | |
Construct from surface. Holds reference to surface!
| |
const indexedOctree < treeDataTriSurface > & | tree () const |
const triSurface & | surface () const |
boolList | calcInside (const pointField &searchPoints) const |
Calculate for each searchPoint inside/outside status.
| |
labelList | calcNearestTri (const pointField &samples, const vector &span) const |
Calculate index of nearest triangle (or -1) for each sample.
| |
tmp< pointField > | calcNearest (const pointField &samples, const vector &span) const |
Calculate nearest points (to searchPoints) on surface.
| |
pointIndexHit | nearest (const point &, const vector &span) const |
Calculate nearest point on surface for single searchPoint. Returns.
| |
Static Public Attributes | |
static const point | greatPoint |
Point far away; used for illegal finds.
|
triSurfaceSearch | ( | const triSurface & | surface ) |
Construct from surface. Holds reference to surface!
Definition at line 47 of file triSurfaceSearch.C.
References E(), PrimitivePatch< Face, FaceList, PointField, PointType >::meshPoints(), boundBox::min(), PrimitivePatch< Face, FaceList, PointField, PointType >::points(), and autoPtr< T >::reset().
const indexedOctree<treeDataTriSurface>& tree | ( | ) | const [inline]
|
Definition at line 95 of file triSurfaceSearch.H.
Referenced by triSurfaceSearch::calcInside(), and triSurfaceSearch::nearest().
const triSurface& surface | ( | ) | const [inline]
|
Definition at line 100 of file triSurfaceSearch.H.
Referenced by edgeIntersections::edgeIntersections(), edgeIntersections::removeDegenerates(), and surfaceIntersection::surfaceIntersection().
boolList calcInside | ( | const pointField & | searchPoints ) | const |
Calculate for each searchPoint inside/outside status.
Definition at line 85 of file triSurfaceSearch.C.
References forAll, List< T >::size(), and triSurfaceSearch::tree().
labelList calcNearestTri | ( | const pointField & | samples, |
const vector & | span | ||
) | const |
Calculate index of nearest triangle (or -1) for each sample.
Looks only in box of size 2*span around sample.
Definition at line 115 of file triSurfaceSearch.C.
References forAll, PointIndexHit< Point >::hit(), PointIndexHit< Point >::index(), Foam::magSqr(), and List< T >::size().
tmp< pointField > calcNearest | ( | const pointField & | samples, |
const vector & | span | ||
) | const |
Calculate nearest points (to searchPoints) on surface.
Looks only in box of size 2*span around sample. Returns greatPoint if not found.
Definition at line 146 of file triSurfaceSearch.C.
References forAll, PointIndexHit< Point >::hit(), PointIndexHit< Point >::hitPoint(), Foam::magSqr(), and List< T >::size().
pointIndexHit nearest | ( | const point & | pt, |
const vector & | span | ||
) | const |
Calculate nearest point on surface for single searchPoint. Returns.
in pointIndexHit:
Definition at line 176 of file triSurfaceSearch.C.
References Foam::magSqr(), and triSurfaceSearch::tree().
const point greatPoint [static]
|
Point far away; used for illegal finds.
Definition at line 83 of file triSurfaceSearch.H.