?? 圖形學(xué)實驗dlg.h
字號:
// 圖形學(xué)實驗Dlg.h : header file
//
#if !defined(AFX_DLG_H__B83B0CC3_BD2B_48AD_A23E_C9FDBEECF803__INCLUDED_)
#define AFX_DLG_H__B83B0CC3_BD2B_48AD_A23E_C9FDBEECF803__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/////////////////////////////////////////////////////////////////////////////
// CMyDlg dialog
struct LiTipoint
{
double x,y,z;
};
class CMyDlg : public CDialog
{
// Construction
public:
//將點的邏輯坐標(biāo)映射為物理坐標(biāo),即屏幕坐標(biāo)
CPoint ChangePoint(CPoint point);
CMyDlg(CWnd* pParent = NULL); // standard constructor
//DDA法畫線
int round(const float a);
void lineDDA(int x0,int y0,int xEnd,int yEnd,COLORREF cr);
//DDA法畫圓
void CircleDDA(int x0,int y0,int r,COLORREF cr);
//將點繞whichzhou指定 的軸旋轉(zhuǎn)一定角度之后,重新計算其坐標(biāo)值
void changelitipoint(LiTipoint& a,char whichzhou,double cita );
//判斷可見面
bool PanduanKejianmian(LiTipoint a,LiTipoint b, LiTipoint c);
//工具條控件
CToolBar m_wndToolbar;
//狀態(tài)
int state;
//畫線用到的用于保存線的起點與終點
CPoint pointBegin,pointEnd;
//畫圓時用于保存圓的外接矩形的左上頂點以及右下頂點
CPoint CircleBeginPoint,CircleEndPoint;
//用于實現(xiàn)雙緩沖時作為畫布用
CBitmap mybitmap;
//屏幕點的信息
int pointdata[501][501];
//多面體的邊長
int a;
//旋轉(zhuǎn)軸
char zhou;
//多面體頂點的坐標(biāo)數(shù)組
LiTipoint A[5];
LiTipoint LastA[5];
//計時器狀態(tài)
bool isTimerOn;
bool isfirstview;
//方向
int fangxiang;
//畫家算法原理演示時用的
CPoint pshuzu[6][3];
CRgn myrgn[6];
CBrush mybrush[6];
//{{AFX_DATA(CMyDlg)
enum { IDD = IDD_MY_DIALOG };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMyDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CMyDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnGuanyu();
afx_msg void Onpoint();
afx_msg void OnX30();
afx_msg void On2Line();
afx_msg void On2yuan();
afx_msg void On3duomianti();
afx_msg void OnClear();
afx_msg void OnKUAIda();
afx_msg void OnKUAIxiao();
afx_msg void OnX60();
afx_msg void OnX90();
afx_msg void OnY30();
afx_msg void OnY90();
afx_msg void OnY60();
afx_msg void OnYuan();
afx_msg void OnExit();
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
afx_msg BOOL PreTranslateMessage(MSG* pMsg);
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnZ30();
afx_msg void OnZ60();
afx_msg void OnZ90();
afx_msg void OnFuyuan();
afx_msg void OnHuajia();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_DLG_H__B83B0CC3_BD2B_48AD_A23E_C9FDBEECF803__INCLUDED_)
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -