[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: {
if (viewerTypeString === "panorama") {
// Force to update the surface grid after a downscale change
surface.rotateSurfaceRadians(
_reconstruction.activeNodes.get('SfMTransform').node.attribute("manualTransform.manualRotation.y").value * (3.14 / 180),
_reconstruction.activeNodes.get('SfMTransform').node.attribute("manualTransform.manualRotation.x").value * (3.14 / 180))
surface.rotateSurfaceDegrees(
_reconstruction.activeNodes.get('SfMTransform').node.attribute("manualTransform.manualRotation.y").value,
_reconstruction.activeNodes.get('SfMTransform').node.attribute("manualTransform.manualRotation.x").value)
}
root.surface.setIdView(idView);
}

View file

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