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
#include <QtOpenGL/QGLWidget>
24
#include <QTime>
25
#include <
navigator_tool.hpp
>
26
#include <
scene.hpp
>
27
28
29
class
glwidget
:
public
QGLWidget
30
{
31
32
Q_OBJECT
33
34
public
:
35
36
glwidget
(QWidget *parent=0);
37
~glwidget
();
38
39
void
set_wireframe
();
40
void
set_filled
();
41
42
scene
current_scene
;
43
44
void
draw_text
(
double
x,
double
y,
double
z,QString text,QFont font);
45
46
protected
:
47
void
initializeGL
();
48
void
paintGL
();
49
void
resizeGL
(
int
width,
int
height);
50
void
mousePressEvent
(QMouseEvent *event);
51
void
mouseReleaseEvent
(QMouseEvent *event);
52
void
mouseMoveEvent
(QMouseEvent *event);
53
void
keyPressEvent
(QKeyEvent *event);
54
void
timerEvent
(QTimerEvent *event);
55
56
57
58
private
:
59
60
cpe::navigator_tool
nav
;
61
62
63
void
print_help_start
()
const
;
64
void
draw_pointer
(
cpe::navigator_tool
&
nav
)
const
;
65
void
draw_orientation
(
cpe::navigator_tool
&
nav
)
const
;
66
void
draw_camera_stat
();
67
68
void
draw_fps
();
69
void
draw_decorating_info
();
70
71
QTime
t_timer
;
72
73
};
74
75
76
#endif
libinterface
glwidget.hpp
Generated on Sun Apr 28 2013 11:11:29 by
1.8.3.1