www.pudn.com > oglplane.zip > oglplane.h
//***********************************************************************
//
// OGLPlane.h
//
//***********************************************************************
#define BLUELINE_SUPPORT
#define LEFT_EYE_PROJECTION -1
#define RIGHT_EYE_PROJECTION 1
#define STEREO_MAGNITUDE_CONSTANT 0.07
#define ROTATION_SPEED 0.60f
class CMyApp : public CWinApp
{
public:
virtual BOOL InitInstance ();
};
#ifdef BLUELINE_SUPPORT
#define BLUEWINHEIGHT 2
class CBluelineWindow : public CFrameWnd
{
public:
CBluelineWindow();
~CBluelineWindow();
virtual BOOL PreCreateWindow (CREATESTRUCT& cs); // override
protected:
CSize sizeScreen;
afx_msg void OnPaint ();
DECLARE_MESSAGE_MAP ()
};
#endif // BLUELINE_SUPPORT
class CMainWindow : public CFrameWnd
{
private:
void DrawAirplane (void);
void StereoProjection (double dfLeftBorder, double dfRightBorder,
double dfBottomBorder, double dfTopBorder, double dfNearBorder,
double dfFarBorder, double dfTargetPlane,
double dfCameraToTargetDistance, double dfStereoMagnitudeAdj,
double dfParallaxBalanceAdj, int WhichEyeProjection);
public:
CMainWindow ();
~CMainWindow ();
BOOL EnableStereoWindow (void);
protected:
#ifdef BLUELINE_SUPPORT
CBluelineWindow * pWndBlueline;
#endif
HDC hdc;
HGLRC hGLRC;
double dfStereoMagnitudeAdjustment;
double dfParallaxBalanceAdjustment;
float fRotationSpeed;
BOOL bRotationOn;
BOOL bStereoOn;
float fRotAngle;
afx_msg void OnPaint ();
afx_msg void OnTimer (UINT nIDEvent);
afx_msg void OnSize( UINT nType, int cx, int cy );
afx_msg void OnSlower ();
afx_msg void OnSlowerUpdate (CCmdUI* pCmdUI);
afx_msg void OnFaster ();
afx_msg void OnFasterUpdate (CCmdUI* pCmdUI);
afx_msg void OnFileRotation ();
afx_msg void OnFileRotationUpdate (CCmdUI* pCmdUI);
afx_msg void OnStereoOn ();
afx_msg void OnStereoOnUpdate (CCmdUI* pCmdUI);
afx_msg void OnDecreaseStereo ();
afx_msg void OnDecreaseStereoUpdate (CCmdUI* pCmdUI);
afx_msg void OnIncreaseStereo ();
afx_msg void OnIncreaseStereoUpdate (CCmdUI* pCmdUI);
afx_msg void OnNegParallax ();
afx_msg void OnNegParallaxUpdate (CCmdUI* pCmdUI);
afx_msg void OnPosParallax ();
afx_msg void OnPosParallaxUpdate (CCmdUI* pCmdUI);
afx_msg void OnRestoreDefaults ();
afx_msg void OnRestoreDefaultsUpdate (CCmdUI* pCmdUI);
afx_msg void OnFileExit ();
#ifdef BLUELINE_SUPPORT
afx_msg void OnBlueline();
afx_msg void OnUpdateBlueline (CCmdUI* pCmdUI);
afx_msg void OnActivateApp(BOOL bActive, HTASK hTask);
#endif
DECLARE_MESSAGE_MAP ()
};