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

[All] VisualModel: implement NVI for init/updateVisual() #4827

Merged
merged 12 commits into from
Jul 29, 2024

Conversation

fredroy
Copy link
Contributor

@fredroy fredroy commented Jul 12, 2024

... and add VisualParameters as a parameter to their signature.

Based on

Continue on what has been introduced by:

Little difference, this PR does not only do the NVI thing but it adds the visualparameters as input.
This seems consistent (to me) with the fact that init/update visual as supposed to be called when there is a draw context (like drawVisual).
The nice side effect (and it was the intent at the beginning) is that updatevisual wont be called anymore if the component state is wrong, showVisualModels flag is not set or not enabled.

+ cleanings here and there in the visual/gl components

Unfortunately, breaking ⚠️

[ci-depends-on https://github.com/sofa-framework/SofaPython3/pull/423]
[ci-depends-on https://github.com/sofa-framework/SofaSphFluid/pull/1]

TEMP:
[ci-depends-on https://github.com/sofa-framework/BeamAdapter/pull/153]


By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).


Reviewers will merge this pull-request only if

  • it builds with SUCCESS for all platforms on the CI.
  • it does not generate new warnings.
  • it does not generate new unit test failures.
  • it does not generate new scene test failures.
  • it does not break API compatibility.
  • it is more than 1 week old (or has fast-merge label).

@fredroy fredroy added enhancement About a possible enhancement pr: breaking Change possibly inducing a compilation error pr: fix Fix a bug pr: status to review To notify reviewers to review this pull-request pr: clean Cleaning the code labels Jul 12, 2024
@sofabot
Copy link
Collaborator

sofabot commented Jul 12, 2024

[ci-depends-on] detected during build #2.

To unlock the merge button, you must

@fredroy
Copy link
Contributor Author

fredroy commented Jul 12, 2024

[ci-build][with-all-tests]

@sofabot
Copy link
Collaborator

sofabot commented Jul 12, 2024

[ci-depends-on] detected during build #3.

To unlock the merge button, you must

@sofabot
Copy link
Collaborator

sofabot commented Jul 12, 2024

[ci-depends-on] detected during build #4.

To unlock the merge button, you must

@@ -54,6 +54,32 @@ void VisualModel::drawVisual(const VisualParams* vparams)
doDrawVisual(vparams);
}

void VisualModel::updateVisual(const VisualParams* vparams)
Copy link
Contributor

Choose a reason for hiding this comment

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

I have a deep feeling of cleaness when I see this kind of refactoring (factoring things in the base class)

@sofabot
Copy link
Collaborator

sofabot commented Jul 12, 2024

[ci-depends-on] detected during build #5.

To unlock the merge button, you must

@sofabot
Copy link
Collaborator

sofabot commented Jul 12, 2024

[ci-depends-on] detected during build #6.

To unlock the merge button, you must

@sofabot
Copy link
Collaborator

sofabot commented Jul 15, 2024

[ci-depends-on] detected during build #7.

To unlock the merge button, you must

@fredroy
Copy link
Contributor Author

fredroy commented Jul 16, 2024

[ci-build][with-all-tests][force-full-build]

@sofabot
Copy link
Collaborator

sofabot commented Jul 16, 2024

[ci-depends-on] detected during build #8.

To unlock the merge button, you must

@sofabot
Copy link
Collaborator

sofabot commented Jul 24, 2024

[ci-depends-on] detected during build #9.

To unlock the merge button, you must

@hugtalbot hugtalbot added pr: status ready Approved a pull-request, ready to be squashed and removed pr: status to review To notify reviewers to review this pull-request labels Jul 24, 2024
@sofabot
Copy link
Collaborator

sofabot commented Jul 25, 2024

[ci-depends-on] detected during build #10.

To unlock the merge button, you must

@sofabot
Copy link
Collaborator

sofabot commented Jul 26, 2024

[ci-depends-on] detected during build #11.

To unlock the merge button, you must

@sofabot
Copy link
Collaborator

sofabot commented Jul 26, 2024

[ci-depends-on] detected during build #12.

To unlock the merge button, you must

@sofabot
Copy link
Collaborator

sofabot commented Jul 29, 2024

[ci-depends-on] detected during build #13.

To unlock the merge button, you must

@hugtalbot
Copy link
Contributor

[ci-build][with-all-tests]

@sofabot
Copy link
Collaborator

sofabot commented Jul 29, 2024

[ci-depends-on] detected during build #14.

All dependencies are merged/closed and all ExternalProject pointers are up-to-date. Congrats! 👍

@hugtalbot hugtalbot merged commit e092b4a into sofa-framework:master Jul 29, 2024
11 checks passed
@hugtalbot hugtalbot deleted the upgrade_updatevisual branch July 29, 2024 09:36
@hugtalbot hugtalbot added this to the v24.12 milestone Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement About a possible enhancement pr: breaking Change possibly inducing a compilation error pr: clean Cleaning the code pr: fix Fix a bug pr: status ready Approved a pull-request, ready to be squashed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants