-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathKamera.hpp
75 lines (65 loc) · 1.57 KB
/
Kamera.hpp
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#ifndef __H_KAMERA_INCLUDED__
#define __H_KAMERA_INCLUDED__
#include <d3dx9.h>
#include <iostream>
#include "globals.hpp"
namespace skam
{
enum Smer
{
dopredu,
dozadu,
doleva,
doprava,
nahoru,
dolu
};
class Kamera
{
public:
Kamera();
~Kamera();
void upravRotaciKamery(float * aOsy);
void posunKameru(Smer kam);
void posunKameru(Smer kam, float jakMoc); // nasobitel
void nastavRychlost(float rychlost) { fVel = rychlost; }
void nastavCitlivostRotace(int _citl){
nasobitelKoeficientu = _citl;
koeficienRotaceOs[0] = nasobitelKoeficientu*0.0005f;
koeficienRotaceOs[1] = nasobitelKoeficientu*D3DX_PI/11520;
}
void otocKameru(Smer kam);
void otocKameru(Smer kam, float jakMoc);
float& vemRychlost() { return fVel; }
const D3DXVECTOR3& vemSmerHledi(){
obnovSmerHledi();
return (*vZaxis);
}
const D3DXVECTOR3& vemUmisteni(){
return (*vTranslace);
}
D3DXMATRIX g_View;
protected:
private:
D3DXVECTOR3 * Eye, * At, * Up, * vTranslace;
D3DXMATRIX translate;
D3DXMATRIX mRotateVX, mRotateVY, mRotateVZ;
D3DXVECTOR3* vZaxis;
D3DXVECTOR3* vKolmice;
float rotaceKolemOs[3];
float koeficienRotaceOs[3];
int nasobitelKoeficientu;
float CamRotRad;
float RotUp;
float CamRot;
float CamRotVel;
float fVel;
void obnovSmerHledi(){
vZaxis->x = g_View._13;
vZaxis->y = g_View._23;
vZaxis->z = g_View._33; // toto je presne smer, kterym hledim
}
// float fFOV;
};
}
#endif // __H_KAMERA_INCLUDED__