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

Debug Tooling, Worldview Refactor #4941

Merged
merged 10 commits into from
Aug 7, 2020

Conversation

Web-eWorks
Copy link
Member

@Web-eWorks Web-eWorks commented Aug 2, 2020

Most of this is described in #4908, but the bits that aren't are as follows:

Matrix4x4 refactor

This one's a bit painful, it refactors matrix construction and adds a "shortcut" symmetric projection matrix function for future work on Screen::Project. However, due to the way it's written, I had to link in std::array to get "easy" initializer list construction with automatic double conversion.
Struck this, going to rethink the implementation a bit.

Debug Tooling Improvements v2

Added extension points to the PerfInfo window, making it a general debug tool interface. Refactored the debug ship spawner to replace the old hardcoded CTRL+F12 spawner (incidentally, only CTRL+F12 works now, the rest of the F12 shortcuts are deprecated in lieu of a much easier to use interface).

Also added a Reload Shaders button to the renderer debug info to complement the F11 shortcut.

Will be merging this soon, as it's blocking on getting #4938 merged in. Would appreciate a quick sanity check review (especially from the Windows side of things, CC @The-EG @fluffyfreak ) to ensure I haven't fouled up MSVC's special heart for STL bugs.

@Web-eWorks
Copy link
Member Author

CC @Gliese852 as this changes a few sectorview things and I'd like his feedback and go/no-go on it!

- Body::GetTargetIndicatorPosition now returns local-space coordinates
- CameraContext has a getter for parent frame, renamed GetCamFrame to GetTempFrame, added GetCameraOrient/Position
- Implemented matrix4x4 utilities to construct from orient+pos, fast inverse transform for position vectors
- Fixed bug where mouse would be locked if held while docking
- Preliminary work on ShipViewController, made WorldView::shipView an unique_ptr (why didn't I do it that way in the first place?)
- Cleaned up some cruft from WorldView and moved to appropriate locations
- Completely changed the way WorldSpaceToScreenSpace etc. works, now no longer requires camera frame
- Added WorldView::RelSpaceToScreenSpace, meant for pigui to use for displaying e.g. body:GetPositionRelTo(player)
- WorldSpaceToScreenSpace now operates on frame-relative coordinates, use RelSpaceToScreenSpace for player-relative coordinates
- Move some less-used signals to PlayerShipController rather than Pi
- Remove WorldView's dependency on newUI
- Remove unused signal connections in WorldView
- Moved playing the 'target selected' sound to PiGui instead of C++
- Removed several unused functions/methods from SectorView
- Removed the WorldView method handler previously responsible for playing the target selected sound
- Better documentation and behavior for pigui.playSfx
@The-EG
Copy link
Contributor

The-EG commented Aug 2, 2020

Builds and runs with MSVC (both the solution and cmake). Didn't do any actual testing other than seeing it run...

@Gliese852
Copy link
Contributor

@Web-eWorks go on it! (regarding maps)

Refactor DebugShipSpawn to fill the ctrl+F12 spawner tool, merge with PerfInfo window
Add extension points to the PerfInfo window for lua to render in
Expose a few more ImGui functions to lua
Remove unnecessary INIT->init redirection function in pigui handlers
@Web-eWorks
Copy link
Member Author

Removed the matrix4x4 changes as they need some more time to cook, but otherwise merging this now!

@Web-eWorks Web-eWorks merged commit 7786287 into pioneerspacesim:master Aug 7, 2020
@Gliese852 Gliese852 mentioned this pull request Sep 6, 2020
3 tasks
@Web-eWorks Web-eWorks deleted the debug-tools branch November 27, 2022 16:51
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.

3 participants