mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-29 14:00:49 +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:
@@ -231,6 +231,22 @@ public:
|
||||
Standard_EXPORT virtual void SetZLayerSettings (const Graphic3d_ZLayerId theLayerId,
|
||||
const Graphic3d_ZLayerSettings& theSettings) Standard_OVERRIDE;
|
||||
|
||||
//! Returns the maximum Z layer ID.
|
||||
//! First layer ID is Graphic3d_ZLayerId_Default, last ID is ZLayerMax().
|
||||
Standard_EXPORT virtual Standard_Integer ZLayerMax() const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the bounding box of all structures displayed in the Z layer.
|
||||
//! Never fails. If Z layer does not exist nothing happens.
|
||||
Standard_EXPORT virtual void InvalidateZLayerBoundingBox (const Graphic3d_ZLayerId theLayerId) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the bounding box of all structures displayed in the Z layer.
|
||||
//! Never fails. If Z layer does not exist the empty box is returned.
|
||||
Standard_EXPORT virtual Graphic3d_BndBox4f ZLayerBoundingBox (const Graphic3d_ZLayerId theLayerId,
|
||||
const Handle(Graphic3d_Camera)& theCamera,
|
||||
const Standard_Integer theWindowWidth,
|
||||
const Standard_Integer theWindowHeight,
|
||||
const Standard_Boolean theToIgnoreInfiniteFlag) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns pointer to an assigned framebuffer object.
|
||||
Standard_EXPORT virtual Handle(Standard_Transient) FBO() const Standard_OVERRIDE;
|
||||
|
||||
@@ -528,6 +544,13 @@ private:
|
||||
Standard_EXPORT virtual void changePriority (const Handle(Graphic3d_CStructure)& theCStructure,
|
||||
const Standard_Integer theNewPriority) Standard_OVERRIDE;
|
||||
|
||||
//! Returns zoom-scale factor.
|
||||
Standard_EXPORT virtual Standard_Real considerZoomPersistenceObjects (const Graphic3d_ZLayerId theLayerId,
|
||||
const Handle(Graphic3d_Camera)& theCamera,
|
||||
const Standard_Integer theWindowWidth,
|
||||
const Standard_Integer theWindowHeight,
|
||||
const Standard_Boolean theToIgnoreInfiniteFlag) const Standard_OVERRIDE;
|
||||
|
||||
private:
|
||||
|
||||
//! Copy content of Back buffer to the Front buffer.
|
||||
|
Reference in New Issue
Block a user