- Visual C++源码
- Visual Basic源码
- C++ Builder源码
- Java源码
- Delphi源码
- C/C++源码
- PHP源码
- Perl源码
- Python源码
- Asm源码
- Pascal源码
- Borland C++源码
- Others源码
- SQL源码
- VBScript源码
- JavaScript源码
- ASP/ASPX源码
- C#源码
- Flash/ActionScript源码
- matlab源码
- PowerBuilder源码
- LabView源码
- Flex源码
- MathCAD源码
- VBA源码
- IDL源码
- Lisp/Scheme源码
- VHDL源码
- Objective-C源码
- Fortran源码
- tcl/tk源码
- QT源码
3DView.h
资源名称:ebd_src.zip [点击查看]
上传用户:kelijie
上传日期:2007-01-01
资源大小:123k
文件大小:2k
源码类别:
图形图象
开发平台:
Visual C++
- #if !defined(AFX_3DVIEW_H__73B8DC8D_F1E7_11D2_955D_8422F5C00000__INCLUDED_)
- #define AFX_3DVIEW_H__73B8DC8D_F1E7_11D2_955D_8422F5C00000__INCLUDED_
- #if _MSC_VER >= 1000
- #pragma once
- #endif // _MSC_VER >= 1000
- // 3DView.h : header file
- //
- /////////////////////////////////////////////////////////////////////////////
- // C3DView view
- #include "standard.h"
- #include <glgl.h>
- #include <glglu.h>
- #include <glglaux.h>
- #define PI (float)3.1415926
- typedef struct
- {
- BYTE m_vColor[4];
- }dVertex;
- typedef struct
- {
- float m_vNormal[3];
- float m_vPoint[3];
- }dCoord;
- #define ROW 40
- #define COL 40
- class _declspec(dllexport) C3DView : public CStandardView
- {
- public:
- C3DView(); // protected constructor used by dynamic creation
- DECLARE_DYNCREATE(C3DView)
- // Attributes
- public:
- dVertex m_Vertex[ROW*COL];
- dCoord m_Point[(ROW+1)*(COL+1)];
- float m_a, m_b, m_c;
- float m_x, m_y, m_z;
- float m_xa, m_ya, m_za;
- BYTE m_Color1[4];
- BYTE m_Color2[4];
- HPALETTE m_hPalette;
- HGLRC m_hRC;
- HDC m_hDC; // Device Context
- int m_iCounter;
- int m_iTimer;
- BOOL m_bTimer;
- BOOL m_bActive;
- BOOL m_iInit;
- // Operations
- public:
- void SetupLogicalPalette(void);
- void SetupEnv(void);
- void Build3Ddata(void);
- void Draw3DObject(void);
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(C3DView)
- public:
- virtual void OnDraw(CDC* pDC); // overridden to draw this view
- virtual BOOL DestroyWindow();
- protected:
- virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
- //}}AFX_VIRTUAL
- // Implementation
- public:
- virtual ~C3DView();
- #ifdef _DEBUG
- virtual void AssertValid() const;
- virtual void Dump(CDumpContext& dc) const;
- #endif
- // Generated message map functions
- public:
- //{{AFX_MSG(C3DView)
- afx_msg void On3dexit();
- afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
- afx_msg void OnTimer(UINT nIDEvent);
- afx_msg void OnSize(UINT nType, int cx, int cy);
- afx_msg void OnSetFocus(CWnd* pOldWnd);
- afx_msg void OnKillFocus(CWnd* pNewWnd);
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- };
- /////////////////////////////////////////////////////////////////////////////
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
- #endif // !defined(AFX_3DVIEW_H__73B8DC8D_F1E7_11D2_955D_8422F5C00000__INCLUDED_)