![]() |
TAPs 0.7.7.3
|
00001 /****************************************************************************** 00002 TAPsBaseOpenGLManager.hpp 00003 00004 Declares the pure virtual interface for OpenGL Manager 00005 00006 SUKITTI PUNAK (05/07/2006) 00007 UPDATE (05/07/2006) 00008 ******************************************************************************/ 00009 #ifndef TAPs_BASE_OPENGL_MANAGER_HPP 00010 #define TAPs_BASE_OPENGL_MANAGER_HPP 00011 00012 //* 00013 //============================================================================= 00014 // Local (Source) Headers 00015 //----------------------------------------------------------------------------- 00016 #include "../TAPsWXOpenGLCanvas.hpp" 00017 #include "View/TAPsBaseOpenGLViewManager.hpp" 00018 #include "Model/TAPsBaseOpenGLModelManager.hpp" 00019 //#define TAPs_USE_HAPTIC 00020 #ifdef TAPs_USE_HAPTIC 00021 #include "Haptic/TAPsBaseOpenGLHapticManager.hpp" 00022 #endif 00023 //----------------------------------------------------------------------------- 00024 //============================================================================= 00025 //*/ 00026 00027 //============================================================================= 00028 // Class Forward 00029 //class wxGLCanvas; 00030 00031 BEGIN_NAMESPACE_TAPs__OpenGL 00032 //============================================================================= 00033 template <typename T> 00034 class BaseOpenGLManager { 00035 public: 00036 //--------------------------------------------------------------- 00037 // Default Constructor and Destructor 00038 BaseOpenGLManager () : 00039 m_pOpenGLViewManager( NULL ), 00040 m_pOpenGLModelManager( NULL ) 00041 { 00042 #ifdef TAPs_USE_HAPTIC 00043 m_pOpenGLHapticManager = NULL; 00044 #endif 00045 } 00046 virtual ~BaseOpenGLManager () {} 00047 //--------------------------------------------------------------- 00048 // Pure Virtual Fns 00049 //virtual void Setup ( ::wxGLCanvas * pGLCanvas ) = 0; 00050 virtual void Cleanup () = 0; 00051 virtual void InitGL () = 0; 00052 //--------------------------------------------------------------- 00053 inline BaseOpenGLViewManager<T> * const RetViewManager () 00054 { return m_pOpenGLViewManager; } 00055 inline BaseOpenGLModelManager<T> * const RetModelManager () 00056 { return m_pOpenGLModelManager; } 00057 #ifdef TAPs_USE_HAPTIC 00058 inline BaseOpenGLHapticManager<T> * const RetHapticManger () 00059 { return m_pOpenGLHapticManager; } 00060 #endif 00061 //--------------------------------------------------------------- 00062 protected: 00063 //=============================================================== 00064 // Data Members 00065 //--------------------------------------------------------------- 00066 // OpenGL View, Model, and Haptic Managers 00067 BaseOpenGLViewManager<T> * m_pOpenGLViewManager; 00068 BaseOpenGLModelManager<T> * m_pOpenGLModelManager; 00069 #ifdef TAPs_USE_HAPTIC 00070 BaseOpenGLHapticManager<T> * m_pOpenGLHapticManager; 00071 #endif 00072 //--------------------------------------------------------------- 00073 }; // CLASS END: BaseOpenGLManager ********************************************* 00074 //============================================================================= 00075 END_NAMESPACE_TAPs__OpenGL 00076 //----------------------------------------------------------------------------- 00077 // Include definition if TAPs_USE_EXPORT is not defined 00078 //#if !defined( TAPs_USE_EXPORT ) 00079 //#include "TAPsBaseOpenGLManager.cpp" 00080 //#endif 00081 //----------------------------------------------------------------------------- 00082 #endif 00083 //345678901234567890123456789012345678901234567890123456789012345678901234567890 00084 //--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8