0030640: Visualization, Graphic3d_Camera - add option creating Projection matrix...
[occt.git] / src / SelectMgr / SelectMgr_ViewerSelector.cxx
index 6f6171d..30805b3 100644 (file)
@@ -652,7 +652,8 @@ void SelectMgr_ViewerSelector::TraverseSensitives()
 
       // define corresponding frustum builder parameters
       Handle(SelectMgr_FrustumBuilder) aBuilder = new SelectMgr_FrustumBuilder();
-      aBuilder->SetProjectionMatrix (mySelectingVolumeMgr.ProjectionMatrix());
+      aBuilder->SetProjectionMatrix (mySelectingVolumeMgr.ProjectionMatrix(),
+                                     !aCamera.IsNull() && aCamera->IsZeroToOneDepth());
       aBuilder->SetWorldViewMatrix (SelectMgr_ViewerSelector_THE_IDENTITY_MAT);
       aBuilder->SetWindowSize (aWidth, aHeight);
       aMgr = mySelectingVolumeMgr.ScaleAndTransform (1, aTFrustum, aBuilder);