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

📄 tin3dview.h

📁 Tin3D.rar 三维TIN的构建方面的东西
💻 H
字号:
// 3DEMonOPENGLView.h : interface of the CTin3DView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_3DEMONOPENGLVIEW_H__47E855C0_8EC2_4E64_8921_D6ACEAE2162F__INCLUDED_)
#define AFX_3DEMONOPENGLVIEW_H__47E855C0_8EC2_4E64_8921_D6ACEAE2162F__INCLUDED_

#include "StdAfx.h"	// Added by ClassView
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "math.h"
#include <vector>
using   namespace   std; 
#include "DiaBegin.h"
#include "ChooseTexture.h"

class CTin3DView : public CView
{
protected: // create from serialization only
	CTin3DView();
	DECLARE_DYNCREATE(CTin3DView)
		
public:
	void BuildTIN();
	int IsOpen;
	Vertex m_vertex[1100];
	int MAX;	
	void OPenGL_Lighting();
	void CalculateNormal();	
	Vertex GetThirdPoint(Vertex p1, Vertex p2);
	void TriDelaunay(Vertex p1,Vertex p2);     
	void initial();   	
public:	
	int m_Rotateangle;
    bool opengl_rotate;	
	vector<Edge>m_edges;
	vector<Triangle>m_triangles;
	
public:
	CTin3DDoc* GetDocument();
	
	
	

public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
 
public:
	int n;
 	void OnGetVertex();
	void OnOpenglLighting();
                         
	
	
	virtual ~CTin3DView();
#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 CreateViewGLContext(HDC hDC);
	BOOL SetWindowPixelFormat(HDC hDC);
	
	//{{AFX_MSG(CTin3DView)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnDestroy();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnPaint();
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnTx();
	afx_msg void OnPoint();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in 3DEMonOPENGLView.cpp
inline CTin3DDoc* CTin3DView::GetDocument()
{ return (CTin3DDoc*)m_pDocument; }
#endif

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

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

#endif // !defined(AFX_3DEMONOPENGLVIEW_H__47E855C0_8EC2_4E64_8921_D6ACEAE2162F__INCLUDED_)

⌨️ 快捷键说明

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