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

📄 wanguanview.h

📁 弯管机的弯管控制程序。可以在弯管机加工前分析管型与机型是否能够加工出来。
💻 H
字号:
// WanGuanView.h : interface of the CWanGuanView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_WANGUANVIEW_H__5FCB44AB_D4AD_4C9D_9934_F5C13624D73F__INCLUDED_)
#define AFX_WANGUANVIEW_H__5FCB44AB_D4AD_4C9D_9934_F5C13624D73F__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "YBC.h"

class CWanGuanDoc;
class CWanGuanView : public CView
{
protected: // create from serialization only
	CWanGuanView();
	DECLARE_DYNCREATE(CWanGuanView)

// Attributes
public:
	CWanGuanDoc* GetDocument();

// Operations
public:
	HGLRC		m_hRC;			//OpenGL绘制描述表
	HPALETTE	m_hPalette;		//OpenGL调色板
	CDC*	    m_pDC;			//OpenGL设备描述表
	// Mouse 
	BOOL m_LeftButtonDown,m_bRotateOperation;
	BOOL m_RightButtonDown,m_bMoveOperation;
	CPoint m_LeftDownPos;
	CPoint m_RightDownPos;
	float m_xRotation;
	float m_yRotation;
	float m_xTranslation;
	float m_yTranslation;
	float m_zTranslation;
	float m_xScaling;
	float m_yScaling;
	float m_zScaling;
	//选择视图模式
	int iViewMode;//1.构造管型2.成型过程
	float	fSimulationSpeed;//仿真运动速度
	//管子参数
	float fGuanR;//管子半径
	float fGuanTotalL;//管子总长度
	float fGuanCurrentPos;//管子当前位置
	BOOL bSingleB;//管子只作B轴旋转
	float fGuanDuanCurrentB;//管子B轴当前转到的位置
	float fGuanDuanB;//当前管段总共需要转过的B角度
// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CWanGuanView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	virtual void OnInitialUpdate();
	protected:
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
	//}}AFX_VIRTUAL

// Implementation
public:
	void drawGuanNotFormed(float fGuanCurrentPos,int iCurrentGuanDuan);
	void FormingProcessViewSub(int iYBCNum,int iCurrentGuanDuan,int iProcessType);
	void CalCreatedPipe();
	void FormingProcessView();
	void CreatePipeView();
	//YBC行号,管段类型(1:直段;2:弯段)
	void drawTorus(float fGuanInR, YBCArray &YBCs,int iCurrentLine);
	void DrawAxis();
	void drawCylinder(float fGuanR,YBCArray &YBCs,int iCurrentLine);
	void SetLogicalPalette(void);
	BOOL InitializeOpenGL(CDC* pDC);
	BOOL SetupPixelFormat();
	virtual ~CWanGuanView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CWanGuanView)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnPaint();
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnTimer(UINT nIDEvent);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in WanGuanView.cpp
inline CWanGuanDoc* CWanGuanView::GetDocument()
   { return (CWanGuanDoc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_WANGUANVIEW_H__5FCB44AB_D4AD_4C9D_9934_F5C13624D73F__INCLUDED_)

⌨️ 快捷键说明

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