56 meshPoints[
operator[](0)],
57 meshPoints[
operator[](1)],
58 meshPoints[
operator[](2)]
59 ).ray(p, n, alg, dir);
64 scalar nearestHitDist = great;
66 scalar nearestMissDist = great;
67 bool eligible =
false;
76 point nextPoint = ctr;
80 nextPoint = meshPoints[f[fcIndex(pI)]];
89 ).ray(p, n, alg, dir);
100 else if (!nearest.
hit())
116 if (missDist < nearestMissDist)
118 nearestMissDist = missDist;
155 meshPoints[
operator[](0)],
156 meshPoints[
operator[](1)],
157 meshPoints[
operator[](2)]
158 ).intersection(p, q, alg, tol);
161 scalar nearestHitDist = vGreat;
174 meshPoints[f[fcIndex(pI)]],
176 ).intersection(p, q, alg, tol);
206 label nearLabel = -1;
208 return nearestPointClassify(p, meshPoints, nearType, nearLabel);
225 meshPoints[
operator[](0)],
226 meshPoints[
operator[](1)],
227 meshPoints[
operator[](2)]
228 ).nearestPointClassify(p, nearType, nearLabel);
231 const face&
f = *
this;
232 point ctr = centre(meshPoints);
242 point nextPoint = ctr;
246 nextPoint = meshPoints[f[fcIndex(pI)]];
248 label tmpNearType = -1;
249 label tmpNearLabel = -1;
276 if (tmpNearType == triPointRef::EDGE && tmpNearLabel == 0)
285 else if (tmpNearType == triPointRef::POINT && tmpNearLabel < 2)
292 nearLabel = pI + tmpNearLabel;
#define forAll(list, i)
Loop across all elements in list.
A triangle primitive used to calculate face areas and swept volumes.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A face is a list of labels corresponding to mesh vertices.
void size(const label)
Override size to be inconsistent with allocated storage.
pointHit nearestPointClassify(const point &p, label &nearType, label &nearLabel) const
Find the nearest point to p on the triangle and classify it:
const Point & missPoint() const
Return miss point.
pointHit intersection(const point &p, const vector &q, const point &ctr, const pointField &, const intersection::algorithm alg, const scalar tol=0.0) const
Fast intersection with a ray.
pointHit ray(const point &p, const vector &n, const pointField &, const intersection::algorithm alg=intersection::FULL_RAY, const intersection::direction dir=intersection::VECTOR) const
Return potential intersection with face with a ray starting.
void setDistance(const scalar d)
const Point & hitPoint() const
Return hit point.
bool hit() const
Is there a hit.
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &df)
void setMiss(const bool eligible)
pointHit nearestPoint(const point &p, const pointField &) const
Return nearest point to face.
triangle< point, const point & > triPointRef
dimensioned< scalar > mag(const dimensioned< Type > &)
scalar distance() const
Return distance to hit.
bool eligibleMiss() const
Is this an eligible miss.
void setPoint(const Point &p)
pointHit nearestPointClassify(const point &p, const pointField &, label &nearType, label &nearLabel) const
Return nearest point to face and classify it: