29 while (++ip1n < Curve.
size() &&
distance(o, Curve[ip1n]) < l);
34 if (ip1n < Curve.
size() && in >= 0)
57 while (--ip1n >= 0 &&
distance(o, Curve[ip1n]) < l);
62 if (ip1n >= 0 && in < Curve.
size())
85 scalar
b = 2.0*(D&(p2 - o));
86 scalar
c =
magSqr(p2) + (o&(o - 2.0*p2)) - l*l;
88 scalar b2m4ac = b*b - 4.0*a*
c;
92 scalar srb2m4ac =
sqrt(b2m4ac);
94 scalar lamda = (-b - srb2m4ac)/(2.0*a);
98 lamda = (-b + srb2m4ac)/(2.0*a);
101 if (lamda < 1.0+curveSmall && lamda > -
curveSmall)
103 n = p2 + lamda*(p1 - p2);
131 while (++ip1n < Curve.
size() &&
mag(o.
x() - Curve[ip1n].x()) < l);
136 if (ip1n < Curve.
size() && in >= 0)
165 if (p2.
x() < o.
x() + l)
171 scalar lamda = (n.
x() - p1.x())/D.
x();
172 n.
y() = p1.y() + lamda*D.
y();
bool XstepForwardsToNextPoint(const vector &o, vector &n, label &i, label &ip1, scalar l, const curve &Curve)
bool stepBackwardsToNextPoint(const vector &o, vector &n, label &i, label &ip1, scalar l, const curve &Curve)
bool interpolate(const vector &p1, const vector &p2, const vector &o, vector &n, scalar l)
void size(const label)
Override size to be inconsistent with allocated storage.
dimensionedScalar sqrt(const dimensionedScalar &ds)
const dimensionedScalar b
Wien displacement law constant: default SI units: [m K].
Holds information (coordinate and normal) regarding nearest wall point.
bool stepForwardsToNextPoint(const vector &o, vector &n, label &i, label &ip1, scalar l, const curve &Curve)
scalar distance(const vector &p1, const vector &p2)
const dimensionedScalar c
Speed of light in a vacuum.
A single curve in a graph.
Templated 3D Vector derived from VectorSpace adding construction from 3 components, element access using x(), y() and z() member functions and the inner-product (dot-product) and cross product operators.
dimensioned< scalar > magSqr(const dimensioned< Type > &)
bool Xinterpolate(const vector &p1, const vector &p2, const vector &o, vector &n, scalar l)
dimensioned< scalar > mag(const dimensioned< Type > &)