[Panorama Viewer] use degrees rotate function

This commit is contained in:
Thomas Zorroche 2021-07-15 15:44:25 +02:00 committed by Fabien Castan
parent 7c8431bc4c
commit c6b2e2d01f
2 changed files with 8 additions and 7 deletions

View file

@ -39,12 +39,10 @@ AliceVision.FloatImageViewer {
onStatusChanged: { onStatusChanged: {
if (viewerTypeString === "panorama") { if (viewerTypeString === "panorama") {
// Force to update the surface grid after a downscale change surface.rotateSurfaceDegrees(
surface.rotateSurfaceRadians( _reconstruction.activeNodes.get('SfMTransform').node.attribute("manualTransform.manualRotation.y").value,
_reconstruction.activeNodes.get('SfMTransform').node.attribute("manualTransform.manualRotation.y").value * (3.14 / 180), _reconstruction.activeNodes.get('SfMTransform').node.attribute("manualTransform.manualRotation.x").value)
_reconstruction.activeNodes.get('SfMTransform').node.attribute("manualTransform.manualRotation.x").value * (3.14 / 180))
} }
root.surface.setIdView(idView); root.surface.setIdView(idView);
} }

View file

@ -57,9 +57,11 @@ AliceVision.PanoramaViewer {
property int yaw: 0; property int yaw: 0;
property int pitch: 0; property int pitch: 0;
property var activeNode: _reconstruction.activeNodes.get('SfMTransform').node
// Yaw and Pitch in Degrees from SfMTransform sliders // Yaw and Pitch in Degrees from SfMTransform sliders
property int yawNode: _reconstruction.activeNodes.get('SfMTransform').node.attribute("manualTransform.manualRotation.y").value; property int yawNode: activeNode.attribute("manualTransform.manualRotation.y").value;
property int pitchNode: _reconstruction.activeNodes.get('SfMTransform').node.attribute("manualTransform.manualRotation.x").value; property int pitchNode: activeNode.attribute("manualTransform.manualRotation.x").value;
onYawNodeChanged: { onYawNodeChanged: {
if (!isRotating) { if (!isRotating) {
@ -128,6 +130,7 @@ AliceVision.PanoramaViewer {
} }
onReleased: { onReleased: {
console.warn(repeater.model)
if (isRotating) if (isRotating)
{ {
// Update Euler angles // Update Euler angles