sofa
sofa copied to clipboard
[Core] Allow different gravity vectors in Nodes
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).
[ci-build][with-all-tests]
Interesting change @alxbilger
The Gravity component is available for this. But your change should make it more straightforward, I will give it a try
Tested and approved :+1:
What do you think @alxbilger about setting gravity to "0 0 0" as default value?
What do you think @alxbilger about setting gravity to "0 0 0" as default value?
I think it will break a lot of scenes
I also think about creating a graph link instead of a simple copy:
if (!worldGravity_.isSet())
{
worldGravity_.setParent(&c); ///< Gravity IN THE WORLD COORDINATE SYSTEM.
}
What do you think?
I think it will break a lot of scenes
I like it baby :fire_engine: :fire:
I also think about creating a graph link instead of a simple copy:
:thinking: why would you do that? I am unsure about side effect
I also think about creating a graph link instead of a simple copy:
why @alxbilger
So that it can update if its parent has changed
To be noted, this change would only work in XML : SimpleAPI or Python do not change the "isSet" property as does the XML. I investigate on this currently
If #4911 is solved, then #4910 could replace this PR @alxbilger
@hugtalbot, isSet is switched to "true" at first value change (eg: any begin/write edit). Can you explain a bit what kind of behavior should be expected ?