Salome HOME
Merge remote-tracking branch 'origin/BR_1321_ECW' into BR_DEMO
[modules/hydro.git] / src / HYDROPy / CAS / gp_XY.sip
1 // Copyright (C) 2014-2015  EDF-R&D
2 // This library is free software; you can redistribute it and/or
3 // modify it under the terms of the GNU Lesser General Public
4 // License as published by the Free Software Foundation; either
5 // version 2.1 of the License.
6 //
7 // This library is distributed in the hope that it will be useful,
8 // but WITHOUT ANY WARRANTY; without even the implied warranty of
9 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
10 // Lesser General Public License for more details.
11 //
12 // You should have received a copy of the GNU Lesser General Public
13 // License along with this library; if not, write to the Free Software
14 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
15 //
16 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
17 //
18
19 %ExportedHeaderCode
20 #include <gp_XY.hxx>
21 %End
22
23 class gp_XY
24 {
25 %TypeHeaderCode
26 #include <gp_XY.hxx>
27 %End
28
29 public:
30
31   //! Creates XY object with zero coordinates (0,0). <br>
32   gp_XY();
33   
34   //! a number pair defined by the XY coordinates <br>
35   gp_XY(const double X,const double Y);
36   
37   //!  modifies the coordinate of range Index <br>
38   //!  Index = 1 => X is modified <br>
39   //!  Index = 2 => Y is modified <br>
40   //!   Raises OutOfRange if Index != {1, 2}. <br>
41   void SetCoord(const int Index,const double Xi) ;
42   //! Assigns the given value to the X coordinate of this number pair. <br>
43   void SetX(const double X) ;
44   //! Assigns the given value to the Y  coordinate of this number pair. <br>
45   void SetY(const double Y) ;
46   
47   //!  returns the coordinate of range Index : <br>
48   //!  Index = 1 => X is returned <br>
49   //!  Index = 2 => Y is returned <br>
50   //! Raises OutOfRange if Index != {1, 2}. <br>
51   double Coord(const int Index) const;
52   //! For this number pair, returns its coordinates X and Y. <br>
53   void Coord(double& X,double& Y) const;
54   //! Returns the X coordinate of this number pair. <br>
55   double X() const;
56   //! Returns the Y coordinate of this number pair. <br>
57   double Y() const;
58   
59 };
60