?? testview.h
字號:
// TestView.h : interface of the CTestView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_TESTVIEW_H__A75FDCFB_621C_4E38_A154_C344803E6372__INCLUDED_)
#define AFX_TESTVIEW_H__A75FDCFB_621C_4E38_A154_C344803E6372__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CTestView : public CView
{
protected: // create from serialization only
CTestView();
DECLARE_DYNCREATE(CTestView)
// Attributes
public:
CTestDoc* GetDocument();
// Operations
public:
void GetMaxY();//獲得屏幕的最大y值
void GetMaxX();//獲得屏幕的最大x值
void ReadCube();//讀入立方體數據
void DrawCube();//繪制立方體
void ClearMatrix(double A[4][4]);//矩陣元素清零
void Transform3DTo2D(double const P3D[8][4],double P2D[8][2],const int n);//三維坐標變換為二維坐標
void Calculate(double P0[][4],double T[][4]);//兩個矩陣相乘
void KeepOriginalMatrix(double Orig[8][4],double Dest[8][4]);//保留矩陣
void Tmove(double Tx,double Ty,double Tz);//平移矩陣
void Tscale(double Sx,double Sy,double Sz);//比例矩陣
void Tzrotate(double thta);//Z軸旋轉矩陣
void Txrotate(double thta);//X旋轉矩陣
void Tyrotate(double thta);//Y旋轉矩陣
void Treflect(double Fx,double Fy,double Fz);//反射矩陣
void Treform(double b,double c,double d,double f,double g,double h);//錯切矩陣
void Line(CPoint p[]);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CTestView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CTestView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
int MaxX,MaxY;//屏幕x和y的最大坐標
double P3D[8][4];//3維變換點
double P2D[8][2];//2維變換點
double TM[4][4];//變換矩陣
double TS[4][4];//比例矩陣
double TZR[4][4];//z軸旋轉矩陣
double TXR[4][4];//x軸旋轉矩陣
double TYR[4][4];//y軸旋轉矩陣
double TF[4][4];//反射矩陣
double TC[4][4];//錯切矩陣
// Generated message map functions
protected:
//{{AFX_MSG(CTestView)
afx_msg void OnMENULeft();
afx_msg void OnMENU3D();
afx_msg void OnMENUFront();
afx_msg void OnMENUBack();
afx_msg void OnMENUright();
afx_msg void OnMENUUp();
afx_msg void OnMENUDown();
afx_msg void OnMENUIncrease();
afx_msg void OnMENUDecrease();
afx_msg void OnMENUzrotate();
afx_msg void OnMENUxrotate();
afx_msg void OnMENUyrotate();
afx_msg void OnMENUReset();
afx_msg void OnMENUxoy();
afx_msg void OnMENUyoz();
afx_msg void OnMENUzox();
afx_msg void OnMENUXdirection();
afx_msg void OnMENUYdirection();
afx_msg void OnMENUZdirection();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in TestView.cpp
inline CTestDoc* CTestView::GetDocument()
{ return (CTestDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_TESTVIEW_H__A75FDCFB_621C_4E38_A154_C344803E6372__INCLUDED_)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -