⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 图形学实验dlg.h

📁 按作业效益非增序输入作业的截止期限
💻 H
字号:
// 图形学实验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:
	//将点的逻辑坐标映射为物理坐标,即屏幕坐标
	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指定 的轴旋转一定角度之后,重新计算其坐标值
	void changelitipoint(LiTipoint& a,char whichzhou,double cita );
	//判断可见面
	bool PanduanKejianmian(LiTipoint a,LiTipoint b, LiTipoint c);
	//工具条控件
	CToolBar m_wndToolbar;
	//状态
	int state;
	//画线用到的用于保存线的起点与终点
	CPoint pointBegin,pointEnd;
	//画圆时用于保存圆的外接矩形的左上顶点以及右下顶点
	CPoint CircleBeginPoint,CircleEndPoint;
	//用于实现双缓冲时作为画布用
	CBitmap mybitmap;
	//屏幕点的信息
	int pointdata[501][501];
	//多面体的边长
	int a;
	//旋转轴
	char zhou;
	//多面体顶点的坐标数组
	LiTipoint A[5];
	LiTipoint LastA[5];
	//计时器状态
	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_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -