1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0027374: Visualization - optimize management of the scene bounding box

OpenGl_View now caches bounding boxes per Z-layer (instead of bounding box of entire scene in Graphic3d_CView).
Redundant invalidation of cached scene bounding box is now avoided in case
when new presentation attributes are assigned to the graphic structure.

Add a new methods ConsiderZoomPersistenceObjects() and considerZoomPersistenceObjects() in the Graphic3d_CView, OpenGl_View and OpenGl_Layer classes.
Call ConsiderZoomPersistenceObjects() in the V3d_View::FitMinMax method.

std::numeric_limits<T>::lowest() fix
This commit is contained in:
duv
2016-05-25 17:00:59 +03:00
committed by bugmaster
parent 5ae6e53dec
commit 50d06d8fcf
13 changed files with 558 additions and 59 deletions

View File

@@ -3257,7 +3257,11 @@ Standard_Boolean V3d_View::FitMinMax (const Handle(Graphic3d_Camera)& theCamera,
aViewSizeYv = aViewSizeZv;
}
Scale (theCamera, aViewSizeXv * (1.0 + theMargin), aViewSizeYv * (1.0 + theMargin));
Scale (theCamera, aViewSizeXv, aViewSizeYv);
const Standard_Real aZoomCoef = myView->ConsiderZoomPersistenceObjects();
Scale (theCamera, theCamera->ViewDimensions().X() * (aZoomCoef + theMargin), theCamera->ViewDimensions().Y() * (aZoomCoef + theMargin));
return Standard_True;
}