Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
14 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deps/internal/vneinteraction
Submodule vneinteraction updated 54 files
+1 −1 .release-please-manifest.json
+67 −4 CHANGELOG.md
+8 −8 README.md
+1 −1 VERSION
+12 −12 docs/vertexnova/interaction/interaction.md
+4 −4 docs/vertexnova/interaction/review_and_roadmap.md
+3 −3 examples/01_library_info/main.cpp
+6 −6 examples/02_medical_3d_inspect/main.cpp
+5 −5 examples/05_robotic_simulator/main.cpp
+3 −3 examples/README.md
+1 −1 examples/common/input_simulation.h
+2 −2 include/vertexnova/interaction/camera_behavior.h
+20 −29 include/vertexnova/interaction/camera_behavior_base.h
+12 −9 include/vertexnova/interaction/camera_rig.h
+2 −2 include/vertexnova/interaction/follow_behavior.h
+12 −4 include/vertexnova/interaction/free_look_behavior.h
+21 −21 include/vertexnova/interaction/inspect_3d_controller.h
+5 −3 include/vertexnova/interaction/interaction.h
+10 −10 include/vertexnova/interaction/interaction_types.h
+3 −3 include/vertexnova/interaction/navigation_3d_controller.h
+186 −0 include/vertexnova/interaction/orbit_behavior.h
+80 −38 include/vertexnova/interaction/orbital_camera_behavior.h
+35 −26 include/vertexnova/interaction/ortho_2d_behavior.h
+4 −4 include/vertexnova/interaction/ortho_2d_controller.h
+175 −0 include/vertexnova/interaction/trackball_behavior.h
+10 −6 src/CMakeLists.txt
+9 −0 src/vertexnova/interaction/behavior_utils.cpp
+8 −1 src/vertexnova/interaction/behavior_utils.h
+33 −18 src/vertexnova/interaction/camera_behavior_base.cpp
+14 −10 src/vertexnova/interaction/camera_rig.cpp
+1 −1 src/vertexnova/interaction/controller_event_dispatch.h
+4 −3 src/vertexnova/interaction/follow_behavior.cpp
+7 −4 src/vertexnova/interaction/free_look_behavior.cpp
+17 −3 src/vertexnova/interaction/input_mapper.cpp
+31 −31 src/vertexnova/interaction/inspect_3d_controller.cpp
+5 −5 src/vertexnova/interaction/navigation_3d_controller.cpp
+164 −0 src/vertexnova/interaction/orbit_behavior.cpp
+310 −319 src/vertexnova/interaction/orbital_camera_behavior.cpp
+115 −21 src/vertexnova/interaction/ortho_2d_behavior.cpp
+9 −10 src/vertexnova/interaction/ortho_2d_controller.cpp
+162 −0 src/vertexnova/interaction/trackball_behavior.cpp
+5 −3 tests/CMakeLists.txt
+18 −18 tests/api_robustness_test.cpp
+120 −6 tests/behavior_regression_test.cpp
+7 −2 tests/camera_rig_test.cpp
+4 −4 tests/controller_move_safety_test.cpp
+130 −0 tests/input_mapper_test.cpp
+13 −13 tests/inspect_3d_controller_test.cpp
+4 −4 tests/navigation_3d_controller_test.cpp
+0 −121 tests/orbit_arcball_behavior_test.cpp
+102 −0 tests/orbit_behavior_test.cpp
+207 −0 tests/orbital_camera_behavior_test.cpp
+34 −7 tests/ortho_2d_behavior_test.cpp
+183 −0 tests/trackball_behavior_test.cpp
6 changes: 3 additions & 3 deletions samples/glfw_opengl/00_hello_testbed/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The baseline demo that every subsequent GLFW/OpenGL sample is built on. Proves t
2. **Viewport resize**: Resizing the viewport keeps the image filling the panel (no stretching).
3. **Vsync**: Toggle in the application responds immediately.
4. **Grid and axes**: Spatial reference and confirmation that the camera and scene work.
5. **Orbit-arcball** (when `vne::interaction` is enabled): LMB drag rotates, RMB drag pans, scroll zooms.
5. **Orbit / trackball** (when `vne::interaction` is enabled): LMB drag rotates, RMB drag pans, scroll zooms.
6. **ImGui Settings**: Demo-specific section **Viewport** with controls reference and axis legend.

## Screenshots and Demo
Expand Down Expand Up @@ -42,7 +42,7 @@ Note: The GIF is frame-skipped and also sped up so it can include the full recor
- uncheck **Vsync**,
- set **Viewport Layout** to **2**, **3**, or **4** viewports for a multi-pane layout (the combo also offers **1** for a single viewport).
3. Use mouse:
- **LMB** drag: rotate (orbit-arcball),
- **LMB** drag: rotate (orbit / trackball inspect),
- **RMB** drag: pan,
- **Scroll wheel**: zoom.

Expand Down Expand Up @@ -108,7 +108,7 @@ Exit with **ESC** or by closing the window.
## Key Concepts

