07063257_GLView.h
资源名称:aa.rar [点击查看]
上传用户:kuqidezhu
上传日期:2022-07-18
资源大小:4151k
文件大小:3k
源码类别:
3D图形编程
开发平台:
Visual C++
- // 07063257_GLView.h : interface of the CMy07063257_GLView class
- //
- /////////////////////////////////////////////////////////////////////////////
- #if !defined(AFX_07063257_GLVIEW_H__C753228A_452F_40FA_8B5B_0B9FE3775C13__INCLUDED_)
- #define AFX_07063257_GLVIEW_H__C753228A_452F_40FA_8B5B_0B9FE3775C13__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #include "math.h"
- #include <vector>
- using namespace std;
- #include "AddData.h"
- #include "ChooseTexture.h"
- #include "StdAfx.h" // Added by ClassView
- class CMy07063257_GLView : public CView
- {
- protected: // create from serialization only
- CMy07063257_GLView();
- DECLARE_DYNCREATE(CMy07063257_GLView)
- // Attributes
- public:
- CMy07063257_GLDoc* GetDocument();
- // Operations
- public:
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CMy07063257_GLView)
- 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:
- int twc;
- float aa,bb,cc;
- Vertex CalTexture(float xx, float yy, float zz);
- int type;
- bool opengl_rotate;
- int n;
- int MAX;
- int MAXX,MAXY,MINX,MINY;
- Vertex m_vertex[1100];
- int m_Rotateangle;
- int IsOpen;
- vector<Edge>m_edges;
- vector<Triangle>m_triangles;
- void TriDelaunay(Vertex p1, Vertex p2);
- void OPenGL_Lighting();
- void OnOpenglLighting();
- void OnGetVertex();
- void initial();
- Vertex GetThirdPoint(Vertex p1, Vertex p2);
- void BuildTIN();
- virtual ~CMy07063257_GLView();
- #ifdef _DEBUG
- virtual void AssertValid() const;
- virtual void Dump(CDumpContext& dc) const;
- #endif
- protected:
- // Generated message map functions
- protected:
- HGLRC m_hGLContext;
- int m_GLPixelIndex;
- BOOL SetWindowPixelFormat(HDC hDC);
- BOOL CreateViewGLContext(HDC hDC);
- //{{AFX_MSG(CMy07063257_GLView)
- afx_msg void OnAdddate();
- afx_msg void OnTieTu();
- afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
- afx_msg void OnDestroy();
- afx_msg void OnPaint();
- afx_msg void OnSize(UINT nType, int cx, int cy);
- afx_msg void OnLeft();
- afx_msg void OnRight();
- afx_msg void OnUp();
- afx_msg void OnDown();
- afx_msg void OnLrotaef();
- afx_msg void OnRrotatef();
- afx_msg void OnZoomout();
- afx_msg void OnZoomin();
- afx_msg void OnFront();
- afx_msg void OnBack();
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- };
- #ifndef _DEBUG // debug version in 07063257_GLView.cpp
- inline CMy07063257_GLDoc* CMy07063257_GLView::GetDocument()
- { return (CMy07063257_GLDoc*)m_pDocument; }
- #endif
- /////////////////////////////////////////////////////////////////////////////
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
- #endif // !defined(AFX_07063257_GLVIEW_H__C753228A_452F_40FA_8B5B_0B9FE3775C13__INCLUDED_)