Add getters for yaw, azimuth and elevation
Added getters for yaw, azimuth and elevation, and python bindings for them
Issue ticket number and link if any
Checklist for finalizing the PR
- [x] I have performed a self-review of my code
- [x] I have added tests for new features and bugfixes
- [x] I have added documentation for new features
- [x] If it is a modifying the libf3d API, I have updated bindings
- [ ] If it is a modifying the
.github/workflows/versions.json, I have updatedtimestamp
You are modifying libf3d public API! :warning:Please update bindings accordingly:warning:!
You can find them in their respective directories: python, java, webassembly.
Codecov Report
:x: Patch coverage is 92.85714% with 2 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 96.48%. Comparing base (e3651cc) to head (7d82ce5).
:warning: Report is 19 commits behind head on master.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| library/src/camera_impl.cxx | 92.85% | 2 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #2499 +/- ##
==========================================
+ Coverage 96.43% 96.48% +0.04%
==========================================
Files 138 140 +2
Lines 12047 12192 +145
==========================================
+ Hits 11618 11763 +145
Misses 429 429
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
please rebase on latest master
Need any help moving forward @AbbasReads ?
Style Checks CI failed:
diff --git a/library/testing/TestSDKCamera.cxx b/library/testing/TestSDKCamera.cxx
index c9fccdb..eacec45 100644
--- a/library/testing/TestSDKCamera.cxx
+++ b/library/testing/TestSDKCamera.cxx
@@ -179,7 +179,8 @@ int TestSDKCamera([[maybe_unused]] int argc, [[maybe_unused]] char* argv[])
// }
// cam.yaw(90.0);
- // if (!compareDouble(cam.getYaw(), 90.0, 1e-6) || !compareDouble(cam.getElevation(), 0.0, 1e-6) ||
+ // if (!compareDouble(cam.getYaw(), 90.0, 1e-6) || !compareDouble(cam.getElevation(), 0.0, 1e-6)
+ // ||
// !compareDouble(cam.getAzimuth(), 90.0, 1e-6))
// {
// std::cerr << "After yaw(90): unexpected orientation\n"
@@ -190,7 +191,8 @@ int TestSDKCamera([[maybe_unused]] int argc, [[maybe_unused]] char* argv[])
// }
// cam.elevation(45.0);
- // if (!compareDouble(cam.getYaw(), 90.0, 1e-6) || !compareDouble(cam.getElevation(), 45.0, 1e-6) ||
+ // if (!compareDouble(cam.getYaw(), 90.0, 1e-6) || !compareDouble(cam.getElevation(), 45.0, 1e-6)
+ // ||
// !compareDouble(cam.getAzimuth(), 90.0, 1e-6))
// {
// std::cerr << "After elevation(45): unexpected orientation\n"
@@ -201,7 +203,8 @@ int TestSDKCamera([[maybe_unused]] int argc, [[maybe_unused]] char* argv[])
// }
// cam.azimuth(90);
- // if (!compareDouble(cam.getYaw(), 180.0, 1e-6) || !compareDouble(cam.getElevation(), 0.0, 1e-6) ||
+ // if (!compareDouble(cam.getYaw(), 180.0, 1e-6) || !compareDouble(cam.getElevation(), 0.0, 1e-6)
+ // ||
// !compareDouble(cam.getAzimuth(), 180.0, 1e-6))
// {
// std::cerr << "After azimuth(90): unexpected orientation\n"
diff --git a/webassembly/testing/test_camera.js b/webassembly/testing/test_camera.js
index a108953..3863df5 100644
--- a/webassembly/testing/test_camera.js
+++ b/webassembly/testing/test_camera.js
@@ -48,8 +48,14 @@ const settings = {
console.log("Yaw:", camera.getYaw());
console.log("Elevation:", camera.getElevation());
- utils.assert(Math.abs(camera.getYaw() - 45) < 0.01, "Yaw should be 45 after yaw(45)");
- utils.assert(Math.abs(camera.getElevation()) < 0.01, "Elevation should remain 0");
+ utils.assert(
+ Math.abs(camera.getYaw() - 45) < 0.01,
+ "Yaw should be 45 after yaw(45)",
+ );
+ utils.assert(
+ Math.abs(camera.getElevation()) < 0.01,
+ "Elevation should remain 0",
+ );
// Test elevation rotation
// camera.resetToDefault();
Hi @AbbasReads , still wokring on this ?