- **BaseSceneLayer**: Renders grid, axes, and a perspective camera; shared with other samples via `samples/glfw_opengl/common/base_scene_layer.h`.
- **BaseInteractionLayer**: Orbit-arcball manipulator (optional); LMB orbit, RMB pan, scroll zoom.
- **BaseInteractionLayer**: Orbit / trackball inspect manipulator (optional); LMB rotate, RMB pan, scroll zoom.
- **ImGui viewport**: The scene is drawn into an ImGui window; **Viewport Layout** can be set to 1–4 viewports when ImGui docking is enabled.
- **Libraries**: vne::testbed, vne::scene, vne::interaction (optional).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ void registerHelloTestbedDemo(vne::testbed::Application& app) {
app.getLayerStack().pushLayer(std::unique_ptr<BaseSceneLayer>(scene), app.getAppContext());

#ifdef VNE_TESTBED_INTERACTION
// Layer 2: orbit-arcball interaction (per-viewport cameras when using multiple viewports)
// Layer 2: orbit/trackball interaction (per-viewport cameras when using multiple viewports)
auto* interaction = new BaseInteractionLayer("HelloInteractionLayer");
interaction->setSceneLayer(scene);
app.getLayerStack().pushLayer(std::unique_ptr<BaseInteractionLayer>(interaction), app.getAppContext());
Expand Down
2 changes: 1 addition & 1 deletion samples/glfw_opengl/01_test_events/demo_test_events.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ void registerTestEventsDemo(vne::testbed::Application& app) {
app.getLayerStack().pushLayer(std::unique_ptr<BaseSceneLayer>(scene), app.getAppContext());

#ifdef VNE_TESTBED_INTERACTION
// Layer 2: orbit-arcball interaction (per-viewport cameras when using multiple viewports)
// Layer 2: orbit/trackball interaction (per-viewport cameras when using multiple viewports)
auto* interaction = new BaseInteractionLayer("TestEventsInteractionLayer");
interaction->setSceneLayer(scene);
app.getLayerStack().pushLayer(std::unique_ptr<BaseInteractionLayer>(interaction), app.getAppContext());
Expand Down
2 changes: 1 addition & 1 deletion samples/glfw_opengl/02_test_scene/demo_test_scene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,7 @@ void registerTestSceneDemo(vne::testbed::Application& app) {
app.getLayerStack().pushLayer(std::unique_ptr<SceneTestLayer>(scene), app.getAppContext());

#ifdef VNE_TESTBED_INTERACTION
// Layer 2: orbit-arcball (per-viewport cameras; use active set so ortho/persp switch works)
// Layer 2: orbit/trackball interaction (per-viewport cameras; use active set so ortho/persp switch works)
auto* interaction = new BaseInteractionLayer("TestSceneInteractionLayer");
interaction->setCameras(scene->getActiveCameras());
app.getLayerStack().pushLayer(std::unique_ptr<BaseInteractionLayer>(interaction), app.getAppContext());
Expand Down
4 changes: 2 additions & 2 deletions samples/glfw_opengl/03_test_interaction/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# 03 - Test Interaction

Full **interaction** demo on top of [`BaseSceneLayer`](../common/base_scene_layer.h): every high-level controller type (Inspect orbit/arcball, 3D navigation with FPS/Fly/Game modes, orthographic pan/zoom, follow), zoom methods, view-direction presets, and optional mesh loading from testdata when `VNE_TESTBED_VNEIO` is enabled. It shares the same **build / run / IDE** workflow as [`00_hello_testbed`](../00_hello_testbed/README.md) and uses the same Blinn-Phong [`MeshLayer`](../../../include/vertexnova/testbed/utils/mesh_layer.h) path as the scene samples when meshes are available.
Full **interaction** demo on top of [`BaseSceneLayer`](../common/base_scene_layer.h): every high-level controller type (Inspect orbit or virtual trackball with Hyperbolic/Rim projection, 3D navigation with FPS/Fly/Game modes, orthographic pan/zoom, follow), zoom methods, view-direction presets, and optional mesh loading from testdata when `VNE_TESTBED_VNEIO` is enabled. It shares the same **build / run / IDE** workflow as [`00_hello_testbed`](../00_hello_testbed/README.md) and uses the same Blinn-Phong [`MeshLayer`](../../../include/vertexnova/testbed/utils/mesh_layer.h) path as the scene samples when meshes are available.

Screenshots are not included yet; they may be added in a later revision.

## What This Sample Shows

1. **Base scene**: Grid, axes, perspective or orthographic camera from `BaseSceneLayer`; settings can toggle grid/axes and switch projection.
2. **Controllers**: Runtime selection among Inspect (orbit or arcball), Navigation (FPS / Fly / Game via `NavigateMode`), Ortho2D, and Follow; per-controller ImGui tuning (pivot mode, speeds, navigation multipliers, ortho/follow options).
2. **Controllers**: Runtime selection among Inspect (Euler orbit or trackball), Navigation (FPS / Fly / Game via `NavigateMode`), Ortho 2D (`Ortho2DController`), and Follow; per-controller ImGui tuning (trackball projection when in trackball inspect mode, pivot mode, speeds, navigation multipliers, ortho/follow options).
3. **Zoom**: Dolly-to-COI, scene-scale, or FOV change where applicable; matrix readouts for view and projection when enabled.
4. **Mesh browser** (with vneio): Lists mesh files under the configured directory (PLY, OBJ, STL, FBX, glTF), loads on click, drag-and-drop to the viewport, plus lighting and mesh transform panels when a mesh is loaded.
5. **Layer stack**: `BaseSceneLayer` → `InteractionTestLayer` → optional `MeshLayer` → `InteractionSettingsLayer` (ImGui settings).
Expand Down
Loading
Loading