43 lines
786 B
C++
43 lines
786 B
C++
#ifndef _HW1_H_
|
|
#define _HW1_H_
|
|
#include "openGL/shader.h"
|
|
#include "openGL/openGLMatrix.h"
|
|
#include <GL/glew.h>
|
|
#include <iostream>
|
|
#include <cstring>
|
|
#include <GL/glut.h>
|
|
|
|
#ifndef OUT
|
|
#define OUT
|
|
#endif
|
|
#ifndef IN
|
|
#define IN
|
|
#endif
|
|
|
|
namespace terran {
|
|
// the mourse button state
|
|
struct mouse_button_state {
|
|
int leftMouseButton; // 1 if pressed, 0 if not
|
|
int middleMouseButton; // 1 if pressed, 0 if not
|
|
int rightMouseButton; // 1 if pressed, 0 if not
|
|
};
|
|
// graph transformation state
|
|
typedef enum {
|
|
ROTATE,
|
|
TRANSLATE,
|
|
SCALE
|
|
} control_state;
|
|
// display mode
|
|
enum class displayMode {
|
|
points, // display by points
|
|
lines, // display by triangles
|
|
triangles, // display by lines
|
|
smoothTriangles, // display by smooth triangles
|
|
imageDisplay
|
|
};
|
|
|
|
|
|
}
|
|
|
|
#endif
|