A collection of tools for searchableSurfaces. More...
Public Member Functions | |
ClassName ("searchableSurfacesQueries") | |
Static Public Member Functions | |
static void | findAnyIntersection (const PtrList< searchableSurface > &, const labelList &surfacesToTest, const pointField &start, const pointField &end, labelList &surfaces, List< pointIndexHit > &) |
Find any intersection. Return hit point information and. More... | |
static void | findAllIntersections (const PtrList< searchableSurface > &, const labelList &surfacesToTest, const pointField &start, const pointField &end, labelListList &surfaces, List< List< pointIndexHit >> &surfaceHits) |
Find all intersections in order from start to end. Returns for. More... | |
static void | findNearestIntersection (const PtrList< searchableSurface > &allSurfaces, const labelList &surfacesToTest, const pointField &start, const pointField &end, labelList &surface1, List< pointIndexHit > &hit1, labelList &surface2, List< pointIndexHit > &hit2) |
Find intersections of edge nearest to both endpoints. More... | |
static void | findNearest (const PtrList< searchableSurface > &, const labelList &surfacesToTest, const pointField &, const scalarField &nearestDistSqr, labelList &surfaces, List< pointIndexHit > &) |
Find nearest. Return -1 (and a miss()) or surface and nearest. More... | |
static void | findNearest (const PtrList< searchableSurface > &allSurfaces, const labelList &surfacesToTest, const pointField &samples, const scalarField &nearestDistSqr, const labelList ®ionIndices, labelList &nearestSurfaces, List< pointIndexHit > &nearestInfo) |
Find nearest points to a specific region of the surface. More... | |
static void | findNearest (const PtrList< searchableSurface > &allSurfaces, const labelList &surfacesToTest, const pointField &start, const scalarField &distSqr, pointField &near, List< pointConstraint > &constraint, const label nIter=20) |
Find nearest points that are on all supplied surfaces. More... | |
static void | signedDistance (const PtrList< searchableSurface > &allSurfaces, const labelList &surfacesToTest, const pointField &samples, const scalarField &nearestDistSqr, const volumeType illegalHandling, labelList &nearestSurfaces, scalarField &distance) |
Find signed distance to nearest surface. Outside is positive. More... | |
static boundBox | bounds (const PtrList< searchableSurface > &allSurfaces, const labelList &surfacesToTest) |
Find the boundBox of the selected surfaces. More... | |
A collection of tools for searchableSurfaces.
Definition at line 52 of file searchableSurfacesQueries.H.
ClassName | ( | "searchableSurfacesQueries" | ) |
|
static |
Find any intersection. Return hit point information and.
index in surfacesToTest. If multiple surfaces hit the first surface is returned, not necessarily the nearest (to start).
Definition at line 118 of file searchableSurfacesQueries.C.
References forAll, Foam::identityMap(), List< T >::setSize(), and List< T >::size().
Referenced by refinementSurfaces::findAnyIntersection(), and searchableSurfaces::findAnyIntersection().
|
static |
Find all intersections in order from start to end. Returns for.
every hit the index in surfacesToTest and the hit info.
Definition at line 179 of file searchableSurfacesQueries.C.
References UList< T >::empty(), forAll, Foam::magSqr(), List< T >::setSize(), and List< T >::size().
Referenced by searchableSurfaces::findAllIntersections().
|
static |
Find intersections of edge nearest to both endpoints.
Definition at line 258 of file searchableSurfacesQueries.C.
References forAll, List< T >::setSize(), and List< T >::size().
Referenced by searchableSurfaces::findNearestIntersection().
|
static |
Find nearest. Return -1 (and a miss()) or surface and nearest.
point.
Definition at line 345 of file searchableSurfacesQueries.C.
References forAll, Foam::magSqr(), samples(), List< T >::setSize(), and List< T >::size().
Referenced by refinementSurfaces::findNearest(), searchableSurfaces::findNearest(), refinementSurfaces::findNearestRegion(), projectVertex::operator point(), projectCurveEdge::position(), and projectEdge::position().
|
static |
Find nearest points to a specific region of the surface.
Definition at line 393 of file searchableSurfacesQueries.C.
References UList< T >::empty(), forAll, Foam::magSqr(), samples(), List< T >::setSize(), and List< T >::size().
|
static |
Find nearest points that are on all supplied surfaces.
(nearest point if single surface; nearest intersection by steepst descent if on multiple surfaces). Returns current best guess). Wip.
Definition at line 456 of file searchableSurfacesQueries.C.
References plane::ray::dir(), UList< T >::fcIndex(), forAll, Foam::mag(), n, plane::planeIntersect(), plane::ray::refPoint(), s(), List< T >::setSize(), and List< T >::size().
|
static |
Find signed distance to nearest surface. Outside is positive.
illegalHandling: how to handle non-inside or outside OUTSIDE : treat as outside INSIDE : treat as inside UNKNOWN : throw fatal error
Definition at line 555 of file searchableSurfacesQueries.C.
References DynamicList< T, SizeInc, SizeMult, SizeDiv >::append(), DynamicField< T, SizeInc, SizeMult, SizeDiv >::append(), DynamicList< T, SizeInc, SizeMult, SizeDiv >::clear(), DynamicField< T, SizeInc, SizeMult, SizeDiv >::clear(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, volumeType::inside, Foam::mag(), volumeType::names, volumeType::outside, samples(), List< T >::setSize(), and List< T >::size().
|
static |
Find the boundBox of the selected surfaces.
Definition at line 654 of file searchableSurfacesQueries.C.
References searchableSurface::bounds(), forAll, boundBox::max(), boundBox::min(), and List< T >::size().
Referenced by searchableSurfaces::bounds(), and projectVertex::operator point().