📄 wbase.h
字号:
// WBase.h: interface for the CWBase class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_WBASE_H__63DC88CF_5EC7_40AD_9375_31C4D714D4FA__INCLUDED_)
#define AFX_WBASE_H__63DC88CF_5EC7_40AD_9375_31C4D714D4FA__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <iostream>
#include <fstream>
#include <vector>
#include <math.h>
using namespace std ;
typedef struct tagPOT
{
int x ;
int y ;
} POT ;
typedef struct tagvPOT
{
double x;
double y;
} vPOT ;
#define PI 3.1415926
#define DRAW_BONE_ORG_X 566
#define DRAW_BONE_ORG_Y 225
#define DRAW_BONE_ARM 15 /*points*/
#define DRAW_BONE_STEP 10 /*pixels*/
#define VECTOR_LEN 100
#define WM_UPDAATEPARAM WM_USER+132
#define WM_PARAMPLUS WM_USER+133
#define WM_PARAMDEC WM_USER+134
#define WM_UPDATAS WM_USER+135
#define WM_UPVALUES WM_USER+136
class CWBase
{
public:
CWBase();
virtual ~CWBase();
bool bfirstdraw ;
bool bgetpoint ;
POT m_mpt,m_npt ;
int m_idx ;
bool b_pt_bone ;
bool b_pt_vector ;
HWND m_hwnd_pa;
int totaln ;
CBitmap cMBitmap ;
public:
vector<POT>list_n;
vector<double>vlsv;
vector<bool>bl;
vector<vPOT>vwk ;
inline double acos2(double x)
{
if(x>1.0||x<-1.0)
return PI ;
else
return acos(x);
}
static double
gformula(double _b,
double _u,
double x) ;
int get_len(){return totaln ;}
POT get_n(int i){return list_n[i%totaln];}
double
get_vl(int i){return vlsv[i%totaln];}
bool get_iscp(int i){return bl[i%totaln];}
int rchaincode(char * pname);
void
grect(RECT & r)const;
void
drawpttype(int idx ,
CDC *pDC)const;
void
drawptvector(int idx ,
CDC *pDC)const;
bool
gptinfo(POT & pt ,int & idx)const;
virtual void startwk()=0;
virtual void get_data(const char * logname)=0;
virtual char*getfn()=0;
virtual void setparam(const char * filename , //数据文件名
double _b____b, //正态分布参数..same
double _u____u, //正态分布参数..same
int dmin___k, //距离最小值.. k
int dmax___delta, //距离最大值.. delta
double alpa___alpa, //角点角度分界值..alpa
int n___ramda //正态分布取点个数..ramda
)=0;
void drawmap(CDC * pDC);
void UpdatePa();
void UpdataVl();
};
#endif // !defined(AFX_WBASE_H__63DC88CF_5EC7_40AD_9375_31C4D714D4FA__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -