-
-
Notifications
You must be signed in to change notification settings - Fork 35.2k
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
Capsule: "lineLineMinimumPoints" function returns global temp variables, does not use Capsule fields #26923
Comments
The code was added via #20836 so only @supereggbert can help here. Bard says about the code:
For now, I suggest to move the code as a helper function to |
Since |
@gkjohnson Are you planning to file a PR with a fix? Otherwise I would try to fix it so the issue is resolved for |
I was waiting for a reply from @supereggbert but it seems we may not get one. I can see try to make a PR in the next week that moves the function. But as an aside I do have a couple concerns regarding the Octree example that I'm reminded of here - I've seen multiple cases of users using it and it causing massive build stalls or crashes (ref 1, ref 2, ref 3, ref 4) and I'm wondering how effectively we can maintain a utility like this in the project. An efficient octree implementation would be nice to have though generally I think properly implementing and maintaining a spatial structure like this is a fairly complex task. I'm not sure what you're thoughts are. |
I'm okay with maintaining a simple spatial data structure in this repo but I see a more complex and optimized solution in an external repository. Similar to In general, addons have different priorities/relevance for pure rendering tasks and also different complexity levels. Similar to geometry modifiers, I think spatial data structures are better maintained in external repositories. |
Description
I was looking through the example Capsule file and saw that the "lineLineMinimumPoints" function does not use any of the local "Capsule" members. It also returns the global temp
_v1
and_v2
variables to the caller instead of taking target variables instead of making clones. It seems it's only used in the Octree file for triangle / capsule intersections and only ever takes a line representing the capsule as the first argument.I'd fix and rename the function to something more clear but it's not clear to me exactly what it's supposed to do. Is the function just returning the closest point between the two line segments? Does it belong in the
LineSegment
class? Do we know where the original implementation is referenced from?Solution
Alternatives
None
Additional context
No response
The text was updated successfully, but these errors were encountered: