00001 
00002 
00003 
00004 
00005 #if !defined(AFX_DynaHapticVIEW_H__2DC375FA_13A6_4A8D_ABC1_344D836C16E0__INCLUDED_)
00006 #define AFX_DynaHapticVIEW_H__2DC375FA_13A6_4A8D_ABC1_344D836C16E0__INCLUDED_
00007 
00008 #if _MSC_VER > 1000
00009 #pragma once
00010 #endif // _MSC_VER > 1000
00011 
00012 #include <FrameWork/FWAppD3D.h>
00013 #include <FrameWork/FWPointer.h>
00014 #include <Graphics/GRRender.h>
00015 #include <Graphics/GRCamera.h>
00016 #include <WinBasis/WBMMTimer.h>
00017 #include "HisConfig.h"
00018 
00019 
00020 class CDynaHapticView : public CView {
00021 protected: 
00022     CDynaHapticView();
00023     DECLARE_DYNCREATE(CDynaHapticView)
00024 
00025 public:
00026     CHisConfig dlConfig;
00027     Spr::UTRef<Spr::FWAppD3D> app;
00028     int drawTimerId;
00029 
00030     CDynaHapticDoc* GetDocument();
00031 
00032 
00033 public:
00034     void InitHis(std::string hisList, float ps, float fs);
00035     void ReadRegistry();
00036     void WriteRegistry();
00037 
00038 
00039     
00040     
00041     public:
00042     virtual void OnDraw(CDC* pDC);  
00043     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00044     virtual void OnInitialUpdate();
00045     virtual BOOL PreTranslateMessage(MSG* pMsg);
00046     
00047 
00048 
00049 public:
00050     virtual ~CDynaHapticView();
00051 #ifdef _DEBUG
00052     virtual void AssertValid() const;
00053     virtual void Dump(CDumpContext& dc) const;
00054 #endif
00055 
00056 protected:
00057 
00058 
00059 protected:
00060     void ThrowSphere(float r);
00061     
00062     afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
00063     afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00064     afx_msg void OnTimer(UINT nIDEvent);
00065     afx_msg void OnDestroy();
00066     afx_msg void OnD3d();
00067     afx_msg void OnGL();
00068     afx_msg void OnHisConfig();
00069     
00070     DECLARE_MESSAGE_MAP()
00071 public:
00072     afx_msg void OnSize(UINT nType, int cx, int cy);
00073 };
00074 
00075 #ifndef _DEBUG  
00076 inline CDynaHapticDoc* CDynaHapticView::GetDocument()
00077    { return (CDynaHapticDoc*)m_pDocument; }
00078 #endif
00079 
00080 
00081 
00082 
00083 
00084 
00085 #endif