-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
Triangle: Add setFromAttributeAndIndices(). #22404
Conversation
A similar method was added 9 years ago without demand. I am not sure it is used. @makc ? What is the use case? |
@WestLangley like I said basically to get a Triangle out of clicked face, but it makes more sense to replace the method rather than add a new one |
btw, in my case, I came to Triangle docs page when looping over vertices looking for a one-liner to calculate face area. I did not think there was a method like setFromPointsAndIndices, but there was - unfortunately, it was outdated, too |
Many math methods were introduced with the initial commits without a concrete usage in the library. The methods represented a basic and reasonable API of math classes. However, just because the repo does not use a method right now it does not necessarily mean we should remove it. At least it should not be a rule of thumb. Especially since most of the math methods are compact and do not noticeably impact the complexity and size of the core. Hence, I vote to add |
@Mugen87 I think you were the only one who ever suggested we remove a method for that reason. ;-) |
Hmm, I guess it's not much code anyway... |
Thanks! |
Related issue: Fixed #22337.
Description
Added a buffer attribute version of
setFromPointsAndIndices()
.