Добавил:
Studfiles2
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:Лабораторная работа №42 / GLlabView
.h// GLlabView.h : interface of the CGLlabView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_GLLABVIEW_H__74072631_6B6D_46C2_965E_A0986C104464__INCLUDED_)
#define AFX_GLLABVIEW_H__74072631_6B6D_46C2_965E_A0986C104464__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <gl\gl.h>
#include <gl\glu.h>
#include <gl\glaux.h>
enum {Points, LineStrip, TriangleFan, Quads, Figure3d,PifTree};
enum {TglScissor, TglAlphaFunc, TglBlendFunc};
class CGLlabView : public CView
{
protected: // create from serialization only
CGLlabView();
DECLARE_DYNCREATE(CGLlabView)
// Attributes
public:
CGLlabDoc* GetDocument();
protected:
HGLRC m_hRC;
int m_shape;
int m_test;
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CGLlabView)
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:
virtual ~CGLlabView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
//My functions for display
void DrawWithOpenGL();
void DrawPoints();
void DrawLineStrip();
void DrawTriangleFan();
void DrawQuads();
void EnGlscissor();
void DisGlscissor();
void EnAlphafunc();
void DisAlphafunc();
void EnGlblendfunc();
void DisGlblendfunc();
void Draw3D();
void DrawChel(float angle,int bx,int by,int bz,float dx,float dy,float dz);
void DrawFractal();
// Generated message map functions
protected:
//{{AFX_MSG(CGLlabView)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnDestroy();
afx_msg void OnDrawLinestrip();
afx_msg void OnUpdateDrawLinestrip(CCmdUI* pCmdUI);
afx_msg void OnDrawPoints();
afx_msg void OnUpdateDrawPoints(CCmdUI* pCmdUI);
afx_msg void OnDrawQuadrilaterals();
afx_msg void OnUpdateDrawQuadrilaterals(CCmdUI* pCmdUI);
afx_msg void OnDrawTrianglefan();
afx_msg void OnUpdateDrawTrianglefan(CCmdUI* pCmdUI);
afx_msg void OnTestGlscissor();
afx_msg void OnUpdateTestGlscissor(CCmdUI* pCmdUI);
afx_msg void OnTestGlalphafunc();
afx_msg void OnUpdateTestGlalphafunc(CCmdUI* pCmdUI);
afx_msg void OnTestGlblendfunc();
afx_msg void OnUpdateTestGlblendfunc(CCmdUI* pCmdUI);
afx_msg void OnTestsNull();
afx_msg void OnUpdateTestsNull(CCmdUI* pCmdUI);
afx_msg void OnTestsrelocation();
afx_msg void OnDraw3d3dpicture();
afx_msg void OnUpdateDraw3d3dpicture(CCmdUI* pCmdUI);
afx_msg void OnRelocationRelocation3d();
afx_msg void OnFractalPifagorstree();
afx_msg void OnUpdateFractalPifagorstree(CCmdUI* pCmdUI);
afx_msg void OnRelocationFractalrelocation();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in GLlabView.cpp
inline CGLlabDoc* CGLlabView::GetDocument()
{ return (CGLlabDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_GLLABVIEW_H__74072631_6B6D_46C2_965E_A0986C104464__INCLUDED_)
Соседние файлы в папке Лабораторная работа №42