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.
17 inline gp_Ax1::gp_Ax1() : loc(0.,0.,0.), vdir(0.,0.,1.)
20 inline gp_Ax1::gp_Ax1 (const gp_Pnt& P,
21 const gp_Dir& V) : loc(P), vdir(V)
24 inline void gp_Ax1::SetDirection (const gp_Dir& V)
27 inline void gp_Ax1::SetLocation (const gp_Pnt& P)
30 inline const gp_Dir& gp_Ax1::Direction () const
33 inline const gp_Pnt& gp_Ax1::Location () const
36 inline Standard_Boolean gp_Ax1::IsNormal
38 const Standard_Real AngularTolerance) const
39 { return vdir.IsNormal(Other.vdir, AngularTolerance); }
41 inline Standard_Boolean gp_Ax1::IsOpposite
43 const Standard_Real AngularTolerance) const
44 { return vdir.IsOpposite(Other.vdir, AngularTolerance); }
46 inline Standard_Boolean gp_Ax1::IsParallel
48 const Standard_Real AngularTolerance) const
49 { return vdir.IsParallel(Other.vdir, AngularTolerance); }
51 inline Standard_Real gp_Ax1::Angle (const gp_Ax1& Other) const
52 { return vdir.Angle (Other.vdir); }
54 inline void gp_Ax1::Reverse ()
57 inline gp_Ax1 gp_Ax1::Reversed () const
59 gp_Dir D = vdir.Reversed();
60 return gp_Ax1(loc, D);
63 inline void gp_Ax1::Rotate (const gp_Ax1& A1, const Standard_Real Ang)
66 vdir.Rotate(A1 , Ang);
69 inline gp_Ax1 gp_Ax1::Rotated (const gp_Ax1& A1,
70 const Standard_Real Ang) const
77 inline void gp_Ax1::Scale (const gp_Pnt& P,
78 const Standard_Real S)
81 if (S < 0.0) vdir.Reverse();
84 inline gp_Ax1 gp_Ax1::Scaled (const gp_Pnt& P,
85 const Standard_Real S) const
92 inline void gp_Ax1::Transform (const gp_Trsf& T)
98 inline gp_Ax1 gp_Ax1::Transformed (const gp_Trsf& T) const
105 inline void gp_Ax1::Translate (const gp_Vec& V)
106 { loc.Translate (V); }
108 inline gp_Ax1 gp_Ax1::Translated (const gp_Vec& V) const
111 (A1.loc).Translate (V);
115 inline void gp_Ax1::Translate (const gp_Pnt& P1,
118 loc.Translate (P1, P2);
121 inline gp_Ax1 gp_Ax1::Translated (const gp_Pnt& P1,
122 const gp_Pnt& P2) const
125 (A1.loc).Translate (P1, P2);