b311480e |
1 | // Created on: 1993-03-24 |
2 | // Created by: JCV |
3 | // Copyright (c) 1993-1999 Matra Datavision |
4 | // Copyright (c) 1999-2012 OPEN CASCADE SAS |
5 | // |
6 | // The content of this file is subject to the Open CASCADE Technology Public |
7 | // License Version 6.5 (the "License"). You may not use the content of this file |
8 | // except in compliance with the License. Please obtain a copy of the License |
9 | // at http://www.opencascade.org and read it completely before using this file. |
10 | // |
11 | // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its |
12 | // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. |
13 | // |
14 | // The Original Code and all software distributed under the License is |
15 | // distributed on an "AS IS" basis, without warranty of any kind, and the |
16 | // Initial Developer hereby disclaims all such warranties, including without |
17 | // limitation, any warranties of merchantability, fitness for a particular |
18 | // purpose or non-infringement. Please see the License for the specific terms |
19 | // and conditions governing the rights and limitations under the License. |
20 | |
7fd59977 |
21 | |
7fd59977 |
22 | |
23 | #include <Geom2d_CartesianPoint.ixx> |
24 | |
25 | typedef Geom2d_CartesianPoint CartesianPoint; |
26 | typedef Handle(Geom2d_CartesianPoint) Handle(CartesianPoint); |
27 | typedef gp_Ax2d Ax2d; |
28 | typedef gp_Vec2d Vec2d; |
29 | typedef gp_Trsf2d Trsf2d; |
30 | |
31 | Geom2d_CartesianPoint::Geom2d_CartesianPoint (const gp_Pnt2d& P) : gpPnt2d (P) |
32 | {} |
33 | |
34 | |
35 | Geom2d_CartesianPoint::Geom2d_CartesianPoint (const Standard_Real X, const Standard_Real Y) |
36 | : gpPnt2d (X , Y) { } |
37 | |
38 | |
39 | |
40 | Handle(Geom2d_Geometry) Geom2d_CartesianPoint::Copy() const { |
41 | |
42 | Handle(CartesianPoint) P; |
43 | P = new CartesianPoint (gpPnt2d); |
44 | return P; |
45 | } |
46 | |
47 | |
48 | void Geom2d_CartesianPoint::SetCoord (const Standard_Real X, const Standard_Real Y) { |
49 | |
50 | gpPnt2d.SetCoord (X, Y); |
51 | } |
52 | |
53 | void Geom2d_CartesianPoint::Coord (Standard_Real& X, Standard_Real& Y) const { |
54 | |
55 | gpPnt2d.Coord (X, Y); |
56 | } |
57 | |
58 | |
59 | void Geom2d_CartesianPoint::SetPnt2d (const gp_Pnt2d& P) { gpPnt2d = P; } |
60 | |
61 | void Geom2d_CartesianPoint::SetX (const Standard_Real X) { gpPnt2d.SetX (X); } |
62 | |
63 | void Geom2d_CartesianPoint::SetY (const Standard_Real Y) { gpPnt2d.SetY (Y); } |
64 | |
65 | gp_Pnt2d Geom2d_CartesianPoint::Pnt2d () const { return gpPnt2d; } |
66 | |
67 | Standard_Real Geom2d_CartesianPoint::X () const { return gpPnt2d.X(); } |
68 | |
69 | Standard_Real Geom2d_CartesianPoint::Y () const { return gpPnt2d.Y(); } |
70 | |
71 | void Geom2d_CartesianPoint::Transform (const Trsf2d& T) { |
72 | |
73 | gpPnt2d.Transform (T); |
74 | } |