diff options
author | Mike Erwin <significant.bit@gmail.com> | 2010-07-22 11:23:41 +0400 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2010-07-22 11:23:41 +0400 |
commit | 6c2dee0198fed174a55f65685d4e01752c987547 (patch) | |
tree | 32bce83f10e0b0004e3ff8e4cda88d09a9cd7f39 /intern/ghost/intern/GHOST_EventNDOF.h | |
parent | f0167c6a4117df275f85ce466c2067e0eda0e0e8 (diff) |
revamped NDOF event system for ghost, added (untested) Mac support
Diffstat (limited to 'intern/ghost/intern/GHOST_EventNDOF.h')
-rw-r--r-- | intern/ghost/intern/GHOST_EventNDOF.h | 45 |
1 files changed, 24 insertions, 21 deletions
diff --git a/intern/ghost/intern/GHOST_EventNDOF.h b/intern/ghost/intern/GHOST_EventNDOF.h index 916fd7bbc08..c5d35126f01 100644 --- a/intern/ghost/intern/GHOST_EventNDOF.h +++ b/intern/ghost/intern/GHOST_EventNDOF.h @@ -26,32 +26,35 @@ #include "GHOST_Event.h" -/** - * N-degree of freedom device event. - */ -class GHOST_EventNDOF : public GHOST_Event + +class GHOST_EventNDOFMotion : public GHOST_Event { +protected: + GHOST_TEventNDOFData m_axisData; + public: - /** - * Constructor. - * @param msec The time this event was generated. - * @param type The type of this event. - * @param x The x-coordinate of the location the cursor was at at the time of the event. - * @param y The y-coordinate of the location the cursor was at at the time of the event. - */ - GHOST_EventNDOF(GHOST_TUns64 msec, GHOST_TEventType type, GHOST_IWindow* window, - GHOST_TEventNDOFData data) - : GHOST_Event(msec, type, window) - { - m_ndofEventData = data; - m_data = &m_ndofEventData; - } + GHOST_EventNDOFMotion(GHOST_TUns64 time) + : GHOST_Event(time, GHOST_kEventNDOFMotion, NULL) +// , m_data(&m_axisData) + { + m_data = &m_axisData; + } +}; +class GHOST_EventNDOFButton : public GHOST_Event +{ protected: - /** translation & rotation from the device. */ - GHOST_TEventNDOFData m_ndofEventData; + GHOST_TUns16 m_buttonNumber; + +public: + GHOST_EventNDOFButton(GHOST_TUns64 time, GHOST_TUns16 buttonNumber, GHOST_TEventType upOrDown) + : GHOST_Event(time, upOrDown, NULL) + , m_buttonNumber(buttonNumber) +// , m_data(&m_buttonNumber) + { + m_data = &m_buttonNumber; + } }; #endif // _GHOST_EVENT_NDOF_H_ - |