0024710: Avoid including Handle_Class.hxx headers except where necessary
[occt.git] / src / HLRBRep / HLRBRep_SurfaceTool.lxx
1 // Created by: Laurent BUCHARD
2 // Copyright (c) 1993-1999 Matra Datavision
3 // Copyright (c) 1999-2014 OPEN CASCADE SAS
4 //
5 // This file is part of Open CASCADE Technology software library.
6 //
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
12 //
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
15
16 #include <gp_Pnt.hxx>
17 #include <gp_Vec.hxx>
18 #include <gp_Pln.hxx>
19 #include <gp_Cylinder.hxx>
20 #include <gp_Cone.hxx>
21 #include <gp_Torus.hxx>
22 #include <gp_Sphere.hxx>
23 #include <gp_Ax1.hxx>
24 #include <gp_Dir.hxx>
25 #include <Geom_BezierSurface.hxx>
26 #include <Geom_BSplineSurface.hxx>
27 #include <Adaptor3d_HSurface.hxx>
28 #include <Adaptor3d_HCurve.hxx>
29 #include <BRepAdaptor_Surface.hxx>
30
31 inline Standard_Real HLRBRep_SurfaceTool::FirstUParameter(const Standard_Address Surf){  return ((BRepAdaptor_Surface *)Surf)->FirstUParameter(); }
32 inline Standard_Real HLRBRep_SurfaceTool::FirstVParameter(const Standard_Address Surf){  return ((BRepAdaptor_Surface *)Surf)->FirstVParameter();}
33 inline Standard_Real HLRBRep_SurfaceTool::LastUParameter(const Standard_Address Surf){  return ((BRepAdaptor_Surface *)Surf)->LastUParameter();}
34 inline Standard_Real HLRBRep_SurfaceTool::LastVParameter(const Standard_Address Surf){  return ((BRepAdaptor_Surface *)Surf)->LastVParameter();}
35
36 inline Standard_Integer HLRBRep_SurfaceTool::NbUIntervals(const Standard_Address Surf,
37                                                           const GeomAbs_Shape S){
38   return ((BRepAdaptor_Surface *)Surf)->NbUIntervals(S);
39 }
40
41 inline Standard_Integer HLRBRep_SurfaceTool::NbVIntervals(const Standard_Address Surf,
42                                                           const GeomAbs_Shape S){
43   return ((BRepAdaptor_Surface *)Surf)->NbVIntervals(S);
44 }
45
46 inline void HLRBRep_SurfaceTool::UIntervals(const Standard_Address Surf,
47                                                         TColStd_Array1OfReal& Tab,
48                                                         const GeomAbs_Shape S){
49   ((BRepAdaptor_Surface *)Surf)->UIntervals(Tab,S);
50 }
51
52 inline void HLRBRep_SurfaceTool::VIntervals(const Standard_Address Surf,
53                                                      TColStd_Array1OfReal& Tab,
54                                                      const GeomAbs_Shape S){
55   ((BRepAdaptor_Surface *)Surf)->VIntervals(Tab,S);
56 }
57
58
59 inline Handle_Adaptor3d_HSurface HLRBRep_SurfaceTool::UTrim(const Standard_Address Surf,
60                                                                    const Standard_Real F,
61                                                                    const Standard_Real L,
62                                                                    const Standard_Real Tol) { 
63   return ((BRepAdaptor_Surface *)Surf)->UTrim(F,L,Tol);
64 }
65
66 inline Handle_Adaptor3d_HSurface HLRBRep_SurfaceTool::VTrim(const Standard_Address Surf,
67                                                                    const Standard_Real F,
68                                                                    const Standard_Real L,
69                                                                    const Standard_Real Tol) { 
70   return ((BRepAdaptor_Surface *)Surf)->VTrim(F,L,Tol);
71 }
72
73
74
75
76 inline Standard_Boolean HLRBRep_SurfaceTool::IsUClosed(const Standard_Address S)
77 {
78   return ((BRepAdaptor_Surface *)S)->IsUClosed();
79 }
80
81 inline Standard_Boolean HLRBRep_SurfaceTool::IsVClosed(const Standard_Address S)
82 {
83   return ((BRepAdaptor_Surface *)S)->IsVClosed();
84 }
85
86 inline Standard_Boolean HLRBRep_SurfaceTool::IsUPeriodic(const Standard_Address S)
87 {
88   return ((BRepAdaptor_Surface *)S)->IsUPeriodic();
89 }
90
91 inline Standard_Real HLRBRep_SurfaceTool::UPeriod(const Standard_Address S)
92 {
93   return ((BRepAdaptor_Surface *)S)->UPeriod();
94 }
95
96 inline Standard_Boolean HLRBRep_SurfaceTool::IsVPeriodic(const Standard_Address S)
97 {
98   return ((BRepAdaptor_Surface *)S)->IsVPeriodic();
99 }
100
101 inline Standard_Real HLRBRep_SurfaceTool::VPeriod(const Standard_Address S)
102 {
103   return ((BRepAdaptor_Surface *)S)->VPeriod();
104 }
105
106 inline gp_Pnt HLRBRep_SurfaceTool::Value(const Standard_Address S,
107                                          const Standard_Real U,
108                                          const Standard_Real V )
109 {
110   return ((BRepAdaptor_Surface *)S)->Value(U,V);
111 }
112
113 inline void HLRBRep_SurfaceTool::D0(const Standard_Address S,
114                                     const Standard_Real U,
115                                     const Standard_Real V,
116                                     gp_Pnt& P)
117 {
118   ((BRepAdaptor_Surface *)S)->D0(U,V,P);
119 }
120
121 inline void HLRBRep_SurfaceTool::D1(const Standard_Address S,
122                                     const Standard_Real U,
123                                     const Standard_Real V,
124                                     gp_Pnt& P,
125                                     gp_Vec& D1U,
126                                     gp_Vec& D1V) 
127 {
128   ((BRepAdaptor_Surface *)S)->D1(U,V,P,D1U,D1V);
129 }
130
131 inline void HLRBRep_SurfaceTool::D2(const Standard_Address S,
132                                     const Standard_Real U,
133                                     const Standard_Real V,
134                                     gp_Pnt& P,
135                                     gp_Vec& D1U,
136                                     gp_Vec& D1V,
137                                     gp_Vec& D2U,
138                                     gp_Vec& D2V,
139                                     gp_Vec& D2UV)
140 {
141   ((BRepAdaptor_Surface *)S)->D2(U,V,P,D1U,D1V,D2U,D2V,D2UV);
142 }
143
144 inline void HLRBRep_SurfaceTool::D3(const Standard_Address S,
145                                     const Standard_Real U,
146                                     const Standard_Real V,
147                                     gp_Pnt& P,
148                                     gp_Vec& D1U,
149                                     gp_Vec& D1V, 
150                                     gp_Vec& D2U,
151                                     gp_Vec& D2V,
152                                     gp_Vec& D2UV,
153                                     gp_Vec& D3U,
154                                     gp_Vec& D3V,
155                                     gp_Vec& D3UUV,
156                                     gp_Vec& D3UVV)
157 {
158   ((BRepAdaptor_Surface *)S)->D3(U,V,P,D1U,D1V,D2U,D2V,D2UV,D3U,D3V,D3UUV,D3UVV);
159 }
160
161 inline gp_Vec HLRBRep_SurfaceTool::DN(const Standard_Address S,
162                                       const Standard_Real U,
163                                       const Standard_Real V,
164                                       const Standard_Integer Nu,
165                                       const Standard_Integer Nv)
166 {
167   return ((BRepAdaptor_Surface *)S)->DN(U,V,Nu,Nv);
168 }
169
170 inline Standard_Real HLRBRep_SurfaceTool::UResolution(const Standard_Address S,
171                                                       const Standard_Real R3d)
172 {
173   return ((BRepAdaptor_Surface *)S)->UResolution(R3d);
174 }
175
176 inline Standard_Real HLRBRep_SurfaceTool::VResolution(const Standard_Address S,
177                                                       const Standard_Real R3d)
178 {
179   return ((BRepAdaptor_Surface *)S)->VResolution(R3d);
180 }
181
182 inline GeomAbs_SurfaceType HLRBRep_SurfaceTool::GetType(const Standard_Address S )
183 {
184   return ((BRepAdaptor_Surface *)S)->GetType();
185 }
186
187 inline gp_Pln HLRBRep_SurfaceTool::Plane(const Standard_Address S)
188 {
189   return ((BRepAdaptor_Surface *)S)->Plane();
190 }
191
192 inline gp_Cylinder HLRBRep_SurfaceTool::Cylinder(const Standard_Address S) 
193 {
194   return ((BRepAdaptor_Surface *)S)->Cylinder();
195 }
196
197 inline gp_Cone HLRBRep_SurfaceTool::Cone(const Standard_Address S) 
198 {
199   return ((BRepAdaptor_Surface *)S)->Cone();
200 }
201
202 inline gp_Sphere HLRBRep_SurfaceTool::Sphere(const Standard_Address S) 
203 {
204   return ((BRepAdaptor_Surface *)S)->Sphere();
205 }
206
207 inline gp_Torus HLRBRep_SurfaceTool::Torus(const Standard_Address S) 
208 {
209   return ((BRepAdaptor_Surface *)S)->Torus();
210 }
211
212
213 inline Handle(Geom_BezierSurface) HLRBRep_SurfaceTool::Bezier(const Standard_Address S) { 
214   return(((BRepAdaptor_Surface *)S)->Bezier());
215 }
216
217 inline Handle(Geom_BSplineSurface) HLRBRep_SurfaceTool::BSpline(const Standard_Address S) { 
218   return(((BRepAdaptor_Surface *)S)->BSpline());
219 }
220
221
222 inline gp_Ax1  HLRBRep_SurfaceTool::AxeOfRevolution(const Standard_Address S) { 
223   return(((BRepAdaptor_Surface *)S)->AxeOfRevolution());
224 }
225
226 inline gp_Dir  HLRBRep_SurfaceTool::Direction(const Standard_Address S) { 
227   return(((BRepAdaptor_Surface *)S)->Direction());
228 }
229
230 inline Handle(Adaptor3d_HCurve)  HLRBRep_SurfaceTool::BasisCurve(const Standard_Address S) { 
231   return(((BRepAdaptor_Surface *)S)->BasisCurve());
232 }
233
234 inline Handle(Adaptor3d_HSurface) HLRBRep_SurfaceTool::BasisSurface(const Standard_Address S) { 
235   return(((BRepAdaptor_Surface *)S)->BasisSurface());
236 }
237
238 inline Standard_Real HLRBRep_SurfaceTool::OffsetValue(const Standard_Address S) { 
239   return(((BRepAdaptor_Surface *)S)->OffsetValue());
240 }