// SceneView.h : interface of the CSceneView class // ///////////////////////////////////////////////////////////////////////////// #if !defined(AFX_SceneView_H__4482F5D3_674F_4903_9DC8_9871ED3D0297__INCLUDED_) #define AFX_SceneView_H__4482F5D3_674F_4903_9DC8_9871ED3D0297__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include "stdafx.h" #include "SceneControl.h" #include "SceneDoc.h" #include "Line.h" // Added by ClassView ///////////////////////////////////////////////////////////////////////////// // CSceneView window class CSceneView : public CView { protected: CSceneView(); DECLARE_DYNCREATE(CSceneView) CSceneDoc* GetDocument() { return (CSceneDoc*)m_pDocument; } HGLRC m_hrc ; //OpenGL Rendering Context CPalette* m_pPal ; //Palette // Operations public: HACCEL hAccel; CSceneControl m_Control; void PrepareScene() ; void DrawScene() ; void OutputGlError(char* label) ; // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CGLEasyView) public: virtual void OnDraw(CDC* pDC); // overridden to draw this view virtual void OnInitialUpdate(); protected: virtual BOOL PreCreateWindow(CREATESTRUCT& cs); //}}AFX_VIRTUAL // Implementation public: CFont font; Plane *pPlane; Curve *pCurve; Surface *pSurface; BOOL CreateRGBPalette(HDC hDC); unsigned char ComponentFromIndex(int i, UINT nbits, UINT shift) ; static unsigned char m_oneto8[2]; static unsigned char m_twoto8[4]; static unsigned char m_threeto8[8]; static int m_defaultOverride[13]; static PALETTEENTRY m_defaultPalEntry[20]; enum enum_OBJECTS {Figure=1} ; enum_OBJECTS m_RotatingObject ; Scene attr; CPoint Mouse; CStatusBar* pStatus; int Thickness; int Leftmost, Rightmost, Top, Bottom; CSceneControl *pControl; void SetDefaults(); void ReadInput(); void UpdateControl(); virtual ~CSceneView(); // Generated message map functions protected: int firstRun; //{{AFX_MSG(CSceneView) afx_msg void OnAccelR(); afx_msg void OnAccelL(); afx_msg void OnAccelDown(); afx_msg void OnAccelUp(); afx_msg void OnAccelScaleDown(); afx_msg void OnAccelScaleUp(); afx_msg void OnAccelRotateOYCw(); afx_msg void OnAccelRotateOYAcw(); afx_msg void OnAccelRotateOXCw(); afx_msg void OnAccelRotateOXAcw(); afx_msg void OnAccelRotateOzACW(); afx_msg void OnAccelRotateOzCW(); afx_msg void OnUpdate(); afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); afx_msg void OnFit(); afx_msg void OnCenter(); afx_msg void OnSize(UINT nType, int cx, int cy); afx_msg BOOL OnEraseBkgnd(CDC* pDC); afx_msg void OnRestart(); afx_msg void OnAccelPerspectiveUp(); afx_msg void OnAccelPerspectiveDown(); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; ///////////////////////////////////////////////////////////////////////////// //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_SceneView_H__4482F5D3_674F_4903_9DC8_9871ED3D0297__INCLUDED_)