17 #ifndef GZ_MATH_SEPARABLE_SCALAR_FIELD3_HH_
18 #define GZ_MATH_SEPARABLE_SCALAR_FIELD3_HH_
25 #include <gz/math/config.hh>
30 inline namespace GZ_MATH_VERSION_NAMESPACE {
36 template<
typename ScalarFunctionT,
typename ScalarT>
67 ScalarT _k, ScalarFunctionT _p,
68 ScalarFunctionT _q, ScalarFunctionT _r)
69 : k(_k), p(
std::move(_p)), q(
std::move(_q)), r(
std::move(_r))
90 return this->Evaluate(_point);
108 this->p.Minimum(_region.
Ix(), _pMin.
X()) +
109 this->q.Minimum(_region.
Iy(), _pMin.
Y()) +
110 this->r.Minimum(_region.
Iz(), _pMin.
Z()));
120 return this->Minimum(_region, pMin);
147 ScalarFunctionT, ScalarT> &_field)
150 constexpr ScalarT epsilon =
152 if ((abs(_field.k) - ScalarT(1)) < epsilon)
154 if (_field.k < ScalarT(0))
161 _out << _field.k <<
" ";
164 _field.p.Print(_out,
"x");
166 _field.q.Print(_out,
"y");
168 _field.r.Print(_out,
"z");
176 private: ScalarFunctionT p;
179 private: ScalarFunctionT q;
182 private: ScalarFunctionT r;
185 template<
typename ScalarFunctionT>
189 template<
typename ScalarFunctionT>