You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
845 B
C++
38 lines
845 B
C++
#pragma once
|
|
|
|
class CScatteredTrace;
|
|
struct SCATTEREDDATAINDEX;
|
|
|
|
//插值器
|
|
class CInterpolator
|
|
{
|
|
public:
|
|
CInterpolator();
|
|
~CInterpolator();
|
|
//Attributes
|
|
private:
|
|
CScatteredTrace* m_pScatteredData;
|
|
int m_iCalculateMethod;
|
|
// 差值类型
|
|
//0--枚举插值
|
|
//1--距离平方反比加权平均
|
|
//2--距离反比加权平均
|
|
//3--二次曲面
|
|
int m_iInterpolatePointCount;
|
|
|
|
/*用于插值的若干个点(考虑了距离及其它因素)*/
|
|
SCATTEREDDATAINDEX* m_pInterpolateDataIndex;
|
|
|
|
//Operations
|
|
public:
|
|
void SetScatteredData(CScatteredTrace* pScatteredData);
|
|
void SetCalculateMethod(int iMethod);
|
|
int GetInterpolatePoint();
|
|
void SetInterpolatePoint(int iValue);
|
|
SCATTEREDDATAINDEX* GetInterpolateDataIndexArray();
|
|
|
|
double Interpolate(double x,double y,int iType,double* pDataArray=NULL);
|
|
private:
|
|
double Interpolate0(double x,double y,int iType,double* pDataArray);
|
|
};
|