11template<
typename Value>
15 TGaussian2D(Value sigmaX, Value sigmaY, Value amplitude);
17 Value
evaluate(Value x, Value y)
const override;
25 Value m_xExpMultiplier;
26 Value m_yExpMultiplier;
28 Value m_submergeAmount;
31template<
typename Value>
35 const Value amplitude)
37 : m_xExpMultiplier(static_cast<Value>(-1) / (static_cast<Value>(2) * sigmaX * sigmaX))
38 , m_yExpMultiplier(static_cast<Value>(-1) / (static_cast<Value>(2) * sigmaY * sigmaY))
39 , m_amplitude (amplitude)
43template<
typename Value>
46 const Value func = m_amplitude * std::exp(m_xExpMultiplier * x * x + m_yExpMultiplier * y * y);
47 return std::max(func - m_submergeAmount,
static_cast<Value
>(0));
50template<
typename Value>
53 m_submergeAmount = amt;
Definition TGaussian2D.h:13
TGaussian2D(Value sigmaX, Value sigmaY, Value amplitude)
Definition TGaussian2D.h:32
Value evaluate(Value x, Value y) const override
Definition TGaussian2D.h:44
void setSubmergeAmount(Value amt)
Sink the gaussian with specified amount. Effectively subtract then clamp to zero.
Definition TGaussian2D.h:51
Definition TMathFunction2D.h:8
Math functions and utilities.
Definition TransformInfo.h:10