Salome HOME
Workaround for the problem that the local selection may be initialized without openin...
[modules/gui.git] / src / OCCViewer / OCCViewer_Utilities.h
index 484494543a2c828449a8cab5504ecd4da83d95ad..68f845a8f303f27ed3455422e03669e25c49718a 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2015  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2014-2016  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -63,6 +63,23 @@ 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 );
 };
 
 #endif // OCCVIEWER_UTILITIES_H