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
[Collision.Detection] Give current intersection methods as parameter to intersection functions #4583
Merged
hugtalbot
merged 9 commits into
sofa-framework:master
from
fredroy:intersections_as_param
Mar 28, 2024
Merged
[Collision.Detection] Give current intersection methods as parameter to intersection functions #4583
hugtalbot
merged 9 commits into
sofa-framework:master
from
fredroy:intersections_as_param
Mar 28, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fredroy
added
pr: fix
Fix a bug
pr: status to review
To notify reviewers to review this pull-request
pr: dev meeting topic
PR to be discussed in sofa-dev meeting
labels
Mar 12, 2024
fredroy
force-pushed
the
intersections_as_param
branch
from
March 15, 2024 06:45
e4f9d57
to
26012d8
Compare
[ci-build][with-all-tests] |
fredroy
force-pushed
the
intersections_as_param
branch
3 times, most recently
from
March 19, 2024 00:56
fdf45e6
to
0ddc251
Compare
[ci-build][with-all-tests] |
fredroy
force-pushed
the
intersections_as_param
branch
from
March 20, 2024 00:14
0ddc251
to
da558da
Compare
[ci-build][with-all-tests][force-full-build] |
fredroy
force-pushed
the
intersections_as_param
branch
from
March 20, 2024 06:43
c7dcfd3
to
5a71332
Compare
fredroy
force-pushed
the
intersections_as_param
branch
from
March 25, 2024 23:51
5a71332
to
61a4cbf
Compare
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
Mar 27, 2024
bakpaul
pushed a commit
to bakpaul/sofa
that referenced
this pull request
Apr 8, 2024
…to intersection functions (sofa-framework#4583) * give current intersection methods as parameter to intersection functions * test compat method * add deprecation messages * more deprecations (stored pointer to intersection) and remove warnings * Fix SFINAE tests * fix typos and compat * fix infinite loop * add more info for depreciation --------- Co-authored-by: Hugo <hugo.talbot@sofa-framework.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The design of Intersection/Intersector is really "special" in the sense that:
And it was made such as one could add more intersect() method for new primitives for an existing "Intersection", e.g MinProximityIntersection and MeshMinProximityIntersection, which add triangles, etc methods to MinProximityIntersection. Note that even if it is called "Intersection" it is not a "Intersection" 🤪
There is kind of mechanism with a IntersectorCreator/IntersectorFactory which does the "plugin" automatically.
The problem is that the intersector gets a pointer to its intersection at the load-time (when the dll is loaded).
The intersector needs the intersection to get alarm/contact distance (defined for all Intersection) or custom parameters (useSurfaceNormal for MinProximityIntersection)
Consequence: if there are multiple simulation (in multiple thread) in the same time, a different thread will get a pointer to an other Intersection while doing its intersect code.
In the end, this PR modifies all the intersect/canIntersect functions to get the intersection method (as if they were static functions in reality) and avoid race conditions. The pipeline needs also to be modified.
[The first version of this branch was using a IntersectionParameters storing alarm, contact distance and given as const ref, but it could not handle custom parameters]
Still need to be done:
compat/warnings, etcBy 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