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:
@@ -123,7 +123,7 @@ void Graphic3d_Structure::Clear (const Standard_Boolean theWithDestruction)
|
||||
myCStructure->ContainsFacet = 0;
|
||||
myStructureManager->Clear (this, theWithDestruction);
|
||||
|
||||
Update();
|
||||
Update (true);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@@ -363,7 +363,7 @@ void Graphic3d_Structure::SetVisible (const Standard_Boolean theValue)
|
||||
|
||||
myCStructure->visible = isVisible;
|
||||
myCStructure->OnVisibilityChanged();
|
||||
Update();
|
||||
Update (true);
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
@@ -1385,7 +1385,7 @@ void Graphic3d_Structure::Connect (const Handle(Graphic3d_Structure)& theStructu
|
||||
GraphicConnect (theStructure);
|
||||
myStructureManager->Connect (this, theStructure);
|
||||
|
||||
Update();
|
||||
Update (true);
|
||||
}
|
||||
else // Graphic3d_TOC_ANCESTOR
|
||||
{
|
||||
@@ -1422,7 +1422,7 @@ void Graphic3d_Structure::Disconnect (const Handle(Graphic3d_Structure)& theStru
|
||||
myStructureManager->Disconnect (this, theStructure);
|
||||
|
||||
CalculateBoundBox();
|
||||
Update();
|
||||
Update (true);
|
||||
}
|
||||
else if (RemoveAncestor (aStructure))
|
||||
{
|
||||
@@ -1562,7 +1562,7 @@ void Graphic3d_Structure::SetTransform (const TColStd_Array2OfReal& theMat
|
||||
myCStructure->UpdateTransformation();
|
||||
myStructureManager->SetTransform (this, aNewTrsf);
|
||||
|
||||
Update();
|
||||
Update (true);
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
@@ -1986,14 +1986,15 @@ void Graphic3d_Structure::PrintNetwork (const Handle(Graphic3d_Structure)& theSt
|
||||
//function : Update
|
||||
//purpose :
|
||||
//=============================================================================
|
||||
void Graphic3d_Structure::Update() const
|
||||
void Graphic3d_Structure::Update (const bool theUpdateLayer) const
|
||||
{
|
||||
if (IsDeleted())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
myStructureManager->Update (myStructureManager->UpdateMode());
|
||||
myStructureManager->Update (myStructureManager->UpdateMode(),
|
||||
theUpdateLayer ? myCStructure->ZLayer() : Graphic3d_ZLayerId_UNKNOWN);
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
|
Reference in New Issue
Block a user