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

ImGui support for bespoke interfaces #911

Merged
merged 3 commits into from
Oct 13, 2022
Merged

ImGui support for bespoke interfaces #911

merged 3 commits into from
Oct 13, 2022

Conversation

Robadob
Copy link
Member

@Robadob Robadob commented Aug 30, 2022

Will require updating the CMake vis hash after Vis PR is merged.

Most development detail can be found in the Vis PR.

I'm happy that this is ready.

Several potential features I've not bothered to implement:

  • Allowing users to change the colour scheme (currently it's fixed to ImGui::Dark).
  • Allowing users to customise the format string for environment property printing (%g is used for floating-point, but this can create unwanted high precision numbers in rare cases)
  • Allowing users to manually position panels within the window (they can move them after sim has started)
  • Allowing users to mark panels begin collapsed.

Vis PR: FLAMEGPU/FLAMEGPU2-visualiser#100
Docs Pr: FLAMEGPU/FLAMEGPU2-docs#110
Ped Nav Example Pr: FLAMEGPU/FLAMEGPU2-pedestrian_navigation-example#1
Ped Nav Example Video: https://youtu.be/9jPfBs81XmE

Copy link
Member

@ptheywood ptheywood left a comment

Choose a reason for hiding this comment

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

Allowing users to change the colour scheme (currently it's fixed to ImGui::Dark).
Allowing users to customise the format string for environment property printing (%g is used for floating-point, but this can create unwanted high precision numbers in rare cases)
Allowing users to manually position panels within the window (they can move them after sim has started)
Allowing users to mark panels begin collapsed.

Some / all of these should be promoted to issues, as they do all sound useful but probably shouldn't block this.


The API changes etc all look fine, and feel free to ignore my nitpicking.

There is an absence of tests though for the new classes (though vis code is probably missing tests in general, possibly for a good reason).

We should atleast open an issue about testing the vis (if I haven't already made one in the past)


As you've noted, the hash needs updating prior to merge too (so the approval is subject to that)

* This class serves as an interface for managing an instance of PanelConfig
* It allows elements to be specified for a UI panel for the visualisation
*/
class PanelVis {
Copy link
Member

Choose a reason for hiding this comment

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

Not super keen on the class name (don't like Vis, but it matches exisitng use so not going to fight it).

VisPanel would make more snse though? otherwise given the existance of ModelVis it implies its currently visualising a panel? Feel completely free to ignor this.

include/flamegpu/visualiser/ModelVis.h Show resolved Hide resolved
src/flamegpu/visualiser/ModelVis.cpp Show resolved Hide resolved
@Robadob
Copy link
Member Author

Robadob commented Oct 13, 2022

Some / all of these should be promoted to issues, as they do all sound useful but probably shouldn't block this.

FLAMEGPU/FLAMEGPU2-visualiser#105

Robadob and others added 3 commits October 13, 2022 14:30
…environment properties.

User's are provided the ability to add environment properties/environment array property elements to user interface panel(s) in the form of input boxes, sliders, drag things and checkboxes.

Additionally, moved the debug menu to ImGui and added the initial random seed to it's items.
This makes it more consistent with rest of ModelVis methods.
Also unified model naming of examples (in particular Circles Spatial3D was listed as bruteforce).
@Robadob
Copy link
Member Author

Robadob commented Oct 13, 2022

This should be ready for merge once CI passes, along with the docs PR. I have updated the linked visualiser to match the merged VIS PR.

After which, the ped example will want updating to point to latest FGPU2 hash.

@Robadob Robadob merged commit 8694ba5 into master Oct 13, 2022
@Robadob Robadob deleted the imgui branch October 13, 2022 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants