www.pudn.com > 3d_terrain.rar > MeshView.h, change:1999-02-11,size:3275b
// MeshView.h : interface of the CMeshView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_MESHVIEW_H__50ED6A32_C0C1_11D2_B4C7_006067306B48__INCLUDED_)
#define AFX_MESHVIEW_H__50ED6A32_C0C1_11D2_B4C7_006067306B48__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
class CMeshView : public CView
{
protected: // create from serialization only
CMeshView();
DECLARE_DYNCREATE(CMeshView)
// Attributes
public:
CMeshDoc* GetDocument();
// OpenGL specific
BOOL SetWindowPixelFormat(HDC hDC);
BOOL CreateViewGLContext(HDC hDC);
HGLRC m_hGLContext;
int m_GLPixelIndex;
void SetClearColor(void) { glClearColor(m_ClearColorRed,m_ClearColorGreen,m_ClearColorBlue,1.0f); }
unsigned char *SnapClient(CSize *pSize);
// Mouse
BOOL m_LeftButtonDown;
BOOL m_RightButtonDown;
CPoint m_LeftDownPos;
CPoint m_RightDownPos;
HCURSOR m_CursorRotation;
// Position, rotation ,scaling
void InitGeometry(void);
float m_xRotation;
float m_yRotation;
float m_zRotation;
BOOL m_xyRotation;
float m_xTranslation;
float m_yTranslation;
float m_zTranslation;
float m_xScaling;
float m_yScaling;
float m_zScaling;
float m_SpeedTranslation;
float m_SpeedRotation;
// Colors
float m_ClearColorRed;
float m_ClearColorGreen;
float m_ClearColorBlue;
// Animation
float m_StepRotationX;
float m_StepRotationY;
float m_StepRotationZ;
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMeshView)
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);
virtual void OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CMeshView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CMeshView)
afx_msg void OnPaint();
afx_msg void OnDestroy();
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnEditCopy();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in MeshView.cpp
inline CMeshDoc* CMeshView::GetDocument()
{ return (CMeshDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MESHVIEW_H__50ED6A32_C0C1_11D2_B4C7_006067306B48__INCLUDED_)