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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user