-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjeltzfly.h
40 lines (34 loc) · 1.1 KB
/
jeltzfly.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
/* Copyright 2011 Pyarelal Knowles, under GNU LGPL (see LICENCE.txt) */
#ifndef JELTZ_FLY
#define JELTZ_FLY
#include "jeltz.h"
#include "camera.h"
#include "quaternion.h"
class Shader;
class JeltzFly : public JeltzPlugin
{
private:
virtual void update(float dt);
Quat interpFrom;
Quat interpTo;
Quat interpPos;
float msnapSpeed;
float interpRatio;
bool interpolating;
public:
bool saveOnExit; //switch off to stop auto saving to .camera.txt
vec3f orbit;
float snapSpeed; //speed to snap to orbit (rads per second)
float sensitivity;
float speed;
Camera camera; //the public camera class. usage eg: glLoadMatrixf(jeltzFly.camera.getInverse().m);
Camera* target; //leave NULL to target camera. Otherwise input controls the target instead.
JeltzFly();
virtual ~JeltzFly();
void loadCamera(std::string filename = ".camera.txt");
void saveCamera(std::string filename = ".camera.txt");
void uploadCamera(Shader* shader); //sets "modelviewMat" and "projectionMat"
void uploadCamera(); //sets deprecated GL projection/modelview matrices
void uploadOrtho();
};
#endif