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

Rect2 and Aabb do not implement any methods #864

Closed
parasyte opened this issue Feb 19, 2022 · 0 comments · Fixed by #867
Closed

Rect2 and Aabb do not implement any methods #864

parasyte opened this issue Feb 19, 2022 · 0 comments · Fixed by #867
Labels
c: core Component: core (mod core_types, object, log, init, ...) feature Adds functionality to the library
Milestone

Comments

@parasyte
Copy link
Contributor

parasyte commented Feb 19, 2022

Compare the Rect2 implementation to the Godot Rect2 type. I see the same issue with the Aabb type.

I wanted to use the has_point method, but it would be nice to have all of them.

@parasyte parasyte added the quality-of-life No new functionality, but improves ergonomics/internals label Feb 19, 2022
@Bromeon Bromeon added c: core Component: core (mod core_types, object, log, init, ...) feature Adds functionality to the library and removed quality-of-life No new functionality, but improves ergonomics/internals labels Feb 20, 2022
@Bromeon Bromeon added this to the v0.10.1 milestone Feb 20, 2022
bors bot added a commit that referenced this issue Jul 16, 2022
867: Implement methods on Rect2 and Aabb r=Bromeon a=parasyte

The docs are based on the Godot documentation for these types, and the code is based on the C++ that implements them.

Only documented methods are implemented here. This is especially notable for the `Aabb` type, which has many methods in C++ which are not documented for GDScript.

I also took some liberties with a few method names and types. For instance, `Rect2::grow_margin` takes an enum argument, and `Aabb::get_endpoint` returns `Option<Vector3>`. These are different from the GDScript counterparts. `Aabb::get_area` was renamed to `Aabb::get_volume`, etc.

Finally, I haven't added any tests for `Aabb` because I did that file last and got bored/lazy before writing any tests (this is what happens when you are not adamant about TDD). The `Rect2` tests did help find plenty of minor bugs, so it is worthwhile to test `Aabb`.

Closes #864

Co-authored-by: Jay Oster <jay@kodewerx.org>
Co-authored-by: Jan Haller <bromeon@gmail.com>
bors bot added a commit that referenced this issue Jul 16, 2022
867: Implement methods on Rect2 and Aabb r=Bromeon a=parasyte

The docs are based on the Godot documentation for these types, and the code is based on the C++ that implements them.

Only documented methods are implemented here. This is especially notable for the `Aabb` type, which has many methods in C++ which are not documented for GDScript.

I also took some liberties with a few method names and types. For instance, `Rect2::grow_margin` takes an enum argument, and `Aabb::get_endpoint` returns `Option<Vector3>`. These are different from the GDScript counterparts. `Aabb::get_area` was renamed to `Aabb::get_volume`, etc.

Finally, I haven't added any tests for `Aabb` because I did that file last and got bored/lazy before writing any tests (this is what happens when you are not adamant about TDD). The `Rect2` tests did help find plenty of minor bugs, so it is worthwhile to test `Aabb`.

Closes #864

Co-authored-by: Jay Oster <jay@kodewerx.org>
Co-authored-by: Jan Haller <bromeon@gmail.com>
@bors bors bot closed this as completed in 2163285 Jul 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: core Component: core (mod core_types, object, log, init, ...) feature Adds functionality to the library
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants