Go to the documentation of this file.
110 label pointI = (useSubset_ ? pointLabels_[index] : index);
111 return cubeBb.
contains(points_[pointI]);
120 const scalar radiusSqr
123 label pointI = (useSubset_ ? pointLabels_[index] : index);
125 if (
magSqr(points_[pointI] - centre) <= radiusSqr)
134 void Foam::treeDataPoint::findNearestOp::operator()
139 scalar& nearestDistSqr,
148 const label index = indices[i];
158 scalar distSqr =
magSqr(pt - sample);
160 if (distSqr < nearestDistSqr)
162 nearestDistSqr = distSqr;
170 void Foam::treeDataPoint::findNearestOp::operator()
184 scalar nearestDistSqr = GREAT;
187 nearestDistSqr =
magSqr(linePoint - nearestPoint);
192 const label index = indices[i];
202 if (tightest.contains(shapePt))
208 if (distSqr < nearestDistSqr)
210 nearestDistSqr = distSqr;
213 nearestPoint = shapePt;
217 minPt =
min(
ln.start(),
ln.end());
224 maxPt =
max(
ln.start(),
ln.end());
235 bool Foam::treeDataPoint::findIntersectOp::operator()
vectorField pointField
pointField is a vectorField.
const labelList & pointLabels() const
const pointField & points() const
findIntersectOp(const indexedOctree< treeDataPoint > &tree)
#define forAll(list, i)
Loop across all elements in list.
This class describes the interaction of a face and a point. It carries the info of a successful hit a...
const Point & rawPoint() const
Return point with no checking.
Standard boundBox + extra functionality for use in octree.
treeDataPoint(const pointField &)
Construct from pointField. Holds reference!
Holds (reference to) pointField. Encapsulation of data needed for octree searches....
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
scalar distance() const
Return distance to hit.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
pointField shapePoints() const
Get representative point cloud for all shapes inside.
Non-pointer based hierarchical recursive searching.
findNearestOp(const indexedOctree< treeDataPoint > &tree)
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
bool contains(const vector &dir, const point &) const
Contains point (inside or on edge) and moving in direction.
volumeType getVolumeType(const indexedOctree< treeDataPoint > &, const point &) const
Get type (inside,outside,mixed,unknown) of point w.r.t. surface.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
bool overlaps(const label index, const treeBoundBox &sampleBb) const
Does (bb of) shape at index overlap bb.
bool ln(const fileName &src, const fileName &dst)
Create a softlink. dst should not exist. Returns true if successful.
defineTypeNameAndDebug(combustionModel, 0)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
labelList pointLabels(nPoints, -1)
dimensioned< scalar > magSqr(const dimensioned< Type > &)