TAPs 0.7.7.3
TAPsHapticManager.hpp
Go to the documentation of this file.
00001 /******************************************************************************
00002 TAPsHapticManager.hpp
00003 
00004 Inherited from class BaseHapticManager
00005 
00006 SUKITTI PUNAK   (07/20/2005)
00007 UPDATE          (07/30/2005)
00008 ******************************************************************************/
00009 #ifndef TAPs_HAPTIC_MANAGER_HPP
00010 #define TAPs_HAPTIC_MANAGER_HPP
00011 
00012 #include "TAPsBaseHapticManager.hpp"
00013 #include <GL/glut.h>
00014 
00015 BEGIN_NAMESPACE_TAPs__Haptic
00016 //=============================================================================
00017 template <typename T>
00018 class HapticManager : public /*virtual*/ BaseHapticManager<T> {
00019 public:
00020     //----------------------------------------------------------------
00021     // Default Constructor and Destructor
00022     HapticManager ();
00023     virtual ~HapticManager ();
00024     //----------------------------------------------------------------
00025     virtual void Setup ( 
00026             TAPs::OpenGL::BasePointManager<T> * pPointManager,
00027             TAPs::OpenGL::OpenGLBaseViewManager<T>  * pViewManager );
00028     virtual void Cleanup ();
00029     //----------------------------------------------------------------
00030     virtual void UpdateWorkSpace ();
00031     virtual void DrawCursor ();
00032     virtual void FeelPoints ();
00033     virtual bool IsManipulating () const;
00034     //----------------------------------------------------------------
00035 protected:
00036     //----------------------------------------------------------------
00037     // Helper Fn(s)
00038     void StartManipulating ( int i );
00039     void StopManipulating ();
00040     void UpdateManipPoint ( const  TAPs::Vector3<T> &proxyPos );
00041     void PushWorkSpaceOffset ( const TAPs::Vector3<T> &offsetWC );
00042     void PopWorkSpaceOffset ();
00043     int GetPointIndexFromTouchID ( HLuint id ) const;
00044     static void HLCALLBACK hlTouchCB ( 
00045         HLenum event, HLuint object, HLenum thread,
00046         HLcache *cache, void *userData );
00047     static void HLCALLBACK hlButtonDownCB ( 
00048         HLenum event, HLuint object, HLenum thread,
00049         HLcache *cache, void *userData );
00050     static void HLCALLBACK hlButtonUpCB ( 
00051         HLenum event, HLuint object, HLenum thread,
00052         HLcache *cache, void *userData );
00053     static void HLCALLBACK hlMotionCB ( 
00054         HLenum event, HLuint object, HLenum thread,
00055         HLcache *cache, void *userData );
00056     //----------------------------------------------------------------
00057     // Data Members
00058     HHD     m_hHD;
00059     HHLRC   m_hHLRC;
00060     int     m_iManipPoint;
00061     HLuint  m_uiPointNameBase;
00062     T       m_tCursorScale;
00063     GLuint  m_uiCursorDisplayList;
00064     HLuint  m_uiEffectName;
00065     TAPs::OpenGL::BasePointManager<T> *         m_pPointManager;
00066     TAPs::OpenGL::OpenGLBaseViewManager<T> *    m_pViewManager;
00067     //----------------------------------------------------------------
00068 }; // CLASS END: HapticManager *************************************************
00069 //=============================================================================
00070 END_NAMESPACE_TAPs__Haptic
00071 //-----------------------------------------------------------------------------
00072 // Include definition if TAPs_USE_EXPORT is not defined
00073 //#if !defined( TAPs_USE_EXPORT )
00074     #include "TAPsHapticManager.cpp"
00075 //#endif
00076 //-----------------------------------------------------------------------------
00077 #endif
00078 //345678901234567890123456789012345678901234567890123456789012345678901234567890
00079 //--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines