X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FOCCViewer%2FOCCViewer_Utilities.h;h=7db427e50ebd56b899b3d9dc7f3d7b71e540ac6c;hb=797f7c8b3ebf8d8a1eabc9082f8bd79f6f7ea413;hp=73b32e11bffdcd97c798a0a19eb1362ddda7baad;hpb=d6bd12111347879cd8dbe1a15ac4d6ba32ce0d6b;p=modules%2Fgui.git diff --git a/src/OCCViewer/OCCViewer_Utilities.h b/src/OCCViewer/OCCViewer_Utilities.h index 73b32e11b..7db427e50 100755 --- a/src/OCCViewer/OCCViewer_Utilities.h +++ b/src/OCCViewer/OCCViewer_Utilities.h @@ -63,6 +63,25 @@ public: */ static bool isDialogOpened( OCCViewer_ViewWindow* theView, const QString& theName ); + /*! + * Get bounding box of visible objects. + * \param theView defined occ view + * \param theBounds used to return bounds of the bounding box + * \return \c true if the bounding box is computed + */ + static bool computeVisibleBounds( const Handle(V3d_View) theView, double theBounds[6] ); + + /*! + * Compute the bounding box center of visible objects. + * \param theView defined occ view + * \param theX used to return X coordinate of the bounding box center + * \param theY used to return Y coordinate of the bounding box center + * \param theZ used to return Z coordinate of the bounding box center + * \return \c true if the bounding box center is computed + */ + static bool computeVisibleBBCenter( const Handle(V3d_View) theView, double& theX, double& theY, double& theZ ); + + static bool computeSceneBBCenter( const Handle(V3d_View) theView, double& theX, double& theY, double& theZ ); }; #endif // OCCVIEWER_UTILITIES_H