?? smooth.h
字號:
// Smooth.h: interface for the CSmooth class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_SMOOTH_H__586F9434_010D_4FA7_AD99_0F33188A8BBD__INCLUDED_)
#define AFX_SMOOTH_H__586F9434_010D_4FA7_AD99_0F33188A8BBD__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <afxtempl.h>
#include "GlobalFUnctions.h"
class CSmooth
{
private://平滑用到的參數(shù)
double si0, si1, si2, si3, ssum; //參數(shù)意義可以參考平滑原理部分
double ax, bx, cx, ay, by, cy;
double si00, si10, si20, si30; //余下參數(shù)為第一套參數(shù)的備份
double ax0, bx0, cx0, ay0, by0, cy0;
double dts; //平滑時采用的最短步長
private://平滑之后形成的加密度點
XYZ * points_; // 待平滑(加密前)的點
int count_; // points的大小
XYZ *ptArray; // 平滑(加密度)后的點, 在本類中分配內(nèi)存
int ptArrayCount;
int zValue; // 標注平滑后的等值線時使用的數(shù)據(jù)
public:
CSmooth(XYZ* points, int count);
virtual ~CSmooth();
private:
void CalcPara(const int i, bool bCalcS, const XYZ* Points);
double x1(const double s);
double y1(const double s);
double x2(const double s);
double y2(const double s);
double a(const double s);
private:
void RemoveRepeatPoints(XYZ* points, int& count);
public:
void GetSmoothedPoints(XYZ **afterpoints, int& afterpointscount);
void Smooth();
protected: // no use!!!
void DrawSmoothLines(CDC *dc); //畫平滑線
void DrawLable(CDC *dc, double zValue); //標注
};
#endif // !defined(AFX_SMOOTH_H__586F9434_010D_4FA7_AD99_0F33188A8BBD__INCLUDED_)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -