]> OCCT Git - occt.git/commit
Visualization - Fix method to transform AABB (#735)
authorRodrigo Brayner Lyra <rodrigo-brayner.a.lyra@capgemini.com>
Tue, 7 Oct 2025 19:19:11 +0000 (20:19 +0100)
committerGitHub <noreply@github.com>
Tue, 7 Oct 2025 19:19:11 +0000 (20:19 +0100)
commitb295b40387f2275b1d1705eb89a9afabea0e48cd
tree5eb5d06368a1dc75fca8f9dd955d65101eca8eec
parent6b431882bc25c72b98eb550c072084f2770dc75b
Visualization - Fix method to transform AABB (#735)

Replace the incorrect implementation of Axis Aligned Bounding Boxes transformation to Jim Arvo's efficient AABB transformation algorithm described in his chapter in the Graphics Gems (1990) book.

The algorithm simplifies the number of operations necessary to transform the AABB. Instead of transforming the eight vertices of the original AABB, and then computing the bounding box of the transformed vertices, Arvo's algorithm works by forming both products for each component of the min and max point, and summing the smallest/largest terms, we arrive at the minimal/maximal value.
src/FoundationClasses/TKMath/BVH/BVH_Box.hxx
src/Visualization/TKService/GTests/FILES.cmake
src/Visualization/TKService/GTests/Graphic3d_BndBox_Test.cxx [new file with mode: 0644]
src/Visualization/TKService/Graphic3d/Graphic3d_Structure.cxx
src/Visualization/TKService/Graphic3d/Graphic3d_Structure.hxx