-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcamera.h
49 lines (43 loc) · 910 Bytes
/
camera.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef CAMERA_H
#define CAMERA_H
#include "types.h"
#ifdef WIN32
#include <windows.h>
#include <gl/gl.h>
#include <gl/glu.h>
#else
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#include <GLUT/glut.h>
#endif
struct Clipper{
float nearp;
float farp;
float top;
float bottom;
float left;
float right;
};
// Rotation Indexes
#define ROTATE_PITCH (0)
#define ROTATE_YAW (1)
#define ROTATE_ROLL (2)
class Camera{
public:
Camera();
Camera(Point3d);
void SetLocation(Point3d);
Point3d GetLocation() const;
void Move(float,float,float);
void GetOrientation();
void Display();
bool isInsideFrustrum(Point3d);
public:
Point3d position;
int fov;
Clipper clip;
// GLfloat gCameraPosition[] = { 0.f, 0.f, -555.f };
GLfloat gCameraRotation[3];
//Rot3d rotation;
};
#endif