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

Delete set_all, set_axis, and get_axis methods from Vector2/3/3i/4/4i #66133

Merged
merged 2 commits into from
Oct 3, 2022

Conversation

aaronfranke
Copy link
Member

@aaronfranke aaronfranke commented Sep 19, 2022

set_all is not a very useful method, it was only used in one place in BVH. However, the rest of the BVH code just iterates over the axis count, so this PR changes the set_all code to use this approach and removes set_all. Also, set_all was broken in Vector4, which is what got me investigating this method in the first place.

I deleted the set_axis and get_axis methods because they are not used internally anywhere (except for the tests) and they do the same thing as the array operator anyway. Also, Vector2i did not have it.

@aaronfranke aaronfranke added this to the 4.0 milestone Sep 19, 2022
@aaronfranke aaronfranke requested review from a team as code owners September 19, 2022 20:29
@aaronfranke aaronfranke changed the title Remove set_all, set_axis, and get_axis methods from Vector2/2i/3/3i/4/4i Remove set_all, set_axis, and get_axis methods from Vector2/3/3i/4/4i Sep 19, 2022
@aaronfranke aaronfranke changed the title Remove set_all, set_axis, and get_axis methods from Vector2/3/3i/4/4i Delete set_all, set_axis, and get_axis methods from Vector2/3/3i/4/4i Sep 19, 2022
@akien-mga
Copy link
Member

I deleted the set_axis and get_axis methods because they are not used internally anywhere (except for the tests) and they do the same thing as the array operator anyway. Also, Vector2i did not have it.

Can all language bindings use the C++ array operators? How does it work in GDExtension?

@aaronfranke
Copy link
Member Author

GDScript can use the array operator. C# and GDExtension C++ each have the vector types implemented natively in their language with array operators of their own. I don't know how it works for non-C++ GDExtension.

Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

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

Nobody seems opposed to it so let's go.

@akien-mga akien-mga merged commit d9a3888 into godotengine:master Oct 3, 2022
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants