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
MeshView.h
Package: display_list.zip [view]
Upload User: hcfgz168
Upload Date: 2011-09-11
Package Size: 116k
Code Size: 3k
Category:
OpenGL program
Development Platform:
WINDOWS
- // 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_)