Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
921870e4
Commit
921870e4
authored
Feb 16, 2012
by
hengli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug in bird's eye view in 3D view.
parent
001ccd39
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
12 deletions
+21
-12
GCManipulator.cc
src/ui/map3D/GCManipulator.cc
+1
-1
Pixhawk3DWidget.cc
src/ui/map3D/Pixhawk3DWidget.cc
+8
-10
Pixhawk3DWidget.h
src/ui/map3D/Pixhawk3DWidget.h
+1
-1
Q3DWidget.cc
src/ui/map3D/Q3DWidget.cc
+6
-0
Q3DWidget.h
src/ui/map3D/Q3DWidget.h
+5
-0
No files found.
src/ui/map3D/GCManipulator.cc
View file @
921870e4
...
...
@@ -25,7 +25,7 @@ This file is part of the QGROUNDCONTROL project
* @file
* @brief Definition of the class GCManipulator.
*
* @author Lionel Heng <hengli@
student
.ethz.ch>
* @author Lionel Heng <hengli@
inf
.ethz.ch>
*
*/
...
...
src/ui/map3D/Pixhawk3DWidget.cc
View file @
921870e4
...
...
@@ -292,14 +292,12 @@ Pixhawk3DWidget::modelChanged(int systemId, int index)
}
void
Pixhawk3DWidget
::
setBirdView
(
void
)
Pixhawk3DWidget
::
setBird
Eye
View
(
void
)
{
mViewParamWidget
->
setFollowCameraId
(
-
1
);
mCameraPos
=
QVector3D
(
0.0
,
0.0
,
-
100.0
);
m3DWidget
->
rotateCamera
(
0.0
,
0.0
,
0.0
);
m3DWidget
->
recenterCamera
(
mCameraPos
.
y
(),
mCameraPos
.
x
(),
-
mCameraPos
.
z
()
);
m3DWidget
->
setCameraDistance
(
100.0
);
}
void
...
...
@@ -692,7 +690,7 @@ Pixhawk3DWidget::update(void)
mCameraPos
=
QVector3D
(
x
,
y
,
z
);
setBirdView
();
setBird
Eye
View
();
mInitCameraPos
=
true
;
}
}
...
...
@@ -828,12 +826,12 @@ Pixhawk3DWidget::buildLayout(void)
QPushButton
*
recenterButton
=
new
QPushButton
(
this
);
recenterButton
->
setText
(
"Recenter Camera"
);
QPushButton
*
birdViewButton
=
new
QPushButton
(
this
);
birdViewButton
->
setText
(
"Bird's Eye View"
);
QPushButton
*
bird
Eye
ViewButton
=
new
QPushButton
(
this
);
bird
Eye
ViewButton
->
setText
(
"Bird's Eye View"
);
QHBoxLayout
*
layoutBottom
=
new
QHBoxLayout
;
layoutBottom
->
addWidget
(
recenterButton
);
layoutBottom
->
addWidget
(
birdViewButton
);
layoutBottom
->
addWidget
(
bird
Eye
ViewButton
);
layoutBottom
->
addItem
(
new
QSpacerItem
(
10
,
0
,
QSizePolicy
::
Expanding
,
QSizePolicy
::
Expanding
));
QGridLayout
*
layout
=
new
QGridLayout
(
this
);
...
...
@@ -850,8 +848,8 @@ Pixhawk3DWidget::buildLayout(void)
this
,
SLOT
(
showViewParamWindow
()));
connect
(
recenterButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
recenterActiveCamera
()));
connect
(
birdViewButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
setBirdView
()));
connect
(
bird
Eye
ViewButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
setBird
Eye
View
()));
}
void
...
...
src/ui/map3D/Pixhawk3DWidget.h
View file @
921870e4
...
...
@@ -67,7 +67,7 @@ private slots:
void
followCameraChanged
(
int
systemId
);
void
recenterActiveCamera
(
void
);
void
modelChanged
(
int
systemId
,
int
index
);
void
setBirdView
(
void
);
void
setBird
Eye
View
(
void
);
void
selectTargetHeading
(
void
);
void
selectTarget
(
void
);
...
...
src/ui/map3D/Q3DWidget.cc
View file @
921870e4
...
...
@@ -133,6 +133,12 @@ Q3DWidget::rotateCamera(double roll, double pitch, double yaw)
mCameraManipulator
->
setRotation
(
q
);
}
void
Q3DWidget
::
setCameraDistance
(
double
distance
)
{
mCameraManipulator
->
setDistance
(
distance
);
}
void
Q3DWidget
::
setDisplayMode3D
(
void
)
{
...
...
src/ui/map3D/Q3DWidget.h
View file @
921870e4
...
...
@@ -103,6 +103,11 @@ public:
*/
void
rotateCamera
(
double
roll
,
double
pitch
,
double
yaw
);
/**
* @brief Sets the camera distance.
*/
void
setCameraDistance
(
double
distance
);
/**
* @brief Sets up 3D display mode.
*/
...
...
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