Skip to content

Conversation

kalwalt
Copy link
Member

@kalwalt kalwalt commented Jun 12, 2025

This pull request introduces a new method, recalulateCameraLens, to the ARToolKitNFT class and integrates it into the codebase. The method recalculates the camera lens parameters based on the near and far plane values. The changes span multiple files, ensuring the method is accessible and functional across the application.

Addition of the recalulateCameraLens Method:

  • Implementation in ARToolKitNFT class:
    • Added the recalulateCameraLens method to the ARToolKitNFT class in both ARToolKitNFT_js.cpp and ARToolKitNFT_js_td.cpp. This method uses arglCameraFrustumRH to update the camera lens parameters based on the near and far planes. [1] [2]
    • Declared the recalulateCameraLens method in the corresponding header files, ARToolKitNFT_js.h and ARToolKitNFT_js_td.h. [1] [2]

Integration into Bindings:

  • Emscripten Bindings:
    • Exposed the recalulateCameraLens method to JavaScript by adding it to the EMSCRIPTEN_BINDINGS in ARToolKitNFT_js_bindings.cpp. This allows the method to be called from the JavaScript environment.

- Implemented recalulateCameraLens method in ARToolKitNFT to update camera lens parameters based on the current near and far planes.
- Added method declaration in ARToolKitNFT_js.h and ARToolKitNFT_js_td.h.
- Exposed recalulateCameraLens method in Emscripten bindings for JavaScript access.
- Ensured consistency of the method implementation across ARToolKitNFT_js.cpp and ARToolKitNFT_js_td.cpp.
@kalwalt kalwalt self-assigned this Jun 12, 2025
@kalwalt kalwalt added enhancement New feature or request C/C++ emscripten labels Jun 12, 2025
kalwalt added 2 commits June 24, 2025 18:11
- Introduced a new function `recalculateCameraLens` in ARToolKitJS and ARToolKitJS_td to update the camera lens parameters based on the current settings.
- Corrected the spelling of `recalulateCameraLens` to `recalculateCameraLens` in ARToolKitNFT_js and ARToolKitNFT_js_td classes and their respective bindings.
- Updated the Emscripten bindings to expose the new `recalculateCameraLens` function for JavaScript usage.
…a updates

- Introduced recalculateCameraLens method in both ARControllerNFT and its ES6 variant.
- This method allows recalculating the camera lens based on current camera parameters, ensuring accurate rendering when parameters change.
@kalwalt kalwalt force-pushed the feature-recalculate-camera branch from e7acfed to 3e4f1c9 Compare June 24, 2025 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant