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;
292 nearLabel = pI + tmpNearLabel;
#define forAll(list, i)
Loop across all elements in list.
label size() const
Return the number of elements in the UList.
void size(const label)
Override size to be inconsistent with allocated storage.
const Point & hitPoint() const
Return hit point.
void setPoint(const Point &p)
void setDistance(const scalar d)
scalar distance() const
Return distance to hit.
const Point & missPoint() const
Return miss point.
bool eligibleMiss() const
Is this an eligible miss.
void setMiss(const bool eligible)
bool hit() const
Is there a hit.
label fcIndex(const label i) const
Return the forward circular index, i.e. the next index.
A face is a list of labels corresponding to mesh vertices.
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.
pointField points(const pointField &) const
Return the points corresponding to this face.
pointHit ray(const point &p, const vector &n, const pointField &, const intersection::algorithm alg=intersection::algorithm::fullRay, const intersection::direction dir=intersection::direction::vector) const
Return potential intersection with face with a ray starting.
pointHit nearestPoint(const point &p, const pointField &) const
Return nearest point to face.
pointHit nearestPointClassify(const point &p, const pointField &, label &nearType, label &nearLabel) const
Return nearest point to face and classify it:
A triangle primitive used to calculate face areas and swept volumes.
pointHit nearestPointClassify(const point &p, label &nearType, label &nearLabel) const
Find the nearest point to p on the triangle and classify it:
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &df)
dimensioned< scalar > mag(const dimensioned< Type > &)
triangle< point, const point & > triPointRef