0026377: Passing Handle objects as arguments to functions as non-const reference...
[occt.git] / src / gp / gp.hxx
CommitLineData
42cf5bc1 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>
25class gp_Pnt;
26class gp_Dir;
27class gp_Ax1;
28class gp_Ax2;
29class gp_Pnt2d;
30class gp_Dir2d;
31class gp_Ax2d;
32class gp_XYZ;
33class gp_Mat;
34class gp_Quaternion;
35class gp_Trsf;
36class gp_GTrsf;
37class gp_Pnt;
38class gp_Vec;
39class gp_Dir;
40class gp_Ax1;
41class gp_Ax2;
42class gp_Ax3;
43class gp_Lin;
44class gp_Circ;
45class gp_Elips;
46class gp_Hypr;
47class gp_Parab;
48class gp_Pln;
49class gp_Cylinder;
50class gp_Sphere;
51class gp_Torus;
52class gp_Cone;
53class gp_XY;
54class gp_Mat2d;
55class gp_Trsf2d;
56class gp_GTrsf2d;
57class gp_Pnt2d;
58class gp_Vec2d;
59class gp_Dir2d;
60class gp_Ax2d;
61class gp_Ax22d;
62class gp_Lin2d;
63class gp_Circ2d;
64class gp_Elips2d;
65class gp_Hypr2d;
66class 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.
79class gp
80{
81public:
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
156protected:
157
158
159
160
161
162private:
163
164
165
166
167friend class gp_XYZ;
168friend class gp_Mat;
169friend class gp_Quaternion;
170friend class gp_Trsf;
171friend class gp_GTrsf;
172friend class gp_Pnt;
173friend class gp_Vec;
174friend class gp_Dir;
175friend class gp_Ax1;
176friend class gp_Ax2;
177friend class gp_Ax3;
178friend class gp_Lin;
179friend class gp_Circ;
180friend class gp_Elips;
181friend class gp_Hypr;
182friend class gp_Parab;
183friend class gp_Pln;
184friend class gp_Cylinder;
185friend class gp_Sphere;
186friend class gp_Torus;
187friend class gp_Cone;
188friend class gp_XY;
189friend class gp_Mat2d;
190friend class gp_Trsf2d;
191friend class gp_GTrsf2d;
192friend class gp_Pnt2d;
193friend class gp_Vec2d;
194friend class gp_Dir2d;
195friend class gp_Ax2d;
196friend class gp_Ax22d;
197friend class gp_Lin2d;
198friend class gp_Circ2d;
199friend class gp_Elips2d;
200friend class gp_Hypr2d;
201friend class gp_Parab2d;
202
203};
204
205
206#include <gp.lxx>
207
208
209
210
211
212#endif // _gp_HeaderFile