1 // Copyright (c) 1995-1999 Matra Datavision
2 // Copyright (c) 1999-2014 OPEN CASCADE SAS
3 //
4 // This file is part of Open CASCADE Technology software library.
5 //
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.
11 //
12 // Alternatively, this file may be used under the terms of Open CASCADE
13 // commercial license or contractual agreement.
14 
15 #include <gp.hxx>
16 
17 #include <gp_Ax1.hxx>
18 #include <gp_Ax2.hxx>
19 #include <gp_Ax2d.hxx>
20 #include <gp_Dir.hxx>
21 #include <gp_Dir2d.hxx>
22 #include <gp_Pnt.hxx>
23 #include <gp_Pnt2d.hxx>
24 
25 //=======================================================================
26 //function : Origin
27 //purpose  :
28 //=======================================================================
Origin()29 const gp_Pnt&  gp::Origin()
30 {
31   static gp_Pnt gp_Origin(0,0,0);
32   return gp_Origin;
33 }
34 
35 //=======================================================================
36 //function : DX
37 //purpose  :
38 //=======================================================================
39 
DX()40 const gp_Dir&  gp::DX()
41 {
42   static gp_Dir gp_DX(1,0,0);
43   return gp_DX;
44 }
45 
46 //=======================================================================
47 //function : DY
48 //purpose  :
49 //=======================================================================
50 
DY()51 const gp_Dir&  gp::DY()
52 {
53   static gp_Dir gp_DY(0,1,0);
54   return gp_DY;
55 }
56 
57 //=======================================================================
58 //function : DZ
59 //purpose  :
60 //=======================================================================
61 
DZ()62 const gp_Dir&  gp::DZ()
63 {
64   static gp_Dir gp_DZ(0,0,1);
65   return gp_DZ;
66 }
67 
68 //=======================================================================
69 //function : OX
70 //purpose  :
71 //=======================================================================
72 
OX()73 const gp_Ax1&  gp::OX()
74 {
75   static gp_Ax1 gp_OX(gp_Pnt(0,0,0),gp_Dir(1,0,0));
76   return gp_OX;
77 }
78 
79 //=======================================================================
80 //function : OY
81 //purpose  :
82 //=======================================================================
83 
OY()84 const gp_Ax1&  gp::OY()
85 {
86   static gp_Ax1 gp_OY(gp_Pnt(0,0,0),gp_Dir(0,1,0));
87   return gp_OY;
88 }
89 
90 //=======================================================================
91 //function : OZ
92 //purpose  :
93 //=======================================================================
94 
OZ()95 const gp_Ax1&  gp::OZ()
96 {
97   static gp_Ax1 gp_OZ(gp_Pnt(0,0,0),gp_Dir(0,0,1));
98   return gp_OZ;
99 }
100 
101 //=======================================================================
102 //function : XOY
103 //purpose  :
104 //=======================================================================
105 
XOY()106 const gp_Ax2&  gp::XOY()
107 {
108   static gp_Ax2 gp_XOY(gp_Pnt(0,0,0),gp_Dir(0,0,1),gp_Dir(1,0,0));
109   return gp_XOY;
110 }
111 
112 //=======================================================================
113 //function : ZOX
114 //purpose  :
115 //=======================================================================
116 
ZOX()117 const gp_Ax2&  gp::ZOX()
118 {
119   static gp_Ax2 gp_ZOX(gp_Pnt(0,0,0),gp_Dir(0,1,0),gp_Dir(0,0,1));
120   return gp_ZOX;
121 }
122 
123 //=======================================================================
124 //function : YOZ
125 //purpose  :
126 //=======================================================================
127 
YOZ()128 const gp_Ax2&  gp::YOZ()
129 {
130   static gp_Ax2 gp_YOZ(gp_Pnt(0,0,0),gp_Dir(1,0,0),gp_Dir(0,1,0));
131   return gp_YOZ;
132 }
133 
134 //=======================================================================
135 //function : Origin2d
136 //purpose  :
137 //=======================================================================
138 
Origin2d()139 const gp_Pnt2d&  gp::Origin2d()
140 {
141   static gp_Pnt2d gp_Origin2d(0,0);
142   return gp_Origin2d;
143 }
144 
145 //=======================================================================
146 //function : DX2d
147 //purpose  :
148 //=======================================================================
149 
DX2d()150 const gp_Dir2d&  gp::DX2d()
151 {
152   static gp_Dir2d gp_DX2d(1,0);
153   return gp_DX2d;
154 }
155 
156 //=======================================================================
157 //function : DY2d
158 //purpose  :
159 //=======================================================================
160 
DY2d()161 const gp_Dir2d&  gp::DY2d()
162 {
163   static gp_Dir2d gp_DY2d(0,1);
164   return gp_DY2d;
165 }
166 
167 //=======================================================================
168 //function : OX2d
169 //purpose  :
170 //=======================================================================
171 
OX2d()172 const gp_Ax2d&  gp::OX2d()
173 {
174   static gp_Ax2d gp_OX2d(gp_Pnt2d(0,0),gp_Dir2d(1,0));
175   return gp_OX2d;
176 }
177 
178 //=======================================================================
179 //function : OY2d
180 //purpose  :
181 //=======================================================================
182 
OY2d()183 const gp_Ax2d&  gp::OY2d()
184 {
185   static gp_Ax2d gp_OY2d(gp_Pnt2d(0,0),gp_Dir2d(0,1));
186   return gp_OY2d;
187 }
188 
189