1 // Copyright (c) 1995-1999 Matra Datavision
2 // Copyright (c) 1999-2014 OPEN CASCADE SAS
4 // This file is part of Open CASCADE Technology software library.
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License version 2.1 as published
8 // by the Free Software Foundation, with special exception defined in the file
9 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10 // distribution for complete text of the license and disclaimer of any warranty.
12 // Alternatively, this file may be used under the terms of Open CASCADE
13 // commercial license or contractual agreement.
15 // Modif jcv 08/01/1991
18 #include <gp_Ax2d.hxx>
20 inline gp_Ax2d::gp_Ax2d()
23 //vdir(1.,0.) use default ctor of gp_Dir2d, as it creates the same dir (1,0)
26 inline gp_Ax2d::gp_Ax2d (const gp_Pnt2d& P,
27 const gp_Dir2d& V) : loc(P), vdir(V)
30 inline void gp_Ax2d::SetLocation(const gp_Pnt2d& P)
33 inline void gp_Ax2d::SetDirection(const gp_Dir2d& V)
36 inline const gp_Pnt2d& gp_Ax2d::Location () const
39 inline const gp_Dir2d& gp_Ax2d::Direction () const
42 inline Standard_Boolean gp_Ax2d::IsNormal
43 (const gp_Ax2d& Other,
44 const Standard_Real AngularTolerance) const
45 { return vdir.IsNormal(Other.vdir, AngularTolerance); }
47 inline Standard_Boolean gp_Ax2d::IsOpposite
48 (const gp_Ax2d& Other,
49 const Standard_Real AngularTolerance) const
50 { return vdir.IsOpposite (Other.vdir, AngularTolerance); }
52 inline Standard_Boolean gp_Ax2d::IsParallel
53 (const gp_Ax2d& Other,
54 const Standard_Real AngularTolerance) const
55 { return vdir.IsParallel(Other.vdir, AngularTolerance); }
57 inline Standard_Real gp_Ax2d::Angle (const gp_Ax2d& Other) const
58 { return vdir.Angle (Other.vdir); }
60 inline void gp_Ax2d::Reverse()
63 inline gp_Ax2d gp_Ax2d::Reversed() const
70 inline void gp_Ax2d::Rotate (const gp_Pnt2d& P,
71 const Standard_Real Ang)
77 inline gp_Ax2d gp_Ax2d::Rotated (const gp_Pnt2d& P,
78 const Standard_Real Ang) const
85 inline gp_Ax2d gp_Ax2d::Scaled (const gp_Pnt2d& P,
86 const Standard_Real S) const
93 inline void gp_Ax2d::Transform (const gp_Trsf2d& T)
99 inline gp_Ax2d gp_Ax2d::Transformed (const gp_Trsf2d& T) const
106 inline void gp_Ax2d::Translate (const gp_Vec2d& V)
107 { loc.Translate (V); }
109 inline gp_Ax2d gp_Ax2d::Translated (const gp_Vec2d& V) const
112 (A.loc).Translate (V);
116 inline void gp_Ax2d::Translate (const gp_Pnt2d& P1,
118 { loc.Translate (P1,P2); }
120 inline gp_Ax2d gp_Ax2d::Translated (const gp_Pnt2d& P1,
121 const gp_Pnt2d& P2) const
124 (A.loc).Translate( gp_Vec2d (P1, P2));