⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 interpolate.h

📁 Source code for cnc controlling three dimentioal machine
💻 H
字号:
// interpolate.h: interface for the interpolate class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_INTERPOLATE_H__10532244_775B_11D4_80BF_0000E8DA28BE__INCLUDED_)
#define AFX_INTERPOLATE_H__10532244_775B_11D4_80BF_0000E8DA28BE__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#define TRUE  1
#define FALSE 0
#define BIG (1.0e12f)

#define MAXDIM 3
typedef float Vect[MAXDIM];
typedef float Knot;
typedef int Bool;

#define V_Op(vdst,gets,vsrc,n) {register int V_i;\
    for(V_i=(n)-1;V_i>=0;V_i--) (vdst)[V_i] gets  ((vsrc)[V_i]);}



class interpolate  
{
public:
	interpolate();
	virtual ~interpolate();
 
	void DoInterp( float t );
 	void SetInterp(int pos, double x, double y, double z);
	int flavor;
	double newx,newy,newz;
private:
	static void lerp(Knot t, Knot a0, Knot a1, Vect p0, Vect p1, int m, Vect p);
	int DialASpline(Knot t, Knot a[], Vect p[], int m, int n, Vect work[],
                    int Cn, Bool interp, Vect val);



};

#endif // !defined(AFX_INTERPOLATE_H__10532244_775B_11D4_80BF_0000E8DA28BE__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -