first commit

This commit is contained in:
Jose Caban
2025-06-07 01:59:34 -04:00
commit 388ac241f0
3558 changed files with 9116289 additions and 0 deletions

43
CS4451/proj5/Input.h Normal file
View 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