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.
46 lines
972 B
C++
46 lines
972 B
C++
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
//文件 Spline.h
|
|
//主要功能:
|
|
// 基础类库,三次样条生成
|
|
//程序编写: 2007-3-28
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
#pragma once
|
|
#include "Point2D.h"
|
|
#include "Curve.h"
|
|
|
|
class AFX_EXT_CLASS CSpline
|
|
{
|
|
public:
|
|
CSpline(void);
|
|
virtual ~CSpline(void);
|
|
|
|
int Create(double* px, double *py, int num, BOOL bClose);
|
|
int GetPoint(CPointList& bp, double dSmoothness);
|
|
|
|
void Clear(void);
|
|
|
|
protected:
|
|
int GetPoint(CPointList& bp, double x, double y, double ax, double ay, double bx, double by, double cx, double cy, double dSmoothness);
|
|
|
|
void CreateSpline(); //生成SPLINE
|
|
void CreateSplineClosed(); //生成关闭SPLINE
|
|
|
|
void MatrixSolve(double* B);
|
|
void MatrixSolveClosed(double *B);
|
|
|
|
int num;
|
|
double* Px; //仅是指向
|
|
double* Py;
|
|
|
|
double* Ax; //需要delete
|
|
double* Ay;
|
|
double* Bx;
|
|
double* By;
|
|
double* Cx;
|
|
double* Cy;
|
|
double* k;
|
|
double* Mat[3];
|
|
};
|