Skip to content

Commit

Permalink
Fix deprecation warnings for ModelPhotoShoot (#1437)
Browse files Browse the repository at this point in the history
Signed-off-by: Louise Poubel <[email protected]>
  • Loading branch information
chapulina committed Apr 13, 2022
1 parent 7bad263 commit 1fb55b4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions src/systems/model_photo_shoot/ModelPhotoShoot.cc
Original file line number Diff line number Diff line change
Expand Up @@ -247,35 +247,35 @@ void ModelPhotoShootPrivate::PerformPostRenderingOperations()
pose.Pos().Set(1.6 / scaling + translation.X(),
-1.6 / scaling + translation.Y(),
1.2 / scaling + translation.Z());
pose.Rot().Euler(0, IGN_DTOR(30), IGN_DTOR(-225));
pose.Rot().SetFromEuler(0, IGN_DTOR(30), IGN_DTOR(-225));
SavePicture(camera, pose, "1.png");

// Top view
pose.Pos().Set(0 + translation.X(),
0 + translation.Y(),
2.2 / scaling + translation.Z());
pose.Rot().Euler(0, IGN_DTOR(90), 0);
pose.Rot().SetFromEuler(0, IGN_DTOR(90), 0);
SavePicture(camera, pose, "2.png");

// Front view
pose.Pos().Set(2.2 / scaling + translation.X(),
0 + translation.Y(),
0 + translation.Z());
pose.Rot().Euler(0, 0, IGN_DTOR(-180));
pose.Rot().SetFromEuler(0, 0, IGN_DTOR(-180));
SavePicture(camera, pose, "3.png");

// Side view
pose.Pos().Set(0 + translation.X(),
2.2 / scaling + translation.Y(),
0 + translation.Z());
pose.Rot().Euler(0, 0, IGN_DTOR(-90));
pose.Rot().SetFromEuler(0, 0, IGN_DTOR(-90));
SavePicture(camera, pose, "4.png");

// Back view
pose.Pos().Set(-2.2 / scaling + translation.X(),
0 + translation.Y(),
0 + translation.Z());
pose.Rot().Euler(0, 0, 0);
pose.Rot().SetFromEuler(0, 0, 0);
SavePicture(camera, pose, "5.png");

this->takePicture = false;
Expand Down
10 changes: 5 additions & 5 deletions test/integration/ModelPhotoShootTest.hh
Original file line number Diff line number Diff line change
Expand Up @@ -133,34 +133,34 @@ class ModelPhotoShootTest : public InternalFixture<::testing::Test>
pose.Pos().Set(1.6 / scaling + translation.X(),
-1.6 / scaling + translation.Y(),
1.2 / scaling + translation.Z());
pose.Rot().Euler(0, IGN_DTOR(30), IGN_DTOR(-225));
pose.Rot().SetFromEuler(0, IGN_DTOR(30), IGN_DTOR(-225));
SavePicture(camera, pose, "1_test.png");
// Top view
pose.Pos().Set(0 + translation.X(),
0 + translation.Y(),
2.2 / scaling + translation.Z());
pose.Rot().Euler(0, IGN_DTOR(90), 0);
pose.Rot().SetFromEuler(0, IGN_DTOR(90), 0);
SavePicture(camera, pose, "2_test.png");

// Front view
pose.Pos().Set(2.2 / scaling + translation.X(),
0 + translation.Y(),
0 + translation.Z());
pose.Rot().Euler(0, 0, IGN_DTOR(-180));
pose.Rot().SetFromEuler(0, 0, IGN_DTOR(-180));
SavePicture(camera, pose, "3_test.png");

// Side view
pose.Pos().Set(0 + translation.X(),
2.2 / scaling + translation.Y(),
0 + translation.Z());
pose.Rot().Euler(0, 0, IGN_DTOR(-90));
pose.Rot().SetFromEuler(0, 0, IGN_DTOR(-90));
SavePicture(camera, pose, "4_test.png");

// Back view
pose.Pos().Set(-2.2 / scaling + translation.X(),
0 + translation.Y(),
0 + translation.Z());
pose.Rot().Euler(0, 0, 0);
pose.Rot().SetFromEuler(0, 0, 0);
SavePicture(camera, pose, "5_test.png");
}
}
Expand Down

0 comments on commit 1fb55b4

Please sign in to comment.