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

aabb2d #355

Merged
merged 12 commits into from
Dec 6, 2023
Merged

aabb2d #355

merged 12 commits into from
Dec 6, 2023

Conversation

duarm
Copy link
Contributor

@duarm duarm commented Nov 11, 2023

aabb2d functionality, just renamed every box.h procedure + documentation, for now. Closes #349

TODO

  • Tests
  • Any functions which do not make sense in 2d?
  • More functions
    • box to aabb2d
    • _sphere -> _circle
    • _copy

Namespace

_aabb2d_ ?
_aabb2_ ?

@recp
Copy link
Owner

recp commented Nov 13, 2023

@duarm thanks for the PR,

Any functions which do not make sense in 2d?

I couldn't see any.

More functions (box to aabb2d?)

That would be nice 👍

@recp
Copy link
Owner

recp commented Dec 2, 2023

@duarm ping.

@duarm duarm marked this pull request as ready for review December 3, 2023 00:02
@duarm
Copy link
Contributor Author

duarm commented Dec 3, 2023

I've added a new _copy function, Renamed the _sphere -> _circle, + some fixes.

I'm using these functions on my project, and might add more later, along with the tests since I'm a little busy, if someone doesn't do it before me

@recp
Copy link
Owner

recp commented Dec 3, 2023

@duarm thanks 👍

@duarm
Copy link
Contributor Author

duarm commented Dec 6, 2023

You might want to review this and merge if you want, before the new release. Mark as experimental or something like that, since there are no tests (box.h also doesnt have tests). I can open a new PR for more functions and tests.

include/cglm/aabb2d.h Outdated Show resolved Hide resolved
@recp
Copy link
Owner

recp commented Dec 6, 2023

I can open a new PR for more functions and tests.

Sure thanks, we can merge this and get more functions and tests later 👍

*/
CGLM_INLINE
bool
glm_aabb2d_frustum(vec2 aabb[2], vec4 planes[6]) {
Copy link
Owner

@recp recp Dec 6, 2023

Choose a reason for hiding this comment

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

if you dont use this, maybe we should remove this func for now and bring back when it is well defined. Because frustum is 3D, since there is no Z here intersection could only be done with two axes e.g. far & near planes or sum of them ...

Any ideas?

Copy link
Contributor Author

@duarm duarm Dec 6, 2023

Choose a reason for hiding this comment

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

I agree we should remove this for now, just renamed the function and removed the z axis, I'm not using it, we can add it back if someone needs it

@recp recp merged commit 05d4587 into recp:master Dec 6, 2023
48 checks passed
@recp
Copy link
Owner

recp commented Dec 6, 2023

@duarm many thanks, the PR is merged 🚀 additional fixes, improvements can be done with another PRs

@duarm duarm deleted the aabb2d branch December 6, 2023 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2d aabb
2 participants