Skip to content

refactor(#50): remove superseded computePose / invertPose / computeGLviewMatrix()#58

Merged
kalwalt merged 1 commit into
devfrom
cleanup/dead-code-50-tier3
Jun 20, 2026
Merged

refactor(#50): remove superseded computePose / invertPose / computeGLviewMatrix()#58
kalwalt merged 1 commit into
devfrom
cleanup/dead-code-50-tier3

Conversation

@kalwalt

@kalwalt kalwalt commented Jun 20, 2026

Copy link
Copy Markdown
Member

Final #50 cleanup item (Tier 3). Removes WebARKit's own superseded pose-math, now fully replaced by cameraPoseFromPoints + the #55 pose3d fix.

Removed

  • computePose() — its only call site was already commented out; cameraPoseFromPoints is the live pose solve.
  • invertPose() — only ever called by computePose().
  • computeGLviewMatrix() (no-arg) — uncalled; the live path uses the computeGLviewMatrix(cv::Mat&) overload (kept).
  • the dangling commented computePose call in WebARKitTracker.cpp.

Not ArtoolkitX-derived

Unlike the OCVT symbols we deliberately kept (CleanUp, markerRoi, etc.), these are WebARKit's own pose helpers, genuinely superseded — so removing them de-duplicates rather than diverging from upstream design.

Compatibility

Behavior-neutral. The live pose/GL-view path (cameraPoseFromPointsgetTrackablePoseupdateTrackablecomputeGLviewMatrix(cv::Mat&)) is untouched; pose3d is still populated by cameraPoseFromPoints (#55). Brace balance verified.

Refs #50. After this, the #50 audit is complete (everything else was decided KEEP).

🤖 Generated with Claude Code

…Matrix()

These were WebARKit's own pose-math path, superseded by cameraPoseFromPoints +
the #55 pose3d fix:
- computePose() -- its only call site was already commented out; cameraPoseFromPoints
  is the live pose solve.
- invertPose() -- only ever called by computePose().
- computeGLviewMatrix() (no-arg) -- uncalled; the live path uses the
  computeGLviewMatrix(cv::Mat&) overload (kept).

Also drops the dangling commented computePose call in WebARKitTracker.cpp.
Behavior-neutral; the live pose/GL-view path (cameraPoseFromPoints,
getTrackablePose, updateTrackable, computeGLviewMatrix(cv::Mat&)) is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@kalwalt kalwalt self-assigned this Jun 20, 2026
@kalwalt kalwalt added enhancement New feature or request C/C++ code concerning the C/C++ code design and improvements Emscripten labels Jun 20, 2026
@kalwalt kalwalt moved this from To do to Review in progress in New markerless image tracking Jun 20, 2026
@kalwalt kalwalt added this to the Markerless tracking milestone Jun 20, 2026
@kalwalt kalwalt moved this from Review in progress to Reviewer approved in New markerless image tracking Jun 20, 2026
@kalwalt kalwalt merged commit e6f87fa into dev Jun 20, 2026
1 check passed
@github-project-automation github-project-automation Bot moved this from Reviewer approved to Done in New markerless image tracking Jun 20, 2026
kalwalt added a commit to webarkit/webarkit-testing that referenced this pull request Jun 20, 2026
Companion to webarkit/WebARKitLib#58. Bump the submodule to the commit removing
the superseded computePose/invertPose/computeGLviewMatrix()-noarg, and rebuild
build/ + dist/ (emscripten output is not byte-reproducible).

docs/audit-dead-code-issue50.md: move the computePose cluster from "pending" to
"removed (#58)"; the #50 audit is now complete (everything else decided KEEP).

Verified: static example tracks (pyrLevel 1, 1000 matches); live pose path unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
kalwalt added a commit to webarkit/webarkit-testing that referenced this pull request Jun 21, 2026
Companion to webarkit/WebARKitLib#58. Bump the submodule to the commit removing
the superseded computePose/invertPose/computeGLviewMatrix()-noarg, and rebuild
build/ + dist/ (emscripten output is not byte-reproducible).

docs/audit-dead-code-issue50.md: move the computePose cluster from "pending" to
"removed (#58)"; the #50 audit is now complete (everything else decided KEEP).

Verified: static example tracks (pyrLevel 1, 1000 matches); live pose path unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C/C++ code concerning the C/C++ code design and improvements Emscripten enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Code audit: find duplicated / orphan / unused code in WebARKit (excluding vendored lib/SRC and AR/ headers)

1 participant