Helper class to search on triSurface. Creates an octree for each region of the surface and only searches on the specified regions. More...
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 ®ionIndices, List< pointIndexHit > &info) const |
Find the nearest point on the surface out of the regions. More... | |
![]() | |
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 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... | |
Private Types | |
typedef PrimitivePatch< labelledTri, IndirectList, const pointField & > | indirectTriSurface |
typedef treeDataPrimitivePatch< indirectTriSurface > | treeDataIndirectTriSurface |
typedef indexedOctree< treeDataIndirectTriSurface > | treeType |
Private Member Functions | |
triSurfaceRegionSearch (const triSurfaceRegionSearch &) | |
Disallow default bitwise copy construct. More... | |
void | operator= (const triSurfaceRegionSearch &) |
Disallow default bitwise assignment. More... | |
Private Attributes | |
PtrList< indirectTriSurface > | indirectRegionPatches_ |
Surface is split into patches by region. More... | |
PtrList< treeType > | treeByRegion_ |
Search tree for each region. More... | |
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 55 of file triSurfaceRegionSearch.H.
|
private |
Definition at line 66 of file triSurfaceRegionSearch.H.
|
private |
Definition at line 69 of file triSurfaceRegionSearch.H.
|
private |
Definition at line 71 of file triSurfaceRegionSearch.H.
|
private |
Disallow default bitwise copy construct.
|
explicit |
Construct from surface. Holds reference to surface!
Definition at line 33 of file triSurfaceRegionSearch.C.
triSurfaceRegionSearch | ( | const triSurface & | surface, |
const dictionary & | dict | ||
) |
Construct from surface and dictionary. Holds reference to surface!
Definition at line 42 of file triSurfaceRegionSearch.C.
Destructor.
Definition at line 55 of file triSurfaceRegionSearch.C.
|
private |
Disallow default bitwise assignment.
void clearOut | ( | ) |
Clear storage.
Definition at line 61 of file triSurfaceRegionSearch.C.
References triSurfaceSearch::clearOut().
Referenced by triSurfaceMesh::clearOut(), and triSurfaceMesh::movePoints().
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.
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().
|
mutableprivate |
Surface is split into patches by region.
Definition at line 77 of file triSurfaceRegionSearch.H.
Search tree for each region.
Definition at line 80 of file triSurfaceRegionSearch.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.