Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transform Gizmo Refactor #1085

Open
wants to merge 40 commits into
base: dev
Choose a base branch
from
Open

Conversation

Dhruv-0-Arora
Copy link
Collaborator

@Dhruv-0-Arora Dhruv-0-Arora commented Aug 7, 2024

Description

Refactoring the Transform Gizmos to be a SceneObject.

Changes

  • All of the transform gizmo computations happen in the GizmoSceneObject file. This includes mapping transformations of the mesh to the mirabuf.
  • Changed implementation in ejector, intake, and scoring zones configurations.
  • Removed implementation from SceneRenderer

Hunter's Additions

  • Reworked how a brain is selected for modification/scheme assignment.
  • Added new panel specifically for newly spawned in robots.
  • Moved scheme selection into the config panel.
  • Added GlobalUIControls and GlobalUIComponent to provide access to context controls outside of react components. Probably not the best practice, but make sense considering these context controls will be relevant for the entire lifetime of the application, not just a single component/menu.
  • All current uses of the GizmoSceneObject are via the TransformGizmoControl component. This allows were easy lifetime controls when using the gizmos.
  • Added a move option to the config menu for moving and orientating a robot/field after spawning it.
  • Added "Reset Orientation" button to the transform gizmo controls for resetting rotation back to default.
  • Changed out default mesh for gizmos to a blank mesh instead of a ball.
  • Moved gizmo to the center of the assembly you are moving (center of mass for robots, center of the AA box for fields).
  • Moved newly spawned assemblies to (0, 0 + half of bounding box height, 0) anchored around the center of their bounding box.
  • Removed enter and escape controls for spawning placement/cancellation. Debating adding them back in as the controls for the initial config panel.

JIRA Issue

@Dhruv-0-Arora Dhruv-0-Arora self-assigned this Aug 7, 2024
@Dhruv-0-Arora Dhruv-0-Arora marked this pull request as ready for review August 7, 2024 21:08
@Dhruv-0-Arora Dhruv-0-Arora requested review from a-crowell and LucaHaverty and removed request for a team August 7, 2024 21:08
Copy link
Collaborator

@LucaHaverty LucaHaverty left a comment

Choose a reason for hiding this comment

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

Couple Issues:

Pressing enter when configuring the intake, ejector, or scoring zones makes the gizmo disappear

Spawning a robot, then deleting the assembly before pressing enter leaves the gizmo behind

@Dhruv-0-Arora
Copy link
Collaborator Author

Couple Issues:

Pressing enter when configuring the intake, ejector, or scoring zones makes the gizmo disappear

Spawning a robot, then deleting the assembly before pressing enter leaves the gizmo behind

🫠

Copy link
Member

@BrandonPacewic BrandonPacewic left a comment

Choose a reason for hiding this comment

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

Looks like this has some pretty extensive merge conflicts from #1068.

Copy link
Collaborator

@a-crowell a-crowell left a comment

Choose a reason for hiding this comment

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

One more merge conflict. Other than that, looks good.

Copy link
Member

@BrandonPacewic BrandonPacewic left a comment

Choose a reason for hiding this comment

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

I'm still not sure that this 100% addresses the concerns that @HunterBarclay had.

@Dhruv-0-Arora
Copy link
Collaborator Author

Looks like this has some pretty extensive merge conflicts from #1068.

Yep I just added all the refactoring changes that I could remember

WIP: Migrating scheme selection to a component atm.
WIP: Making a new panel combining input scheme selection and assembly
transformation into one.
This feature also adds additional upgrades and refactoring to how
pausing is handled. It adds the side-effect of when an assembly fails to
be spawned in, the simulation will remain paused for approx. 500 ms.

Also includes global UI controls that can be accessed from anywhere.
Also added in a couple cleanups here and there.
Also finally moved the ground up as well.
@HunterBarclay HunterBarclay removed their request for review September 22, 2024 22:43
@HunterBarclay HunterBarclay self-assigned this Sep 22, 2024
@HunterBarclay HunterBarclay self-requested a review October 11, 2024 17:21
WIP!: Currently not working for removing input schemes from deleted
robots.
The TransformGizmoContro now contains callbacks for when it "receives"
the signal to cancel or accept it's position via the escape and enter
keys respectively.
@HunterBarclay HunterBarclay requested a review from a team as a code owner October 14, 2024 17:29
@HunterBarclay HunterBarclay requested review from PepperLola, azaleacolburn and HunterBarclay and removed request for a team and HunterBarclay October 14, 2024 17:29
@HunterBarclay HunterBarclay requested a review from a team as a code owner October 21, 2024 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor The most important part of software development.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants