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

📄 controldialog.h

📁 此文档是用vistual studio 2005 开发的用来描述3D-tree 的生长过程
💻 H
字号:
#pragma once
#include "afxcmn.h"
#include "MyTree.h"
#include "Land.h"
#include "afxwin.h"
#include "ChIni.h"

// CControlDialog 对话框

class CControlDialog : public CDialog
{
	DECLARE_DYNAMIC(CControlDialog)

public:
	CControlDialog(CWnd* pParent = NULL);   // 标准构造函数
	void setControlTree( MyTree* tree, Land* land, bool* showGrowProcess, 
						float* rotateX, float* rotateY,
						float* translateX, float* translateY, float* translateZ,
						float* changeStep, bool* isAutoRotate, bool* isDrawForest, bool* reGenerateRandomTree );
	virtual ~CControlDialog();

// 对话框数据
	enum { IDD = IDD_DIALOG_CONTROL };
private:
	ChIni* ini;
	MyTree* tree;
	Land* land;
	bool* showGrowProcess;
	bool* isAutoRotate;
	bool* isDrawForest;
	bool* reGenerateRandomTree;
	float* rotateX;
	float* rotateY;
	float* translateX;
	float* translateY;
	float* translateZ;
	float* changeStep;
protected:
	virtual BOOL OnInitDialog();
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV 支持
	virtual BOOL PreTranslateMessage(MSG* pMsg);

	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnNMCustomdrawTreeDepth(NMHDR *pNMHDR, LRESULT *pResult);
public:
	void enableControls( bool bEnable );
public:
	void saveConfig();
public:
	void reset();
public:
	CSliderCtrl m_treeDepth;
public:
	CSliderCtrl m_baseLength;
public:
	afx_msg void OnNMCustomdrawTreeBaseLength(NMHDR *pNMHDR, LRESULT *pResult);
public:
	CSliderCtrl m_treeLength;
public:
	afx_msg void OnNMCustomdrawTreeLength(NMHDR *pNMHDR, LRESULT *pResult);
public:
	CSliderCtrl m_treeSlices;
public:
	afx_msg void OnNMCustomdrawBranchSlices(NMHDR *pNMHDR, LRESULT *pResult);
public:
	CSliderCtrl m_radius;
public:
	afx_msg void OnNMCustomdrawTreeRadius(NMHDR *pNMHDR, LRESULT *pResult);
public:
	CSliderCtrl m_leafSize;
public:
	afx_msg void OnNMCustomdrawLeafSize(NMHDR *pNMHDR, LRESULT *pResult);
public:
	CSliderCtrl m_leftBranchTwist;
public:
	afx_msg void OnNMCustomdrawLeftBranchTwist(NMHDR *pNMHDR, LRESULT *pResult);
public:
	CSliderCtrl m_leftBranchExpand;
public:
	afx_msg void OnNMCustomdrawLeftBranchExpand(NMHDR *pNMHDR, LRESULT *pResult);
public:
	CSliderCtrl m_rightBranchExpand;
public:
	afx_msg void OnNMCustomdrawRightBranchExpand2(NMHDR *pNMHDR, LRESULT *pResult);
public:
	CButton m_landVisible;
public:
	afx_msg void OnBnClickedShowland();
public:
	CButton m_leafVisible;
public:
	afx_msg void OnBnClickedShowleaf();
public:
	afx_msg void OnBnClickedButtonShowgrow();
public:
	afx_msg void OnBnClickedCancel();
public:
	afx_msg void OnBnClickedShakeleaf();
public:
	CButton m_leafShakeble;
public:
	afx_msg void OnBnClickedOk();
public:
//	afx_msg void OnClose();
public:
	afx_msg void OnDestroy();
public:
	afx_msg void OnBnClickedButton2();
public:
	afx_msg void OnBnClickedButtonRotate();
public:
	afx_msg void OnBnClickedButtonForset();
public:
	CButton m_showGrow;
public:
	CButton m_reset;
};

⌨️ 快捷键说明

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