7template<
class PatchType>
22 excludeIndices_(excludeIndices)
30 scalar& nearestDistSqr,
36 const PatchType& patch = shape.
patch();
42 const label index = indices[i];
44 if (!excludeIndices_.found(index))
46 const auto&
f = patch[index];
51 if (distSqr < nearestDistSqr)
53 nearestDistSqr = distSqr;
55 nearestPoint = nearHit.
point();
Minimal example by using system/controlDict.functions:
scalar distance() const noexcept
Return distance to hit.
const point_type & point() const noexcept
Return the point, no checks.
findNearestMaskedOp(const indexedOctree< treeDataPrimitivePatch< PatchType > > &tree, const labelUList &excludeIndices)
Non-pointer based hierarchical recursive searching.
Encapsulation of data needed to search on PrimitivePatches.
const PatchType & patch() const noexcept
The underlying patch.
PointHit< point > pointHit
A PointHit with a 3D point.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
vector point
Point is a vector.
vectorField pointField
pointField is a vectorField.
UList< label > labelUList
A UList of labels.
Tree tree(triangles.begin(), triangles.end())
#define forAll(list, i)
Loop across all elements in list.