?? 3d-treedlg.h
字號:
// 3D-treeDlg.h : 頭文件
//
#pragma once
#include "afxcmn.h"
#include "afxwin.h"
#include "ControlDialog.h"
#include "MyTree.h"
#include "Land.h"
#include "InfoDlg.h"
#include "ChIni.h"
// CMy3DtreeDlg 對話框
class CMy3DtreeDlg : public CDialog
{
// 構造
public:
CMy3DtreeDlg(CWnd* pParent = NULL); // 標準構造函數
BOOL SetWindowPixelFormat(HDC hDC); //設定象素格式
BOOL CreateViewGLContext(HDC hDC); //View GL Context
void RenderScene(); //繪制場景
HDC hrenderDC; //DC
HGLRC hrenderRC; //RC
float m_yRotate; //轉速
int PixelFormat;
// 對話框數據
enum { IDD = IDD_MY3DTREE_DIALOG };
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
private:
int startX, startY, endX, endY;
float rotateX, rotateY;
float translateX, translateY, translateZ;
float changeStep;
CControlDialog* controlPanel;
CInfoDlg* infoDlg;
MyTree* tree;
MyTree* randomTree[ 100 ];
bool reGenerateRandomTree;
Land* land;
ChIni* ini;
bool showTips;
bool isDrag;
bool showGrowProcess;
bool isAutoRotate;
bool isDrawForest;
CRect mainRect;
CRect controlRect;
CMenu *pMenu;
// 實現
protected:
HICON m_hIcon;
bool InitGL();
// 生成的消息映射函數
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
virtual void WinHelp(DWORD dwData, UINT nCmd);
virtual BOOL PreTranslateMessage(MSG* pMsg);
DECLARE_MESSAGE_MAP()
public:
void resetRender();
public:
afx_msg void OnSize(UINT nType, int cx, int cy);
public:
afx_msg void OnTimer(UINT_PTR nIDEvent);
public:
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
public:
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
public:
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
public:
afx_msg void OnWindowPosChanged(WINDOWPOS* lpwndpos);
public:
CSliderCtrl m_depth;
public:
CSliderCtrl m_radius;
public:
CSliderCtrl m_length;
public:
CSliderCtrl m_slices;
public:
CSliderCtrl m_leftBranchTwist;
public:
CSliderCtrl m_leftBranchExpand;
public:
CSliderCtrl m_leafSize;
public:
CButton m_leafVisible;
public:
CButton m_drawLand;
public:
CButton m_landVisible;
public:
CSliderCtrl m_rightBranchExpand;
public:
afx_msg void OnNMCustomdrawTreeDepth(NMHDR *pNMHDR, LRESULT *pResult);
public:
afx_msg void OnMenuitemAbout();
public:
afx_msg void OnMenuitemExit();
public:
afx_msg void OnMunuitemHelp();
public:
afx_msg void OnBnClickedCancel();
public:
afx_msg void OnMenuitemControl();
public:
afx_msg void OnFullscreen();
public:
afx_msg void OnClose();
public:
afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
public:
afx_msg void OnOrthoViewer();
public:
afx_msg void OnOverlookViewer();
public:
afx_msg void OnSideViewer();
public:
afx_msg void OnPerspectiveViewer();
public:
afx_msg void OnMenuitemInfo();
public:
afx_msg void OnNcLButtonDblClk(UINT nHitTest, CPoint point);
public:
afx_msg void OnDestroy();
public:
afx_msg void OnMenuitemAutomove();
};
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -