f6914eb82f8111d29038feaeb369a7f5e6318b51
[occt.git] / src / gp / gp.hxx
1 // Created on: 1993-04-13
2 // Created by: JCV
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #ifndef _gp_HeaderFile
18 #define _gp_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <Standard_Real.hxx>
25 class gp_Pnt;
26 class gp_Dir;
27 class gp_Ax1;
28 class gp_Ax2;
29 class gp_Pnt2d;
30 class gp_Dir2d;
31 class gp_Ax2d;
32 class gp_XYZ;
33 class gp_Mat;
34 class gp_Quaternion;
35 class gp_Trsf;
36 class gp_GTrsf;
37 class gp_Pnt;
38 class gp_Vec;
39 class gp_Dir;
40 class gp_Ax1;
41 class gp_Ax2;
42 class gp_Ax3;
43 class gp_Lin;
44 class gp_Circ;
45 class gp_Elips;
46 class gp_Hypr;
47 class gp_Parab;
48 class gp_Pln;
49 class gp_Cylinder;
50 class gp_Sphere;
51 class gp_Torus;
52 class gp_Cone;
53 class gp_XY;
54 class gp_Mat2d;
55 class gp_Trsf2d;
56 class gp_GTrsf2d;
57 class gp_Pnt2d;
58 class gp_Vec2d;
59 class gp_Dir2d;
60 class gp_Ax2d;
61 class gp_Ax22d;
62 class gp_Lin2d;
63 class gp_Circ2d;
64 class gp_Elips2d;
65 class gp_Hypr2d;
66 class gp_Parab2d;
67
68
69
70 //! The geometric processor package, called gp, provides an
71 //! implementation of entities used  :
72 //! . for algebraic calculation such as "XYZ" coordinates, "Mat"
73 //! matrix
74 //! . for basis analytic geometry such as Transformations, point,
75 //! vector, line, plane, axis placement, conics, and elementary
76 //! surfaces.
77 //! These entities are defined in 2d and 3d space.
78 //! All the classes of this package are non-persistent.
79 class gp 
80 {
81 public:
82
83   DEFINE_STANDARD_ALLOC
84
85   
86   //! Method of package gp
87   //!
88   //! In geometric computations, defines the tolerance criterion
89   //! used to determine when two numbers can be considered equal.
90   //! Many class functions use this tolerance criterion, for
91   //! example, to avoid division by zero in geometric
92   //! computations. In the documentation, tolerance criterion is
93   //! always referred to as gp::Resolution().
94     static Standard_Real Resolution();
95   
96   //! Identifies a Cartesian point with coordinates X = Y = Z = 0.0.0
97   Standard_EXPORT static const gp_Pnt& Origin();
98   
99   //! Returns a unit vector with the combination (1,0,0)
100   Standard_EXPORT static const gp_Dir& DX();
101   
102   //! Returns a unit vector with the combination (0,1,0)
103   Standard_EXPORT static const gp_Dir& DY();
104   
105   //! Returns a unit vector with the combination (0,0,1)
106   Standard_EXPORT static const gp_Dir& DZ();
107   
108   //! Identifies an axis where its origin is Origin
109   //! and its unit vector coordinates  X = 1.0,  Y = Z = 0.0
110   Standard_EXPORT static const gp_Ax1& OX();
111   
112   //! Identifies an axis where its origin is Origin
113   //! and its unit vector coordinates Y = 1.0,  X = Z = 0.0
114   Standard_EXPORT static const gp_Ax1& OY();
115   
116   //! Identifies an axis where its origin is Origin
117   //! and its unit vector coordinates Z = 1.0,  Y = X = 0.0
118   Standard_EXPORT static const gp_Ax1& OZ();
119   
120   //! Identifies a coordinate system where its origin is Origin,
121   //! and its "main Direction" and "X Direction" coordinates
122   //! Z = 1.0, X = Y =0.0 and X direction coordinates X = 1.0, Y = Z = 0.0
123   Standard_EXPORT static const gp_Ax2& XOY();
124   
125   //! Identifies a coordinate system where its origin is Origin,
126   //! and its "main Direction" and "X Direction" coordinates
127   //! Y = 1.0, X = Z =0.0 and X direction coordinates Z = 1.0, X = Y = 0.0
128   Standard_EXPORT static const gp_Ax2& ZOX();
129   
130   //! Identifies a coordinate system where its origin is Origin,
131   //! and its "main Direction" and "X Direction" coordinates
132   //! X = 1.0, Z = Y =0.0 and X direction coordinates Y = 1.0, X = Z = 0.0
133   //! In 2D space
134   Standard_EXPORT static const gp_Ax2& YOZ();
135   
136   //! Identifies a Cartesian point with coordinates X = Y = 0.0
137   Standard_EXPORT static const gp_Pnt2d& Origin2d();
138   
139   //! Returns a unit vector with the combinations (1,0)
140   Standard_EXPORT static const gp_Dir2d& DX2d();
141   
142   //! Returns a unit vector with the combinations (0,1)
143   Standard_EXPORT static const gp_Dir2d& DY2d();
144   
145   //! Identifies an axis where its origin is Origin2d
146   //! and its unit vector coordinates are: X = 1.0,  Y = 0.0
147   Standard_EXPORT static const gp_Ax2d& OX2d();
148   
149   //! Identifies an axis where its origin is Origin2d
150   //! and its unit vector coordinates are Y = 1.0,  X = 0.0
151   Standard_EXPORT static const gp_Ax2d& OY2d();
152
153
154
155
156 protected:
157
158
159
160
161
162 private:
163
164
165
166
167 friend class gp_XYZ;
168 friend class gp_Mat;
169 friend class gp_Quaternion;
170 friend class gp_Trsf;
171 friend class gp_GTrsf;
172 friend class gp_Pnt;
173 friend class gp_Vec;
174 friend class gp_Dir;
175 friend class gp_Ax1;
176 friend class gp_Ax2;
177 friend class gp_Ax3;
178 friend class gp_Lin;
179 friend class gp_Circ;
180 friend class gp_Elips;
181 friend class gp_Hypr;
182 friend class gp_Parab;
183 friend class gp_Pln;
184 friend class gp_Cylinder;
185 friend class gp_Sphere;
186 friend class gp_Torus;
187 friend class gp_Cone;
188 friend class gp_XY;
189 friend class gp_Mat2d;
190 friend class gp_Trsf2d;
191 friend class gp_GTrsf2d;
192 friend class gp_Pnt2d;
193 friend class gp_Vec2d;
194 friend class gp_Dir2d;
195 friend class gp_Ax2d;
196 friend class gp_Ax22d;
197 friend class gp_Lin2d;
198 friend class gp_Circ2d;
199 friend class gp_Elips2d;
200 friend class gp_Hypr2d;
201 friend class gp_Parab2d;
202
203 };
204
205
206 #include <gp.lxx>
207
208
209
210
211
212 #endif // _gp_HeaderFile