mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-08-08 23:30:06 +00:00
bspline wip more
This commit is contained in:
parent
214590742d
commit
0afd09dc75
7 changed files with 210 additions and 33 deletions
23
BBGE/Interpolators.h
Normal file
23
BBGE/Interpolators.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
#ifndef BBGE_INTERPOLATORS_H
|
||||
#define BBGE_INTERPOLATORS_H
|
||||
|
||||
#include <algorithm> // std::pair
|
||||
#include <vector>
|
||||
#include "Vector.h"
|
||||
|
||||
class CosineInterpolator
|
||||
{
|
||||
public:
|
||||
CosineInterpolator();
|
||||
void clear();
|
||||
void setPoints(const Vector *p, size_t n);
|
||||
float operator()(float x) const;
|
||||
void interpolateRange(float *ys, const float *xs, size_t n);
|
||||
|
||||
private:
|
||||
|
||||
std::vector<std::pair<float, float> > pxy;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue