ACF $AcfVersion:0$
CAkimaInterpolator.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ACF-Commercial
2#pragma once
3
4
5// Qt includes
6#include <QtCore/QMap>
7
8// ACF includes
10
11
12namespace imath
13{
14
15
67{
68public:
69 struct Node
70 {
71 double value;
72 double derivative;
73 };
74
75 typedef QMap<double, Node> Nodes;
76
78 CAkimaInterpolator(double* positions, double* values, int nodesCount);
79
80 void SetNodes(double* positions, double* values, int nodesCount);
81
82 // reimplemented (imath::ISampledFunctionInterpolator)
83 virtual bool InitFromFunction(const ISampledFunction& function) override;
84
85 // reimplemented (imath::TIMathFunction<double, double>)
86 virtual bool GetValueAt(const double& argument, double& result) const override;
87 virtual double GetValueAt(const double& argument) const override;
88
89protected:
91};
92
93
94} // namespace imath
95
96
1D interpolation using the Akima method for smooth, natural-looking curves.
virtual double GetValueAt(const double &argument) const override
CAkimaInterpolator(double *positions, double *values, int nodesCount)
void SetNodes(double *positions, double *values, int nodesCount)
QMap< double, Node > Nodes
virtual bool InitFromFunction(const ISampledFunction &function) override
Initialize interpolator based on a sample function.
virtual bool GetValueAt(const double &argument, double &result) const override
Interface for a 1D-interpolator based on a sampled function.
Package with mathematical functions and algebraical primitives.