Skip to content

Commit e907498

Browse files
committed
[QtAV][Observations] add 2D viewer information for visualization of observations
- visualizing landmarks observations in 3D is now influenced by the 2D viewer
1 parent e0c966e commit e907498

File tree

5 files changed

+19
-0
lines changed

5 files changed

+19
-0
lines changed

meshroom/ui/qml/Viewer/Viewer2D.qml

+3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ FocusScope {
2828
property bool enable8bitViewer: enable8bitViewerAction.checked
2929
property bool enableSequencePlayer: enableSequencePlayerAction.checked
3030

31+
readonly property alias imgContainer: imgContainer
32+
readonly property alias imgLayout: imgLayout
33+
3134
QtObject {
3235
id: m
3336
property variant viewpointMetadata: {

meshroom/ui/qml/Viewer3D/MediaLibrary.qml

+3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ Entity {
2121
property Layer frontLayerComponent
2222
property var window
2323

24+
property var viewer2DInfo: null
25+
2426
/// Camera to consider for positioning
2527
property Camera camera: null
2628

@@ -225,6 +227,7 @@ Entity {
225227
camera: root.camera
226228
renderMode: root.renderMode
227229
enabled: visible
230+
viewer2DInfo: root.viewer2DInfo
228231

229232
// QObject.destroyed signal is not accessible
230233
// Use the object as NodeInstantiator model to be notified of its deletion

meshroom/ui/qml/Viewer3D/MediaLoader.qml

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ import Utils 1.0
2020
property var object: null
2121
property int renderMode
2222

23+
property var viewer2DInfo: null
24+
2325
/// Scene's current camera
2426
property Camera camera: null
2527

@@ -91,6 +93,7 @@ import Utils 1.0
9193
'pointSize': Qt.binding(function() { return 0.01 * Viewer3DSettings.pointSize }),
9294
'locatorScale': Qt.binding(function() { return Viewer3DSettings.cameraScale }),
9395
'viewId': Qt.binding(function() { return _reconstruction.selectedViewId }),
96+
'viewer2DInfo': Qt.binding(function() {return root.viewer2DInfo}),
9497
'cameraPickingEnabled': Qt.binding(function() { return root.enabled })
9598
});
9699

meshroom/ui/qml/Viewer3D/Viewer3D.qml

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ FocusScope {
2929
readonly property var viewpoint: _reconstruction ? _reconstruction.selectedViewpoint : null
3030
readonly property bool doSyncViewpointCamera: Viewer3DSettings.syncViewpointCamera && (viewpoint && viewpoint.isReconstructed)
3131

32+
property alias viewer2DInfo: mediaLibrary.viewer2DInfo
33+
3234
// functions
3335
function resetCameraPosition() {
3436
mainCamera.position = defaultCamPosition;

meshroom/ui/qml/WorkspaceView.qml

+8
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,14 @@ Item {
206206
Viewer3D {
207207
id: c_viewer3D
208208

209+
viewer2DInfo: {
210+
"x": viewer2D.imgContainer.x,
211+
"y": viewer2D.imgContainer.y,
212+
"width": viewer2D.imgLayout.width,
213+
"height": viewer2D.imgLayout.height,
214+
"scale": viewer2D.imgContainer.scale
215+
}
216+
209217
Layout.fillWidth: true
210218
Layout.fillHeight: true
211219
Layout.minimumWidth: 20

0 commit comments

Comments
 (0)