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

Frustum.intersectsWorldAABB(minmax) #72

Open
muren400 opened this issue May 15, 2020 · 2 comments
Open

Frustum.intersectsWorldAABB(minmax) #72

muren400 opened this issue May 15, 2020 · 2 comments

Comments

@muren400
Copy link

Hi,

the function Frustum.intersectsWorldAABB(minmax) is supposed to receive an AABB defined by its min Vector and its Dimensions.

Tests for intersection with World-space AABB, which is assumed to be: [xmin, ymin, zmin, xwidth, ywidth, zwidth]

But as I unterstand the algorithm, it should rather be a Minimum Vector and a Maximum Vector. Otherwise i get wrong results in TilingRenderLayer.cull(node) (line 88)

Also the name minmax seems a bit confusing when the second Component is supposed to be width, height and depth.

Thanks,
Andreas

@aothms
Copy link
Member

aothms commented May 17, 2020

I think you're right. Thanks for spotting this. I find the code hard to read to be honest. Perhaps if you already took the energy to understand what's written there perhaps you can rewrite it into glmatrix/vec3 operations so that it reads a bit more like vector math (it's probably some sort of dot product) and is easier to read. Or otherwise just submit a PR that fixes the issues you mentioned. Thanks in advance.

muren400 pushed a commit to muren400/BIMsurfer that referenced this issue Feb 4, 2021
changed minmax from [[xmin, ymin, zmin], [xwidth, ywidth, zwidth]]
to [[xmin, ymin, zmin], [xmax, ymax, zmax]]
@muren400
Copy link
Author

muren400 commented Feb 4, 2021

send you a pull request.

#83

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

No branches or pull requests

2 participants