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
c9501685
Commit
c9501685
authored
Jan 25, 2013
by
Luis Peñaranda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change fov_max with shift+wheel
parent
e82cc65b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
4 deletions
+27
-4
openglcanvas.cpp
openglcanvas.cpp
+7
-2
openglcanvas.h
openglcanvas.h
+1
-0
panowindow1.ui
panowindow1.ui
+19
-2
No files found.
openglcanvas.cpp
View file @
c9501685
...
...
@@ -101,6 +101,7 @@ void OpenGLCanvas::change_fov_max(int new_fov_max){
scale
=
log
(
exp
(
1.
f
)
+
(
1.
f
-
exp
(
1.
f
))
*
(
fov
-
fov_max
)
/
(
360.
-
2
*
fov_max
));
}
fprintf
(
stderr
,
"change fov_max=%f, new scale=%f
\n
"
,
fov_max
,
scale
);
emit
max_fov_changed
((
int
)
fov_max
);
updateGL
();
}
...
...
@@ -674,7 +675,11 @@ void OpenGLCanvas::mouseMoveEvent(QMouseEvent *event){
void
OpenGLCanvas
::
wheelEvent
(
QWheelEvent
*
event
){
if
(
event
->
orientation
()
==
Qt
::
Vertical
){
change_fov
(
fov
+
((
double
)
event
->
delta
())
/
60
);
if
(
event
->
modifiers
()
==
Qt
::
ControlModifier
){
change_fov_max
(
fov_max
+
((
double
)
event
->
delta
())
/
30
);
}
else
{
change_fov
(
fov
+
((
double
)
event
->
delta
())
/
30
);
}
}
}
...
...
@@ -725,7 +730,7 @@ void OpenGLCanvas::paintGL(){
time_fps
=
time_frames
/
dt
;
time_frames
=
0
;
time_time
.
reset
();
emit
fps
(
QString
(
"%1 fps"
).
arg
((
int
)(
time_fps
+
0.5
)));
//
emit fps(QString("%1 fps").arg((int)(time_fps+0.5)));
printf
(
"fps = %d "
,
(
int
)(
time_fps
+
0.5
));
// }
// }
...
...
openglcanvas.h
View file @
c9501685
...
...
@@ -62,6 +62,7 @@ protected:
signals:
void
fps
(
QString
newFPS
);
void
fov_changed
(
int
new_fov
);
void
max_fov_changed
(
int
new_max_fov
);
public
slots
:
void
change_fov
(
double
f
);
...
...
panowindow1.ui
View file @
c9501685
...
...
@@ -157,10 +157,10 @@
<item
row=
"10"
column=
"1"
alignment=
"Qt::AlignHCenter"
>
<widget
class=
"QSlider"
name=
"changefovmax"
>
<property
name=
"minimum"
>
<number>
1
0
</number>
<number>
1
</number>
</property>
<property
name=
"maximum"
>
<number>
180
</number>
<number>
359
</number>
</property>
<property
name=
"sliderPosition"
>
<number>
60
</number>
...
...
@@ -187,6 +187,7 @@
<container>
1
</container>
<slots>
<signal>
fov_changed(int)
</signal>
<signal>
max_fov_changed(int)
</signal>
<slot>
change_fov(double)
</slot>
<slot>
change_scale(double)
</slot>
<slot>
change_center_lambda(double)
</slot>
...
...
@@ -330,5 +331,21 @@
</hint>
</hints>
</connection>
<connection>
<sender>
GLCanvas
</sender>
<signal>
max_fov_changed(int)
</signal>
<receiver>
changefovmax
</receiver>
<slot>
setValue(int)
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
250
</x>
<y>
249
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
532
</x>
<y>
262
</y>
</hint>
</hints>
</connection>
</connections>
</ui>
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