Main Page
Namespaces
Classes
Files
File List
File Members
glwidget.hpp
Go to the documentation of this file.
1
/*
2
** TP CPE Lyon
3
** Copyright (C) 2013 Damien Rohmer
4
**
5
** This program is free software: you can redistribute it and/or modify
6
** it under the terms of the GNU General Public License as published by
7
** the Free Software Foundation, either version 3 of the License, or
8
** (at your option) any later version.
9
**
10
** This program is distributed in the hope that it will be useful,
11
** but WITHOUT ANY WARRANTY; without even the implied warranty of
12
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
** GNU General Public License for more details.
14
**
15
** You should have received a copy of the GNU General Public License
16
** along with this program. If not, see <http://www.gnu.org/licenses/>.
17
*/
18
19
#ifndef GLWIDGET_HPP_
20
#define GLWIDGET_HPP_
21
22
23
24
25
#include <QtOpenGL/QGLWidget>
26
#include <QTime>
27
#include <
navigator_tool.hpp
>
28
#include <
scene.hpp
>
29
30
31
class
glwidget
:
public
QGLWidget
32
{
33
34
Q_OBJECT
35
36
public
:
37
38
glwidget
(QWidget *parent=0);
39
~glwidget
();
40
41
42
void
set_wireframe
();
43
void
set_filled
();
44
45
46
scene
current_scene
;
47
48
void
draw_text
(
double
x,
double
y,
double
z,QString text,QFont font);
49
50
protected
:
51
void
initializeGL
();
52
void
paintGL
();
53
void
resizeGL
(
int
width,
int
height);
54
void
mousePressEvent
(QMouseEvent *event);
55
void
mouseReleaseEvent
(QMouseEvent *event);
56
void
mouseMoveEvent
(QMouseEvent *event);
57
void
keyPressEvent
(QKeyEvent *event);
58
void
timerEvent
(QTimerEvent *event);
59
60
61
62
private
:
63
64
cpe::navigator_tool
nav
;
65
66
67
void
print_help_start
()
const
;
68
void
draw_pointer
(
cpe::navigator_tool
&
nav
)
const
;
69
void
draw_orientation
(
cpe::navigator_tool
&
nav
)
const
;
70
void
draw_camera_stat
();
71
72
void
draw_fps
();
73
void
draw_decorating_info
();
74
75
QTime
t_timer
;
76
77
};
78
79
80
#endif
libinterface
glwidget.hpp
Generated on Sun Apr 28 2013 11:28:19 by
1.8.3.1