feat(core): implement arParamChangeSize and arglCameraFrustumRH#121
Merged
kalwalt merged 6 commits intoMay 11, 2026
Merged
Conversation
Agent-Logs-Url: https://github.com/webarkit/WebARKitLib-rs/sessions/8a207029-faa2-42fa-bffb-eae1d6b4d529 Co-authored-by: kalwalt <1275858+kalwalt@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Implement arParamChangeSize, ar3DCreateHandle, and arglCameraFrustumRH
feat(core): implement arParamChangeSize and arglCameraFrustumRH
May 10, 2026
Agent-Logs-Url: https://github.com/webarkit/WebARKitLib-rs/sessions/a9fedcda-09a6-4937-85a9-fee8ad6af02d Co-authored-by: kalwalt <1275858+kalwalt@users.noreply.github.com>
Agent-Logs-Url: https://github.com/webarkit/WebARKitLib-rs/sessions/62c18e2b-bb5f-4cd5-b90b-799031d538ab Co-authored-by: kalwalt <1275858+kalwalt@users.noreply.github.com>
Add argl_camera_view_rh (f64), argl_camera_frustum_rh_f (f32) and argl_camera_view_rh_f (f32) — direct Rust ports of arglCameraViewRH, arglCameraFrustumRHf and arglCameraViewRHf from ARToolKit's paramGL.c. All three follow the arlog_e! + return Err error pattern. Covered by 19 new unit tests (28 total in the module, all green). cargo fmt and cargo clippy --no-default-features are both clean. Agent-Logs-Url: https://github.com/webarkit/WebARKitLib-rs/sessions/7016360c-5440-408b-b1cb-bf68903ef50d Co-authored-by: kalwalt <1275858+kalwalt@users.noreply.github.com>
Agent-Logs-Url: https://github.com/webarkit/WebARKitLib-rs/sessions/2931bb30-6c63-4dc8-825e-4a4eeeafd8d1 Co-authored-by: kalwalt <1275858+kalwalt@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes / implements #19.
This PR ports three groups of ARToolKit C functions into Rust as part of the WebARKitLib-rs API build-out:
1.
arParamChangeSize→ar_param_change_size(crates/core/src/ar/param.rs)ARParamstruct to a new output resolution.fx,fy,cx,cy) by the ratio of the new size to the original.arParamChangeSizeinparam.c.Err(ArParamError)on zero-width/height inputs.2. New module
param_gl(crates/core/src/ar/param_gl.rs)Ports four OpenGL matrix-generation helpers from ARToolKit's
paramGL.c:argl_camera_frustum_rharglCameraFrustumRHARParamargl_camera_view_rharglCameraViewRHargl_camera_frustum_rh_farglCameraFrustumRHfargl_camera_view_rh_farglCameraViewRHfAll functions return 16-element column-major arrays ready for use with
glUniformMatrix4fv.Full unit tests and doc-examples are included for each function.
3. Module wiring (
mod.rs,lib.rs)param_gladded tocrates/core/src/ar/mod.rs(table entry +pub moddeclaration).param_glre-exported fromcrates/core/src/lib.rs.4. Bug fix — Clippy
doc_overindented_list_itemsparam_gl.rs:249(12-space indent → 2-space indent) to resolve CI failure.Files changed
crates/core/src/ar/param.rsar_param_change_sizeimplementation + testscrates/core/src/ar/param_gl.rsparamGL.cfunctions, docs, testscrates/core/src/ar/mod.rsparam_glmodulecrates/core/src/lib.rsparam_gl