From 2719e4f8285570345611ef5df27daeebcf4a3b3f Mon Sep 17 00:00:00 2001 From: osa Date: Tue, 11 Dec 2018 13:40:40 +0300 Subject: [PATCH] 0030223: Visualization, TKOpenGl - frustum culling does not clip objects within perspective camera. Fixed multiplication order of Projection and WorldView matrices --- src/OpenGl/OpenGl_BVHTreeSelector.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OpenGl/OpenGl_BVHTreeSelector.cxx b/src/OpenGl/OpenGl_BVHTreeSelector.cxx index b696305e26..396e6efa0a 100644 --- a/src/OpenGl/OpenGl_BVHTreeSelector.cxx +++ b/src/OpenGl/OpenGl_BVHTreeSelector.cxx @@ -93,7 +93,7 @@ void OpenGl_BVHTreeSelector::SetViewVolume (const Handle(Graphic3d_Camera)& theC OpenGl_Vec4d aRightBottomNear (nRight, nBottom, -aNear, 1.0), aLeftTopFar (fLeft, fTop, -aFar, 1.0); OpenGl_Vec4d aRightTopNear (nRight, nTop, -aNear, 1.0), aLeftBottomFar (fLeft, fBottom, -aFar, 1.0); - const OpenGl_Mat4d aViewProj = myWorldViewMat * myProjectionMat; + const OpenGl_Mat4d aViewProj = myProjectionMat * myWorldViewMat; OpenGl_Mat4d anInvWorldView; myWorldViewMat.Inverted (anInvWorldView); -- 2.20.1