forked from t-thanh/PTAMM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathModelsGame.h
65 lines (51 loc) · 1.52 KB
/
ModelsGame.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// Copyright 2009 Isis Innovation Limited
//
// C++ Interface: ModelsGame
//
// Description: An AR game for placing 3ds models in a map
//
//
// Author: Robert Castle <[email protected]>, (C) 2009
//
//
#ifndef MODELSGAME_H
#define MODELSGAME_H
#include "Game.h"
#include "Model3ds.h"
#include "ModelBrowser.h"
#include "ModelControls.h"
#include "ModelsGameData.h"
#include <cvd/image.h>
namespace PTAMM {
/**
* AR game for displaying 3DS models in a map
*
* @author Robert Castle <[email protected]>
*/
class ModelsGame : public Game
{
public:
ModelsGame();
~ModelsGame();
void Draw3D( const GLWindow2 &glWindow, Map &map, SE3<> se3CfromW);
void Draw2D( const GLWindow2 &glWindow, Map &map);
void Reset();
void Init();
void HandleClick(Vector<2> v2VidCoords, Vector<2> v2UFB, Vector<3> v3RayDirnW, Vector<2> v2Plane, int nButton);
std::string Save(std::string sMapPath);
void Load(std::string sDataPath);
private:
Vector<3> _SelectClosestMapPoint(Vector<3> v3RayDirnW);
bool _HandleModelBrowserActions( Vector<2> v2VidCoords );
void _DrawSelectedTarget();
void _DrawAxes();
private:
Map * mpMap; // The associated map
SE3<> mse3CfW; // The current camera position
ModelsGameData mData; // The game data
ModelBrowser mModelBrowser; // The model browser
ModelControls mModelControls; // The model controls
GLuint mnTargetTex; // The current model target texture
};
}
#endif