-
Notifications
You must be signed in to change notification settings - Fork 48
/
Copy pathShaper.h
57 lines (40 loc) · 1003 Bytes
/
Shaper.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#if !defined(AFX_SHAPER_H__E8BC8F40_056E_11D4_B566_00AA00419C92__INCLUDED_)
#define AFX_SHAPER_H__E8BC8F40_056E_11D4_B566_00AA00419C92__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "Spline.h"
#include "ShaperView.h"
#include "Preview.h"
#include "Defines.h"
class CShaperView;
class CPreview;
class CShaper
{
friend class CShaperView;
public:
void process(float *input, float *output, long nSamp);
CShaper();
virtual ~CShaper();
void SetData(SplinePoint *data, long n);
void GetData(SplinePoint *data);
long GetNPoints();
void updatedata();
void SetPointerToView(CShaperView *pView);
void SetPointerToPreview(CPreview *pPre);
void reset();
private:
SplinePoint p[maxn];
long n;
void FillP2();
float GetSplinePoint(float wantedX);
float GetBSplinePoint(float wantedX, KnoopVector *u);
float guess;
CShaperView *pView;
CPreview *pPreview;
float data[table_size + 1];
float a, b;
long degree;
SplinePoint p2[maxn];
};
#endif