X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSet%2FPartSet_PreviewPlanes.h;h=1e76e0d351a4d4a4623045235fe3d2eff1b4b875;hb=26a7489eb80cc314d2719eb88c243affff2d7428;hp=6ea902663defde7cbefcb878abdf6709e8d5e679;hpb=49d5a27258260087aad5e7ca30d6863e08a186d1;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_PreviewPlanes.h b/src/PartSet/PartSet_PreviewPlanes.h index 6ea902663..1e76e0d35 100755 --- a/src/PartSet/PartSet_PreviewPlanes.h +++ b/src/PartSet/PartSet_PreviewPlanes.h @@ -1,8 +1,22 @@ -// Copyright (C) 2014-20xx CEA/DEN, EDF R&D - -// File: PartSet_PreviewPlanes.h -// Created: 22 Mar 2016 -// Author: Natalia ERMOLAEVA +// Copyright (C) 2014-2017 CEA/DEN, EDF R&D +// +// 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 PartSet_PreviewPlanes_H #define PartSet_PreviewPlanes_H @@ -15,11 +29,6 @@ class ModuleBase_IWorkshop; -/// the plane edge width -#define SKETCH_WIDTH "4" -/// face of the square-face displayed for selection of general plane -#define PLANE_SIZE "200" - /** * \class PartSet_PreviewPlanes * \ingroup Modules @@ -47,6 +56,11 @@ public: /// \return boolean value bool isPreviewDisplayed() const { return myPreviewDisplayed; } + /// Returns true if the shape is one of the preview shapes + /// \param theShape a shape to be checked + /// \return boolean value + bool isPreviewShape(std::shared_ptr theShape); + /// Erase preview planes /// \param theWorkshop the application workshop void erasePreviewPlanes(ModuleBase_IWorkshop* theWorkshop); @@ -60,8 +74,8 @@ private: /// \param theOrigin an origin of the plane /// \param theNorm a normal vector of the plane /// \param theRGB a color of plane presentation [r, g, b] array - AISObjectPtr createPreviewPlane(std::shared_ptr theOrigin, - std::shared_ptr theNorm, + AISObjectPtr createPreviewPlane(std::shared_ptr theOrigin, + std::shared_ptr theNorm, const int theRGB[3]); private: