Commit fe19581
authored
Point Cloud Editor: fix select2D after switch to QOpenGLWidget (#5685)
* Point Cloud Editor: fix select2D after switch to QOpenGLWidget
In commit 38cbd62 the CloudEditorWidget was switched from QGLWidget to QOpenGLWidget to be compatible with Qt6.
The select2D tool needs the viewport and the projection matrix, which are loaded with `glGetIntegerv(GL_VIEWPORT,viewport)` and `glGetFloatv(GL_PROJECTION_MATRIX, project)` (they are set in `CloudEditorWidget::resizeGL`). However, since the switch to QOpenGLWidget, the received projection matrix is just the identity matrix, and the viewport does not look correct either. It seems that QOpenGLWidget overwrites them.
These changes introduce variables in CloudEditorWidget to safely store the viewport and projection matrix, and passes a function to the select2D tool to ask for them when needed.
* Add include for windows
* Additional fix for hdpi mac displays1 parent f2b9f23 commit fe19581
4 files changed
Lines changed: 20 additions & 6 deletions
File tree
- apps/point_cloud_editor
- include/pcl/apps/point_cloud_editor
- src
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
319 | 319 | | |
320 | 320 | | |
321 | 321 | | |
| 322 | + | |
| 323 | + | |
322 | 324 | | |
| 325 | + | |
| 326 | + | |
323 | 327 | | |
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| |||
154 | 155 | | |
155 | 156 | | |
156 | 157 | | |
| 158 | + | |
| 159 | + | |
157 | 160 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
50 | 53 | | |
51 | 54 | | |
52 | 55 | | |
| |||
201 | 204 | | |
202 | 205 | | |
203 | 206 | | |
204 | | - | |
| 207 | + | |
205 | 208 | | |
206 | 209 | | |
207 | 210 | | |
| |||
472 | 475 | | |
473 | 476 | | |
474 | 477 | | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
475 | 481 | | |
| 482 | + | |
476 | 483 | | |
477 | 484 | | |
478 | 485 | | |
479 | 486 | | |
| 487 | + | |
480 | 488 | | |
481 | 489 | | |
482 | 490 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | | - | |
| 51 | + | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
92 | 91 | | |
93 | 92 | | |
94 | | - | |
| 93 | + | |
95 | 94 | | |
96 | 95 | | |
97 | 96 | | |
| |||
0 commit comments