Skip to content

feat: Integrated new vneintraction code. Also, make vneinteraction by default on for the vnetestbed. - #43

Merged
ajeetsinghyadav merged 7 commits into
mainfrom
VNE_TESTBED_INTERACTION_INTEGRATION
Apr 14, 2026
Merged

ajeetsinghyadav merged 7 commits into
mainfrom
VNE_TESTBED_INTERACTION_INTEGRATION

Conversation

@ajeetsinghyadav

@ajeetsinghyadav ajeetsinghyadav commented Apr 3, 2026 •

Copy link
Copy Markdown
Member
  • Changed the default option for VNE_WITH_VNEINTRACTION to ON, indicating that the vneinteraction dependency is now expected for this repository.
  • Updated comments in VNEPrivateDeps.cmake to clarify the behavior of the vneinteraction dependency management, ensuring better understanding of its integration and testing options.

Description

Release notes: Use a Conventional Commits–style PR title (e.g. feat: add X, fix: resolve Y, docs: update Z) so release-please can include this change in the changelog. If you squash-merge, use the PR title as the commit message.

Checklist

  • Project builds (e.g. cmake -B build and cmake --build build, or platform script).
  • Tests pass (e.g. ctest --test-dir build or script -a test).
  • Code is formatted (e.g. run clang-format as configured for this repo); CI clang-format will check.
  • Docs updated if you changed behavior or public API.

Additional notes

Summary by CodeRabbit

  • Updates
    • Navigation API and samples: mode naming clarified (Game mode removed), navigation now exposes FPS and Fly only; sample demo switched from behavior to manipulator-based controls and updated UI/controls.
  • Chores
    • Build default: interaction module enabled by default.
  • Dependencies
    • Vendored interaction and scene dependencies updated to newer revisions.

Note

Medium Risk
Moderate risk because it changes build defaults to require the vneinteraction submodule and updates sample code to new interaction API types/manipulators, which could break builds if dependencies or API versions mismatch.

Overview
Enables vneinteraction by default in the top-level CMake config (still overridable), making the submodule an expected dependency.

Hardens private-dep integration in VNEPrivateDeps.cmake by explicitly disabling vneinteraction’s own tests/examples/dev/CI options when embedded, reducing the chance of stale CMake cache re-enabling extra targets.

Updates the 03_test_interaction sample (and BaseInteractionLayer) to the newer manipulator-based interaction API: swaps *Behavior accessors for *Manipulator, renames types (NavigateMode→FreeLookMode, OrbitRotationMode→OrbitalRotationMode, trackball projection type), tweaks UI strings accordingly, and resets camera up-vector on reset.

Reviewed by Cursor Bugbot for commit 749b066. Bugbot is set up for automated code reviews on this repo. Configure here.

- Replaced references to behavior classes with manipulator classes for improved clarity and consistency in interaction management.
- Updated navigation mode handling to utilize FreeLookMode instead of NavigateMode, enhancing the user experience.
- Adjusted UI elements and documentation to reflect these changes, ensuring accurate representation of available controls and settings.
…action

- Moved trackball projection settings UI elements to the correct conditional block based on the rotation mode, ensuring proper display and functionality.
- Enhanced clarity in the interaction settings by maintaining consistent UI behavior for trackball projection options.
- Changed the default option for VNE_WITH_VNEINTRACTION to ON, indicating that the vneinteraction dependency is now expected for this repository.
- Updated comments in VNEPrivateDeps.cmake to clarify the behavior of the vneinteraction dependency management, ensuring better understanding of its integration and testing options.
Copilot AI review requested due to automatic review settings April 3, 2026 05:03
@coderabbitai

coderabbitai Bot commented Apr 3, 2026 •

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This PR flips the CMake option VNE_WITH_VNEINTRACTION default ON, embeds and adjusts private-deps handling for the vneinteraction submodule, updates that submodule pointer, and migrates sample interaction code from the behavior API to the manipulator API with renamed enums and updated signatures.

Changes

Cohort / File(s) Summary
Build Configuration
CMakeLists.txt, cmake/VNEPrivateDeps.cmake
VNE_WITH_VNEINTRACTION default changed OFF → ON; VNETESTBED_VNEINTERACTION_EMBEDDED set when embedding; vnetestbed_use_dep(...) now forces several VNE_INTERACTION_* cache vars OFF and SAVE_RESTORE only restores BUILD_TESTS/BUILD_EXAMPLES.
Submodule Pins
deps/internal/vneinteraction, deps/internal/vnescene
Updated submodule revisions (vneinteraction: c8830bb... → cffb985...; vnescene: d6600d2... → 059ab0b...).
Sample Interaction Migration
samples/glfw_opengl/03_test_interaction/demo_test_interaction.cpp, samples/glfw_opengl/03_test_interaction/demo_test_interaction.h, samples/glfw_opengl/03_test_interaction/README.md
Samples migrated from behavior API to manipulator API: includes, accessors, and plumbing updated; NavigateMode → FreeLookMode; OrbitRotationMode → OrbitalRotationMode; signatures and UI logic adjusted; README removed "Game" mode mention.
Common Layer
samples/glfw_opengl/common/base_scene_layer.cpp
Default rotation enum reference changed from OrbitRotationMode::eOrbit to OrbitalRotationMode::eOrbit.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

