Loading...
Searching...
No Matches
triSurfaceSearch Class Reference

Helper class to search on triSurface. More...

#include <triSurfaceSearch.H>

Inheritance diagram for triSurfaceSearch:

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 triSurfacesurface () 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.

Detailed Description

Helper class to search on triSurface.

Source files

Definition at line 54 of file triSurfaceSearch.H.

Constructor & Destructor Documentation

◆ triSurfaceSearch() [1/3]

triSurfaceSearch ( const triSurface & surface)
explicit

Construct from surface. Holds reference to surface!

Definition at line 129 of file triSurfaceSearch.C.

References surface().

Here is the call graph for this function:

◆ triSurfaceSearch() [2/3]

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().

Here is the call graph for this function:

◆ triSurfaceSearch() [3/3]

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().

Here is the call graph for this function:

◆ ~triSurfaceSearch()

~triSurfaceSearch ( )

Destructor.

Definition at line 184 of file triSurfaceSearch.C.

References clearOut().

Here is the call graph for this function:

Member Function Documentation

◆ clearOut()

void clearOut ( )

Clear storage.

Definition at line 190 of file triSurfaceSearch.C.

Referenced by triSurfaceRegionSearch::clearOut(), and ~triSurfaceSearch().

Here is the caller graph for this function:

◆ tree()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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().

Here is the caller graph for this function:

◆ surface()

◆ tolerance()

scalar tolerance ( ) const
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().

Here is the caller graph for this function:

◆ maxTreeDepth()

label maxTreeDepth ( ) const
inline

Return max tree depth of octree.

Definition at line 176 of file triSurfaceSearch.H.

Referenced by triSurfaceMesh::edgeTree(), triSurfaceRegionSearch::treeByRegion(), and triSurfaceSearch().

Here is the caller graph for this function:

◆ calcInside()

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().

Here is the call graph for this function:

◆ findNearest()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nearest()

Foam::pointIndexHit nearest ( const point & pt,
const vector & span ) const

Calculate nearest point on surface for single searchPoint. Returns.

in pointIndexHit:

  • hit() : whether nearest point found within bounding box
  • point() : coordinate of nearest point
  • index() : surface triangle label

Definition at line 330 of file triSurfaceSearch.C.

References Foam::magSqr(), and tree().

Referenced by distributedTriSurfaceMesh::getNormal().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ findLine()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ findLineAny()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ findLineAll()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: