📄 ge_3041222098view.h
字号:
// ge_3041222098View.h : interface of the CGe_3041222098View class
//
/////////////////////////////////////////////////////////////////////////////
#include "gl/gl.h"
#include "gl/glu.h"
#include "gl/glut.h"
#include <math.h>
typedef GLfloat point3[3];
#if !defined(AFX_GE_3041222098VIEW_H__2F083C3A_6B63_4AF4_BFF4_7D5D7918D1FA__INCLUDED_)
#define AFX_GE_3041222098VIEW_H__2F083C3A_6B63_4AF4_BFF4_7D5D7918D1FA__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CGe_3041222098View : public CView
{
protected: // create from serialization only
CGe_3041222098View();
DECLARE_DYNCREATE(CGe_3041222098View)
// Attributes
public:
CGe_3041222098Doc* GetDocument();
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CGe_3041222098View)
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:
BOOL SetupPixelFormat(PIXELFORMATDESCRIPTOR *pPFD = 0);
void DivideTriangle(point3 &a, point3 &b, point3 &c, int n);
void Normalize(point3 &p);
void DrawTriangle(point3 &a, point3 &b, point3 &c);
void DrawScene();
void CrossProduct(point3 &a, point3 &b, point3 &c, point3 &r);
virtual ~CGe_3041222098View();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
int id;
int m_axis;
HGLRC m_hRC;
CDC *m_pDC;
float m_theta[3];
UINT m_timer;
float viewer[3];
//{{AFX_MSG(CGe_3041222098View)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnDestroy();
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnballFlat();
afx_msg void OnballSmooth();
afx_msg void OnballWireframe();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in ge_3041222098View.cpp
inline CGe_3041222098Doc* CGe_3041222098View::GetDocument()
{ return (CGe_3041222098Doc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_GE_3041222098VIEW_H__2F083C3A_6B63_4AF4_BFF4_7D5D7918D1FA__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -