first commit
This commit is contained in:
43
CS4451/proj5/Input.h
Normal file
43
CS4451/proj5/Input.h
Normal file
@@ -0,0 +1,43 @@
|
||||
#ifndef _INPUT_H_
|
||||
#define _INPUT_H_
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
#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
|
||||
Reference in New Issue
Block a user