0022792: Globally defined symbol PI conflicts with VTK definition (Intel compiler)
[occt.git] / src / ElSLib / ElSLib.lxx
CommitLineData
7fd59977 1// File: ElSLib.lxx
2// Author: Jean-Claude Vauthier
3
4#include <gp_Pln.hxx>
5#include <gp_Sphere.hxx>
6#include <gp_Torus.hxx>
7#include <gp_Cylinder.hxx>
8#include <gp_Cone.hxx>
9#include <gp_Ax3.hxx>
10
11
12inline gp_Pnt ElSLib::Value (const Standard_Real U, const Standard_Real V, const gp_Pln& Pl) {
13
14 return ElSLib::PlaneValue (U, V, Pl.Position());
15}
16
17
18inline gp_Pnt ElSLib::Value (const Standard_Real U, const Standard_Real V, const gp_Cone& C) {
19
20 return ElSLib::ConeValue (U, V, C.Position(), C.RefRadius(), C.SemiAngle());
21}
22
23
24inline gp_Pnt ElSLib::Value (const Standard_Real U, const Standard_Real V, const gp_Cylinder& C) {
25
26 return ElSLib::CylinderValue (U, V, C.Position(), C.Radius());
27}
28
29
30inline gp_Pnt ElSLib::Value (const Standard_Real U, const Standard_Real V, const gp_Sphere& S) {
31
32 return ElSLib::SphereValue (U, V, S.Position(), S.Radius());
33}
34
35
36inline gp_Pnt ElSLib::Value (const Standard_Real U, const Standard_Real V, const gp_Torus& T) {
37
38 return ElSLib::TorusValue (U, V, T.Position(), T.MajorRadius(), T.MinorRadius());
39}
40
41
42
43inline gp_Vec ElSLib::DN (const Standard_Real U, const Standard_Real V, const gp_Pln& Pl, const Standard_Integer Nu, const Standard_Integer Nv) {
44
45 return ElSLib::PlaneDN (U, V, Pl.Position(), Nu, Nv);
46}
47
48
49inline gp_Vec ElSLib::DN (const Standard_Real U, const Standard_Real V, const gp_Cone& C, const Standard_Integer Nu, const Standard_Integer Nv) {
50
51 return ElSLib::ConeDN (U, V, C.Position(), C.RefRadius(), C.SemiAngle(), Nu, Nv);
52}
53
54
55inline gp_Vec ElSLib::DN (const Standard_Real U, const Standard_Real V, const gp_Cylinder& C, const Standard_Integer Nu, const Standard_Integer Nv) {
56
57 return ElSLib::CylinderDN (U, V, C.Position(), C.Radius(), Nu, Nv);
58}
59
60
61inline gp_Vec ElSLib::DN (const Standard_Real U, const Standard_Real V, const gp_Sphere& S, const Standard_Integer Nu, const Standard_Integer Nv) {
62
63 return ElSLib::SphereDN (U, V, S.Position(), S.Radius(), Nu, Nv);
64}
65
66
67inline gp_Vec ElSLib::DN (const Standard_Real U, const Standard_Real V, const gp_Torus& T, const Standard_Integer Nu, const Standard_Integer Nv) {
68
69 return ElSLib::TorusDN (U, V, T.Position(), T.MajorRadius(), T.MinorRadius(), Nu, Nv);
70}
71
72
73
74
75inline void ElSLib::D0 (const Standard_Real U, const Standard_Real V, const gp_Pln& Pl, gp_Pnt& P) {
76
77 ElSLib::PlaneD0 (U, V, Pl.Position(), P);
78}
79
80inline void ElSLib::D0 (const Standard_Real U, const Standard_Real V, const gp_Cone& C, gp_Pnt& P) {
81
82 ElSLib::ConeD0 (U, V, C.Position(), C.RefRadius(), C.SemiAngle(), P);
83}
84
85inline void ElSLib::D0 (const Standard_Real U, const Standard_Real V, const gp_Cylinder& C, gp_Pnt& P) {
86
87 ElSLib::CylinderD0 (U, V, C.Position(), C.Radius(), P);
88}
89
90inline void ElSLib::D0 (const Standard_Real U, const Standard_Real V, const gp_Sphere& S, gp_Pnt& P) {
91
92 ElSLib::SphereD0 (U, V, S.Position(), S.Radius(), P);
93}
94
95inline void ElSLib::D0 (const Standard_Real U, const Standard_Real V, const gp_Torus& T, gp_Pnt& P) {
96
97 ElSLib::TorusD0 (U, V, T.Position(), T.MajorRadius(), T.MinorRadius(), P);
98}
99
100
101
102inline void ElSLib::D1 (const Standard_Real U, const Standard_Real V, const gp_Pln& Pl, gp_Pnt& P, gp_Vec& Vu, gp_Vec& Vv) {
103
104 ElSLib::PlaneD1 (U, V, Pl.Position(), P, Vu, Vv);
105}
106
107
108inline void ElSLib::D1 (const Standard_Real U, const Standard_Real V, const gp_Cone& C, gp_Pnt& P, gp_Vec& Vu, gp_Vec& Vv) {
109
110 ElSLib::ConeD1 (U, V, C.Position(), C.RefRadius(), C.SemiAngle(), P, Vu, Vv);
111}
112
113
114inline void ElSLib::D1 (const Standard_Real U, const Standard_Real V, const gp_Cylinder& C, gp_Pnt& P, gp_Vec& Vu, gp_Vec& Vv) {
115
116 ElSLib::CylinderD1 (U, V, C.Position(), C.Radius(), P, Vu, Vv);
117}
118
119
120inline void ElSLib::D1 (const Standard_Real U, const Standard_Real V, const gp_Sphere& S, gp_Pnt& P, gp_Vec& Vu, gp_Vec& Vv) {
121
122 ElSLib::SphereD1 (U, V, S.Position(), S.Radius(), P, Vu, Vv);
123}
124
125
126inline void ElSLib::D1 (const Standard_Real U, const Standard_Real V, const gp_Torus& T, gp_Pnt& P, gp_Vec& Vu, gp_Vec& Vv) {
127
128 ElSLib::TorusD1 (U, V, T.Position(), T.MajorRadius(), T.MinorRadius(), P, Vu, Vv);
129}
130
131
132
133inline void ElSLib::D2 (const Standard_Real U, const Standard_Real V, const gp_Cone& C, gp_Pnt& P, gp_Vec& Vu, gp_Vec& Vv, gp_Vec& Vuu, gp_Vec& Vvv, gp_Vec& Vuv) {
134
135 ElSLib::ConeD2 (U, V, C.Position(), C.RefRadius(), C.SemiAngle(), P, Vu, Vv, Vuu, Vvv, Vuv);
136}
137
138
139inline void ElSLib::D2 (const Standard_Real U, const Standard_Real V, const gp_Cylinder& C, gp_Pnt& P, gp_Vec& Vu, gp_Vec& Vv, gp_Vec& Vuu, gp_Vec& Vvv, gp_Vec& Vuv) {
140
141 ElSLib::CylinderD2 (U, V, C.Position(), C.Radius(), P, Vu, Vv, Vuu, Vvv, Vuv);
142}
143
144
145inline void ElSLib::D2 (const Standard_Real U, const Standard_Real V, const gp_Sphere& S, gp_Pnt& P, gp_Vec& Vu, gp_Vec& Vv, gp_Vec& Vuu, gp_Vec& Vvv, gp_Vec& Vuv) {
146
147 ElSLib::SphereD2 (U, V, S.Position(), S.Radius(), P, Vu, Vv, Vuu, Vvv, Vuv);
148}
149
150
151inline void ElSLib::D2 (const Standard_Real U, const Standard_Real V, const gp_Torus& T, gp_Pnt& P, gp_Vec& Vu, gp_Vec& Vv, gp_Vec& Vuu, gp_Vec& Vvv, gp_Vec& Vuv) {
152
153 ElSLib::TorusD2 (U, V, T.Position(), T.MajorRadius(), T.MinorRadius(), P, Vu, Vv, Vuu, Vvv, Vuv);
154}
155
156
157
158
159inline void ElSLib::D3 (const Standard_Real U, const Standard_Real V, const gp_Cone& C, gp_Pnt& P, gp_Vec& Vu, gp_Vec& Vv, gp_Vec& Vuu, gp_Vec& Vvv, gp_Vec& Vuv, gp_Vec& Vuuu, gp_Vec& Vvvv, gp_Vec& Vuuv, gp_Vec& Vuvv) {
160
161 ElSLib::ConeD3 (U, V, C.Position(), C.RefRadius(), C.SemiAngle(), P, Vu, Vv, Vuu, Vvv, Vuv, Vuuu, Vvvv, Vuuv, Vuvv);
162}
163
164
165inline void ElSLib::D3 (const Standard_Real U, const Standard_Real V, const gp_Cylinder& C, gp_Pnt& P, gp_Vec& Vu, gp_Vec& Vv, gp_Vec& Vuu, gp_Vec& Vvv, gp_Vec& Vuv, gp_Vec& Vuuu, gp_Vec& Vvvv, gp_Vec& Vuuv, gp_Vec& Vuvv) {
166
167 ElSLib::CylinderD3 (U, V, C.Position(), C.Radius(), P, Vu, Vv, Vuu, Vvv, Vuv,Vuuu, Vvvv, Vuuv, Vuvv);
168}
169
170
171inline void ElSLib::D3 (const Standard_Real U, const Standard_Real V, const gp_Sphere& S, gp_Pnt& P, gp_Vec& Vu, gp_Vec& Vv, gp_Vec& Vuu, gp_Vec& Vvv, gp_Vec& Vuv, gp_Vec& Vuuu, gp_Vec& Vvvv, gp_Vec& Vuuv, gp_Vec& Vuvv) {
172
173 ElSLib::SphereD3 (U, V, S.Position(), S.Radius(), P, Vu, Vv, Vuu, Vvv, Vuv, Vuuu, Vvvv, Vuuv, Vuvv);
174}
175
176
177inline void ElSLib::D3 (const Standard_Real U, const Standard_Real V, const gp_Torus& T, gp_Pnt& P, gp_Vec& Vu, gp_Vec& Vv, gp_Vec& Vuu, gp_Vec& Vvv, gp_Vec& Vuv, gp_Vec& Vuuu, gp_Vec& Vvvv, gp_Vec& Vuuv, gp_Vec& Vuvv) {
178
179 ElSLib::TorusD3 (U, V, T.Position(), T.MajorRadius(), T.MinorRadius(), P, Vu, Vv, Vuu, Vvv, Vuv, Vuuu, Vvvv, Vuuv, Vuvv);
180}
181
182
183
184
185inline void ElSLib::Parameters(const gp_Pln& Pl,
186 const gp_Pnt& P,
187 Standard_Real& U,
188 Standard_Real& V) {
189
190 ElSLib::PlaneParameters(Pl.Position(),P,U,V);
191}
192
193
194inline void ElSLib::Parameters(const gp_Cylinder& C,
195 const gp_Pnt& P,
196 Standard_Real& U,
197 Standard_Real& V) {
198
199 ElSLib::CylinderParameters(C.Position(),C.Radius(),P,U,V);
200}
201
202
203inline void ElSLib::Parameters(const gp_Cone& C,
204 const gp_Pnt& P,
205 Standard_Real& U,
206 Standard_Real& V) {
207
208 ElSLib::ConeParameters(C.Position(),C.RefRadius(),C.SemiAngle(),P,U,V);
209}
210
211
212inline void ElSLib::Parameters(const gp_Sphere& S,
213 const gp_Pnt& P,
214 Standard_Real& U,
215 Standard_Real& V) {
216
217 ElSLib::SphereParameters(S.Position(),S.Radius(),P,U,V);
218}
219
220
221inline void ElSLib::Parameters(const gp_Torus& T,
222 const gp_Pnt& P,
223 Standard_Real& U,
224 Standard_Real& V) {
225
226 ElSLib::TorusParameters(T.Position(),T.MajorRadius(),T.MinorRadius(),P,U,V);
227}
228
229