Salome HOME
A new point is inserted on existing segment. Line/spline curve type.
[modules/hydro.git] / src / HYDROCurveCreator / CurveCreator_Utils.h
1 // Copyright (C) 2013  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 #ifndef CURVECREATOR_UTILS_H
21 #define CURVECREATOR_UTILS_H
22
23 #include "CurveCreator_Macro.hxx"
24
25 #include <gp_Pnt.hxx>
26 #include <V3d_View.hxx>
27
28 class CurveCreator_Utils
29 {
30 public:
31
32     /*!
33    * \brief Returns the point clicked in 3D view.
34    *
35    * \param x The X coordinate in the view.
36    * \param y The Y coordinate in the view.
37    * \param theView View where the given point takes place.
38    * \retval gp_Pnt Returns the point clicked in 3D view
39    */
40   CURVECREATOR_EXPORT static void ConvertPointToClick( const gp_Pnt& thePoint,
41                                                        Handle(V3d_View) theView,
42                                                        int& x, int& y );
43
44   /*!
45    * \brief Returns the point clicked in 3D view.
46    *
47    * \param x The X coordinate in the view.
48    * \param y The Y coordinate in the view.
49    * \param theView View where the given point takes place.
50    * \retval gp_Pnt Returns the point clicked in 3D view
51    */
52   CURVECREATOR_EXPORT static gp_Pnt ConvertClickToPoint( int x, int y, Handle(V3d_View) theView );
53
54 };
55
56 #endif // CURVECREATOR_UTILS_H