Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
3DView.h
Package: ebd_src.zip [view]
Upload User: kelijie
Upload Date: 2007-01-01
Package Size: 123k
Code Size: 2k
Category:
Graph program
Development Platform:
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_)