0024750: Replace instantiations of TCollection generic classes by NCollection templat...
[occt.git] / src / Contap / Contap_HCurve2dTool.lxx
1 // Created on: 1992-10-22
2 // Created by: Laurent BUCHARD
3 // Copyright (c) 1992-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 #include <Adaptor2d_HCurve2d.hxx>
18
19 #include <GeomAbs_CurveType.hxx>
20 #include <GeomAbs_Shape.hxx>
21
22 #include <gp_Vec2d.hxx>
23 #include <gp_Lin2d.hxx>
24 #include <gp_Circ2d.hxx>
25 #include <gp_Elips2d.hxx>
26 #include <gp_Parab2d.hxx>
27 #include <gp_Hypr2d.hxx>
28
29
30 #include <Geom2d_BezierCurve.hxx>
31 #include <Geom2d_BSplineCurve.hxx>
32
33 #include <TColStd_Array1OfReal.hxx>
34
35 //============================================================
36 inline Standard_Real Contap_HCurve2dTool::FirstParameter (const Handle(Adaptor2d_HCurve2d)& C) {
37   return(C->FirstParameter());
38 }
39 //============================================================
40 inline Standard_Real Contap_HCurve2dTool::LastParameter (const Handle(Adaptor2d_HCurve2d)& C) {
41   return(C->LastParameter());
42 }
43 //============================================================
44 inline GeomAbs_Shape Contap_HCurve2dTool::Continuity (const Handle(Adaptor2d_HCurve2d)& C) {
45   return(C->Continuity());
46 }
47 //============================================================
48 inline Standard_Integer Contap_HCurve2dTool::NbIntervals(const Handle(Adaptor2d_HCurve2d)& C,const GeomAbs_Shape Sh) {
49   return(C->NbIntervals(Sh));
50 }
51 //============================================================
52 inline void Contap_HCurve2dTool::Intervals(const Handle(Adaptor2d_HCurve2d)& C,
53                                                              TColStd_Array1OfReal& Tab,
54                                                              const GeomAbs_Shape Sh) {
55   C->Intervals(Tab,Sh);
56 }
57 //============================================================
58 inline Standard_Boolean Contap_HCurve2dTool::IsClosed(const Handle(Adaptor2d_HCurve2d)& C) {
59   return(C->IsClosed());
60 }
61 //============================================================
62 inline Standard_Boolean Contap_HCurve2dTool::IsPeriodic(const Handle(Adaptor2d_HCurve2d)& C) {
63   return(C->IsPeriodic());
64 }
65 //============================================================
66 inline Standard_Real Contap_HCurve2dTool::Period(const Handle(Adaptor2d_HCurve2d)& C) {
67   return(C->Period());
68 }
69 //============================================================
70 inline gp_Pnt2d Contap_HCurve2dTool::Value (const Handle(Adaptor2d_HCurve2d)& C,
71                                                 const Standard_Real U) {
72   return(C->Value(U));
73 }
74 //============================================================
75 inline void Contap_HCurve2dTool::D0(const Handle(Adaptor2d_HCurve2d)& C,
76                                           const Standard_Real U,
77                                           gp_Pnt2d& P) {
78   C->D0(U,P);
79 }
80 //============================================================
81 inline void Contap_HCurve2dTool::D1 (const Handle(Adaptor2d_HCurve2d)& C,
82                                            const Standard_Real U,
83                                            gp_Pnt2d& P,
84                                            gp_Vec2d& T) {
85   C->D1(U,P,T);
86 }
87 //============================================================
88 inline void Contap_HCurve2dTool::D2 (const Handle(Adaptor2d_HCurve2d)& C,
89                                            const Standard_Real U,
90                                            gp_Pnt2d& P,
91                                            gp_Vec2d& T,
92                                            gp_Vec2d& N) {
93   
94   C->D2(U,P,T,N);
95 }
96 //============================================================
97 inline void Contap_HCurve2dTool::D3 (const Handle(Adaptor2d_HCurve2d)& C,
98                                            const Standard_Real U,
99                                            gp_Pnt2d& P,
100                                            gp_Vec2d& V1,
101                                            gp_Vec2d& V2,
102                                            gp_Vec2d& V3) {
103   
104   C->D3(U,P,V1,V2,V3);
105 }
106 //============================================================
107 inline gp_Vec2d Contap_HCurve2dTool::DN (const Handle(Adaptor2d_HCurve2d)& C,
108                                              const Standard_Real U,
109                                              const Standard_Integer N) { 
110   
111   return(C->DN(U,N));
112 }
113 //============================================================
114 inline Standard_Real Contap_HCurve2dTool::Resolution(const Handle(Adaptor2d_HCurve2d)& C,
115                                                            const Standard_Real R3d) {
116   return(C->Resolution(R3d));
117 }
118 //============================================================
119 inline GeomAbs_CurveType Contap_HCurve2dTool::GetType(const Handle(Adaptor2d_HCurve2d)& C) {
120   return(C->GetType());
121 }
122 //============================================================
123 inline gp_Lin2d Contap_HCurve2dTool::Line (const Handle(Adaptor2d_HCurve2d)& C) {
124   return(C->Line());
125 }
126 //============================================================
127 inline gp_Circ2d Contap_HCurve2dTool::Circle (const Handle(Adaptor2d_HCurve2d)& C) {
128   return(C->Circle());
129 }
130 //============================================================
131 inline gp_Elips2d Contap_HCurve2dTool::Ellipse (const Handle(Adaptor2d_HCurve2d)& C) {
132   return(C->Ellipse());
133 }
134 //============================================================
135 inline gp_Parab2d Contap_HCurve2dTool::Parabola (const Handle(Adaptor2d_HCurve2d)& C) {
136   return(C->Parabola());
137 }
138 //============================================================
139 inline gp_Hypr2d Contap_HCurve2dTool::Hyperbola (const Handle(Adaptor2d_HCurve2d)& C) {
140   return(C->Hyperbola());
141 }
142 //============================================================
143 inline Handle(Geom2d_BezierCurve) Contap_HCurve2dTool::Bezier (const Handle(Adaptor2d_HCurve2d)& C) {
144   return(C->Bezier());
145 }
146 //============================================================
147 inline Handle(Geom2d_BSplineCurve) Contap_HCurve2dTool::BSpline (const Handle(Adaptor2d_HCurve2d)& C) {
148   return(C->BSpline());
149 }
150 //============================================================