Skip to content

Replace motion viewer placeholder with smooth controller model - #643

Merged
nefarius merged 1 commit into
masterfrom
feat/motion-viewer-dualshock-model
Nov 10, 2026
Merged

nefarius merged 1 commit into
masterfrom
feat/motion-viewer-dualshock-model

Conversation

@nefarius

@nefarius nefarius commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features
    • The motion viewer now displays a detailed 3D controller model, including its buttons, ports, and markings, instead of a simplified set of colored shapes.
  • Bug Fixes
    • Controller tilt and grip-down orientations now match the expected physical direction across different yaw angles, making the viewer’s pose representation more accurate.

@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The motion viewer now displays an embedded controller mesh generated by a Python script. The tilt mapping and tests reflect the controller model’s coordinate frame.

Changes: Motion controller viewer

Layer / File(s) Summary
Generate the controller mesh
build/generate_motion_controller.py
The script builds controller parts and writes grouped OBJ geometry with computed normals.
Embed and render the controller model
.gitignore, ControlApp/ControlApp.csproj, ControlApp/Models/Motion/MotionControllerModel.cs, ControlApp/Views/Windows/MotionViewerWindow.xaml, ControlApp/Views/Windows/MotionViewerWindow.xaml.cs, ControlApp/Resources/Models/README.md, ControlApp.Tests/MotionControllerModelTests.cs
The project embeds the OBJ resource. The viewer loads its named parts and materials, positions the camera on the grip side, and displays the meshes. The README documents the asset, and tests check its mesh data and dimensions.
Map orientation to the model frame
ControlApp/Models/Motion/MotionViewerRotation.cs, ControlApp.Tests/MotionViewerRotationTests.cs
The tilt mapping changes to match the controller model frame. Tests check the updated rotations and landmark directions across multiple yaw angles.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant MotionViewerWindow
  participant MotionControllerModel
  participant MotionControllerObjResource
  MotionViewerWindow->>MotionControllerModel: Load model parts and materials
  MotionControllerModel->>MotionControllerObjResource: Read embedded OBJ
  MotionControllerObjResource-->>MotionControllerModel: Return OBJ data
  MotionControllerModel-->>MotionViewerWindow: Return named model parts
Loading
Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly summarizes the main change: replacing the motion viewer placeholder with a smooth controller model.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Git: CodeRabbit could not clone the repository, so clone-backed analysis was skipped and this review may be incomplete. Verify repository clone access, such as SSH credentials, before requesting another full review. If clone access is intentionally unavailable, use path_filters to narrow the review scope.

I’m a rabbit, and I hop past the mesh,
As OBJ parts take their shape.
The viewer turns to the grip-side view,
While tilt points the right way.
I nibble a carrot beside the LEDs,
Then bound away with a happy thump.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d4aa78d1-b003-4261-a851-f4186f5a82b8
Commits

Reviewing files that changed from the base of the PR and between 87f53c6 and 23cc2fa.

Files ignored due to path filters: 1

  • ControlApp/Resources/Models/MotionController.obj is excluded by !**/*.obj
Files selected for processing: 10

  • .gitignore
  • ControlApp.Tests/MotionControllerModelTests.cs
  • ControlApp.Tests/MotionViewerRotationTests.cs
  • ControlApp/ControlApp.csproj
  • ControlApp/Models/Motion/MotionControllerModel.cs
  • ControlApp/Models/Motion/MotionViewerRotation.cs
  • ControlApp/Resources/Models/README.md
  • ControlApp/Views/Windows/MotionViewerWindow.xaml
  • ControlApp/Views/Windows/MotionViewerWindow.xaml.cs
  • build/generate_motion_controller.py

Included review availability: This review used your included allowance. 3 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.

@nefarius
nefarius merged commit 1bc05e1 into master Nov 10, 2026
9 checks passed
@nefarius
nefarius deleted the feat/motion-viewer-dualshock-model branch November 12, 2026 11:34
@nefarius nefarius mentioned this pull request Nov 12, 2026
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.

1 participant