#ifndef _INPUT_H_ #define _INPUT_H_ #include #include #include "structs.h" class Input { public: static inline Input* getInstance() { return & m_instance; } GLvoid keyboard_event(GLubyte key, GLint x, GLint y); GLvoid menu( int value ); GLvoid passive_motion(GLint mx, GLint my); GLvoid button_motion(GLint mx, GLint my); GLvoid mouse_button(GLint btn, GLint state, GLint mx, GLint my); enum { ZOOM_IN_EVENT, ZOOM_OUT_EVENT, ANIMATE_EVENT, LINES_EVENT, FULL_EVENT }; private: inline Input() {;} static Input m_instance; Point oldPoint; void calcAngle(GLfloat *newMatrix, GLfloat angle, Point& a); void scalePoint(Point& p, GLint mx, GLint my); }; #endif