🐰
I nibbled defaults, flipped a switch,
Pulled a submodule from the ditch.
Behaviors hopped, manipulators play,
Enums renamed, and docs say “OK.”
A little hop for build and scene, hooray!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main changes: making vneinteraction enabled by default and integrating new vneinteraction code, which are the primary objectives evident in CMakeLists.txt changes and submodule updates.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch VNE_TESTBED_INTERACTION_INTEGRATION

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the GLFW/OpenGL interaction sample code to the newer vneinteraction API (mode/type renames and behavior→manipulator accessors) and makes vneinteraction enabled by default in the repo build.

Changes:

  • Switch sample interaction code from *Behavior() APIs / NavigateMode / OrbitRotationMode to *Manipulator() APIs / FreeLookMode / OrbitalRotationMode.
  • Default VNE_WITH_VNEINTRACTION to ON so the vneinteraction submodule is expected for typical builds.
  • Extend VNEPrivateDeps.cmake cache var wiring to keep vneinteraction tests/examples/dev options disabled by default.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
samples/glfw_opengl/common/base_scene_layer.cpp Update Inspect controller rotation mode enum name to match new interaction API.
samples/glfw_opengl/03_test_interaction/README.md Update documentation to reference FreeLookMode (needs a small consistency fix).
samples/glfw_opengl/03_test_interaction/demo_test_interaction.h Replace NavigateMode with FreeLookMode in the interaction demo interface/state.
samples/glfw_opengl/03_test_interaction/demo_test_interaction.cpp Migrate demo implementation to manipulator APIs and updated interaction types.
CMakeLists.txt Enable vneinteraction by default via VNE_WITH_VNEINTRACTION=ON.
cmake/VNEPrivateDeps.cmake Ensure vneinteraction tests/examples/dev options stay disabled unless explicitly enabled.

Comment thread samples/glfw_opengl/03_test_interaction/README.md
- Updated comments in VNEPrivateDeps.cmake to clarify the behavior of the SAVE_RESTORE mechanism for VNE_INTERACTION_* variables, addressing issues seen in CI with stale cache values.
- Set VNETESTBED_VNEINTERACTION_EMBEDDED to ON to ensure proper integration of the vneinteraction tests while keeping its gtest suite out of vnetestbed.
…test_interaction

- Introduced a new constant for the default camera up vector to improve camera orientation handling.
- Updated the resetCamera method to set the camera's up direction, enhancing the overall interaction experience.
- Updated the vneinteraction subproject to the latest commit for improved compatibility.
- Enhanced comments in VNEPrivateDeps.cmake to clarify the handling of test configurations and prevent stale cache issues during CI builds.
Copilot AI review requested due to automatic review settings April 14, 2026 03:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Comment thread CMakeLists.txt
Comment on lines +101 to +102
# vneinteraction is expected for this repo; still overridable with -DVNE_WITH_VNEINTRACTION=OFF if needed.
option(VNE_WITH_VNEINTRACTION "Enable private dependency vneinteraction" ON)

Copilot AI Apr 14, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CMake option name is misspelled (VNE_WITH_VNEINTRACTION vs vneinteraction). Since this is user-facing and now default-ON, it’s easy for consumers to guess the (correctly spelled) flag and get confused. Consider introducing a correctly spelled VNE_WITH_VNEINTERACTION option and treating VNE_WITH_VNEINTRACTION as a deprecated alias (copy value over + emit a deprecation message), then use the correctly spelled name throughout the build logic.

Suggested change
# vneinteraction is expected for this repo; still overridable with -DVNE_WITH_VNEINTRACTION=OFF if needed.
option(VNE_WITH_VNEINTRACTION "Enable private dependency vneinteraction" ON)
# vneinteraction is expected for this repo; use -DVNE_WITH_VNEINTERACTION=OFF to disable it.
# Backward compatibility: VNE_WITH_VNEINTRACTION is a deprecated misspelled alias.
option(VNE_WITH_VNEINTERACTION "Enable private dependency vneinteraction" ON)
if(DEFINED VNE_WITH_VNEINTRACTION)
message(DEPRECATION
"CMake option VNE_WITH_VNEINTRACTION is deprecated and will be removed in a future release. "
"Use VNE_WITH_VNEINTERACTION instead.")
set(VNE_WITH_VNEINTERACTION "${VNE_WITH_VNEINTRACTION}" CACHE BOOL
"Enable private dependency vneinteraction" FORCE)
endif()

Copilot uses AI. Check for mistakes.
Comment on lines +12 to +13
set(VNETESTBED_VNEINTERACTION_EMBEDDED ON)
# vneinteraction uses VNE_INTERACTION_TESTS (not BUILD_TESTS). CACHE_VARS turn tests off before

