Skip to content

Commit

Permalink
fix for issue with getPoseMatrix
Browse files Browse the repository at this point in the history
  • Loading branch information
kalwalt committed Nov 2, 2023
1 parent c677f2e commit 64e4c78
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build/webarkit_ES6_wasm.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/webarkit_ES6_wasm.simd.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/WebARKit.js

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions emscripten/WebARKitJS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ emscripten::val WebARKit::getHomography() {
emscripten::val WebARKit::getPoseMatrix() {
cv::Mat poseMatrix = manager.getPoseMatrix();
emscripten::val pose = emscripten::val::array();
for (auto i = 0; i < 12; i++) {
pose.call<void>("push", poseMatrix.at<double>(i));
for (auto i = 0; i < 3; i++) {
for (auto j = 0; j < 4; j++) {
pose.call<void>("push", poseMatrix.at<double>(j, i));
}
}
return pose;
}
Expand Down

0 comments on commit 64e4c78

Please sign in to comment.