X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FVTKViewer%2FVTKViewer_Utilities.h;h=bc3b66c3d9880a355e714cc9caa0fe0d37be4935;hb=refs%2Fheads%2Fngr%2Fpython3_dev_pv5.4;hp=eb8b3ca1694791620e3678dcba804fa2cf14a155;hpb=2e750f9ded92337bc3c44e9d7388180974cc4a43;p=modules%2Fgui.git diff --git a/src/VTKViewer/VTKViewer_Utilities.h b/src/VTKViewer/VTKViewer_Utilities.h index eb8b3ca16..bc3b66c3d 100755 --- a/src/VTKViewer/VTKViewer_Utilities.h +++ b/src/VTKViewer/VTKViewer_Utilities.h @@ -1,18 +1,71 @@ +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + #ifndef VTKVIEWER_UTILITIES_H #define VTKVIEWER_UTILITIES_H +#include "VTKViewer.h" + class vtkRenderer; +class vtkActorCollection; -extern void ResetCamera(vtkRenderer* theRenderer, int theUsingZeroFocalPoint = false); -extern int ComputeVisiblePropBounds(vtkRenderer* theRenderer, float theBounds[6]); -extern void ResetCameraClippingRange(vtkRenderer* theRenderer); +VTKVIEWER_EXPORT +extern +void +ResetCamera(vtkRenderer* theRenderer, + int theUsingZeroFocalPoint = false); -#ifndef max -#define max(a,b) (((a) > (b)) ? (a) : (b)) -#endif +VTKVIEWER_EXPORT +extern +int +ComputeVisiblePropBounds(vtkRenderer* theRenderer, + double theBounds[6]); -#ifndef min -#define min(a,b) (((a) < (b)) ? (a) : (b)) -#endif +VTKVIEWER_EXPORT +extern +int +ComputeBounds(vtkActorCollection* theCollection, + double theBounds[6]); + +VTKVIEWER_EXPORT +extern +void +ResetCameraClippingRange(vtkRenderer* theRenderer); +VTKVIEWER_EXPORT +extern +bool +ComputeTrihedronSize(vtkRenderer* theRenderer, + double& theNewSize, + const double theSize, + const double theSizeInPercents); +VTKVIEWER_EXPORT +extern +bool IsBBEmpty(vtkRenderer* theRenderer); +VTKVIEWER_EXPORT +extern +bool ComputeBBCenter(vtkRenderer* theRenderer, + double theCenter[3]); +VTKVIEWER_EXPORT +extern +bool isBoundValid(double* theBounds); #endif