Copilot AI Apr 14, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VNETESTBED_VNEINTERACTION_EMBEDDED is set here but (in this repo) is not referenced anywhere else. If it’s meant to control behavior inside the vneinteraction subproject, consider passing it explicitly via CACHE_VARS (or documenting where it’s consumed); otherwise remove the assignment to avoid dead configuration state.

Copilot uses AI. Check for mistakes.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
samples/glfw_opengl/03_test_interaction/demo_test_interaction.cpp (1)

838-866: ⚠️ Potential issue | 🔴 Critical

This code will fail to compile — TrackballProjectionMode enum and the getter/setter methods do not exist.

The trackball projection UI block (lines 858–865) references:

  • vne::interaction::TrackballProjectionMode enum (undefined)
  • orb.getTrackballProjectionMode() method (undefined)
  • orb.setTrackballProjectionMode() method (undefined)

These APIs are not present in the interaction library. Either they need to be implemented in the OrbitalCameraManipulator class, or this entire block should be removed if this functionality is not yet supported.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@samples/glfw_opengl/03_test_interaction/demo_test_interaction.cpp` around
lines 838 - 866, The Trackball projection UI references nonexistent APIs
(vne::interaction::TrackballProjectionMode, orb.getTrackballProjectionMode(),
orb.setTrackballProjectionMode()); remove the inner block guarded by
insp->getRotationMode() == vne::interaction::OrbitalRotationMode::eTrackball
that declares TPM, proj_idx, proj_names, the ImGui::Combo call, and the
ImGui::TextDisabled line, or alternatively implement the missing enum and orb
getter/setter in OrbitalCameraManipulator (implement TrackballProjectionMode,
getTrackballProjectionMode(), setTrackballProjectionMode()) if projection modes
are intended to be supported; update references accordingly
(TrackballProjectionMode, getTrackballProjectionMode,
setTrackballProjectionMode).
🧹 Nitpick comments (1)
samples/glfw_opengl/03_test_interaction/demo_test_interaction.cpp (1)

67-92: Consider adding an explicit default case to suppress compiler warnings.

The switch covers all ControllerKind values with a fallback return after the switch, but some compilers may still warn about a missing default. Adding an explicit default case would silence these warnings and clarify intent.

♻️ Suggested fix
         case ControllerKind::eFollow: {
             return vne::interaction::FollowController{};
         }
+        default:
+            break;
     }
     return vne::interaction::Inspect3DController{};
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@samples/glfw_opengl/03_test_interaction/demo_test_interaction.cpp` around
lines 67 - 92, Add an explicit default case to the switch inside makeController
to silence compiler warnings and make intent clear: inside
makeController(ControllerKind kind, vne::interaction::FreeLookMode nav_mode) add
a default: branch that returns a sensible fallback (e.g.,
vne::interaction::Inspect3DController{}) or asserts/throws if unreachable;
update/remove the redundant return after the switch if desired. Reference:
makeController, ControllerKind, Inspect3DController, Navigation3DController,
Ortho2DController, FollowController.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@samples/glfw_opengl/03_test_interaction/demo_test_interaction.cpp`:
- Around line 838-866: The Trackball projection UI references nonexistent APIs
(vne::interaction::TrackballProjectionMode, orb.getTrackballProjectionMode(),
orb.setTrackballProjectionMode()); remove the inner block guarded by
insp->getRotationMode() == vne::interaction::OrbitalRotationMode::eTrackball
that declares TPM, proj_idx, proj_names, the ImGui::Combo call, and the
ImGui::TextDisabled line, or alternatively implement the missing enum and orb
getter/setter in OrbitalCameraManipulator (implement TrackballProjectionMode,
getTrackballProjectionMode(), setTrackballProjectionMode()) if projection modes
are intended to be supported; update references accordingly
(TrackballProjectionMode, getTrackballProjectionMode,
setTrackballProjectionMode).

---

Nitpick comments:
In `@samples/glfw_opengl/03_test_interaction/demo_test_interaction.cpp`:
- Around line 67-92: Add an explicit default case to the switch inside
makeController to silence compiler warnings and make intent clear: inside
makeController(ControllerKind kind, vne::interaction::FreeLookMode nav_mode) add
a default: branch that returns a sensible fallback (e.g.,
vne::interaction::Inspect3DController{}) or asserts/throws if unreachable;
update/remove the redundant return after the switch if desired. Reference:
makeController, ControllerKind, Inspect3DController, Navigation3DController,
Ortho2DController, FollowController.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d56380d1-f610-43df-bcda-f0241d23969e

📥 Commits

Reviewing files that changed from the base of the PR and between e542058 and 749b066.

📒 Files selected for processing (3)
  • cmake/VNEPrivateDeps.cmake
  • deps/internal/vnescene
  • samples/glfw_opengl/03_test_interaction/demo_test_interaction.cpp
🚧 Files skipped from review as they are similar to previous changes (1)
  • cmake/VNEPrivateDeps.cmake

@ajeetsinghyadav
ajeetsinghyadav merged commit 2bf58ca into main Apr 14, 2026
15 checks passed
@coderabbitai coderabbitai Bot mentioned this pull request Apr 27, 2026
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants