BIMsurfer icon indicating copy to clipboard operation
BIMsurfer copied to clipboard

Frustum.intersectsWorldAABB(minmax)

Open muren400 opened this issue 4 years ago • 2 comments

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

muren400 avatar May 15 '20 16:05 muren400

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.

aothms avatar May 17 '20 09:05 aothms

send you a pull request.

https://github.com/opensourceBIM/BIMsurfer/pull/83

muren400 avatar Feb 04 '21 15:02 muren400