Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
P
panoramic
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Luis Penaranda
panoramic
Commits
11d64459
Commit
11d64459
authored
Jan 23, 2013
by
Luis Peñaranda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use mouse wheel to change fov
parent
b9a7cf0f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
openglcanvas.cpp
openglcanvas.cpp
+7
-0
openglcanvas.h
openglcanvas.h
+1
-0
No files found.
openglcanvas.cpp
View file @
11d64459
...
...
@@ -608,6 +608,13 @@ void OpenGLCanvas::mouseMoveEvent(QMouseEvent *event){
}
}
void
OpenGLCanvas
::
wheelEvent
(
QWheelEvent
*
event
){
if
(
event
->
orientation
()
==
Qt
::
Vertical
){
fov
+=
((
double
)
event
->
delta
())
/
60
;
updateGL
();
}
}
void
OpenGLCanvas
::
paintGL
(){
float
fov_rads
=
(
fov
/
180.
f
)
*
1.5708
f
;
...
...
openglcanvas.h
View file @
11d64459
...
...
@@ -57,6 +57,7 @@ protected:
void
setShaders
();
void
mousePressEvent
(
QMouseEvent
*
event
);
void
mouseMoveEvent
(
QMouseEvent
*
event
);
void
wheelEvent
(
QWheelEvent
*
event
);
signals:
void
fps
(
QString
newFPS
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment