0026042: OCCT won't work with the latest Xcode
[occt.git] / src / BSplCLib / BSplCLib.lxx
CommitLineData
b311480e 1// Created on: 1993-05-04
2// Created by: Philippe DAUTRY
3// Copyright (c) 1993-1999 Matra Datavision
973c2be1 4// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5//
973c2be1 6// This file is part of Open CASCADE Technology software library.
b311480e 7//
d5f74e42 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
973c2be1 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.
b311480e 13//
973c2be1 14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
7fd59977 16
17#include <PLib.hxx>
18#include <TColgp_Array1OfPnt.hxx>
19#include <TColgp_Array1OfPnt2d.hxx>
20
21//=======================================================================
22//function : MaxDegree
23//purpose :
24//=======================================================================
25
26inline Standard_Integer BSplCLib::MaxDegree ()
27{
28 return 25;
29}
30
31//=======================================================================
32//function : NoWeights
33//purpose :
34//=======================================================================
35
0e14656b 36inline TColStd_Array1OfReal* BSplCLib::NoWeights()
7fd59977 37{
0e14656b 38 return NULL;
7fd59977 39}
40
41//=======================================================================
42//function : NoMults
43//purpose :
44//=======================================================================
45
0e14656b 46inline TColStd_Array1OfInteger* BSplCLib::NoMults()
7fd59977 47{
0e14656b 48 return NULL;
7fd59977 49}
50
51//=======================================================================
52//function : CoefsD0
53//purpose :
54//=======================================================================
55
56inline void BSplCLib::CoefsD0(const Standard_Real U,
57 const TColgp_Array1OfPnt& Poles,
0e14656b 58 const TColStd_Array1OfReal* Weights,
7fd59977 59 gp_Pnt& P)
60{
61 BSplCLib::CacheD0(U, Poles.Length() -1, 0., 1., Poles, Weights, P);
62}
63
64//=======================================================================
65//function : CoefsD0
66//purpose :
67//=======================================================================
68
69inline void BSplCLib::CoefsD0(const Standard_Real U,
70 const TColgp_Array1OfPnt2d& Poles,
0e14656b 71 const TColStd_Array1OfReal* Weights,
7fd59977 72 gp_Pnt2d& P)
73{
74 BSplCLib::CacheD0(U, Poles.Length() -1, 0., 1., Poles, Weights, P);
75}
76
77//=======================================================================
78//function : CoefsD1
79//purpose :
80//=======================================================================
81
82inline void BSplCLib::CoefsD1(const Standard_Real U,
83 const TColgp_Array1OfPnt& Poles,
0e14656b 84 const TColStd_Array1OfReal* Weights,
7fd59977 85 gp_Pnt& P,
86 gp_Vec& Vec)
87{
88 BSplCLib::CacheD1(U, Poles.Length() -1, 0., 1., Poles, Weights, P, Vec);
89}
90
91//=======================================================================
92//function : CoefsD1
93//purpose :
94//=======================================================================
95
96inline void BSplCLib::CoefsD1(const Standard_Real U,
97 const TColgp_Array1OfPnt2d& Poles,
0e14656b 98 const TColStd_Array1OfReal* Weights,
7fd59977 99 gp_Pnt2d& P,
100 gp_Vec2d& Vec)
101{
102 BSplCLib::CacheD1(U, Poles.Length() -1, 0., 1., Poles, Weights, P, Vec);
103}
104
105//=======================================================================
106//function : CoefsD2
107//purpose :
108//=======================================================================
109
110inline void BSplCLib::CoefsD2(const Standard_Real U,
111 const TColgp_Array1OfPnt& Poles,
0e14656b 112 const TColStd_Array1OfReal* Weights,
7fd59977 113 gp_Pnt& P,
114 gp_Vec& Vec1,
115 gp_Vec& Vec2)
116{
117 BSplCLib::CacheD2(U, Poles.Length() -1, 0., 1., Poles, Weights,
118 P, Vec1, Vec2);
119}
120
121//=======================================================================
122//function : CoefsD2
123//purpose :
124//=======================================================================
125
126inline void BSplCLib::CoefsD2(const Standard_Real U,
127 const TColgp_Array1OfPnt2d& Poles,
0e14656b 128 const TColStd_Array1OfReal* Weights,
7fd59977 129 gp_Pnt2d& P,
130 gp_Vec2d& Vec1,
131 gp_Vec2d& Vec2)
132{
133 BSplCLib::CacheD2(U, Poles.Length() -1, 0., 1., Poles, Weights,
134 P, Vec1, Vec2);
135}
136
137//=======================================================================
138//function : CoefsD3
139//purpose :
140//=======================================================================
141
142inline void BSplCLib::CoefsD3(const Standard_Real U,
143 const TColgp_Array1OfPnt& Poles,
0e14656b 144 const TColStd_Array1OfReal* Weights,
7fd59977 145 gp_Pnt& P,
146 gp_Vec& Vec1,
147 gp_Vec& Vec2,
148 gp_Vec& Vec3)
149{
150 BSplCLib::CacheD3(U, Poles.Length() -1, 0., 1., Poles, Weights,
151 P, Vec1, Vec2, Vec3);
152}
153
154//=======================================================================
155//function : CoefsD3
156//purpose :
157//=======================================================================
158
159inline void BSplCLib::CoefsD3(const Standard_Real U,
160 const TColgp_Array1OfPnt2d& Poles,
0e14656b 161 const TColStd_Array1OfReal* Weights,
7fd59977 162 gp_Pnt2d& P,
163 gp_Vec2d& Vec1,
164 gp_Vec2d& Vec2,
165 gp_Vec2d& Vec3)
166{
167 BSplCLib::CacheD3(U, Poles.Length() -1, 0., 1., Poles, Weights,
168 P, Vec1, Vec2, Vec3);
169}
170
171//=======================================================================
172//function : PolesCoefficients
173//purpose :
174//=======================================================================
175
176inline void BSplCLib::PolesCoefficients
177(const TColgp_Array1OfPnt& Poles,
178 TColgp_Array1OfPnt& CachePoles)
179{
180 BSplCLib::PolesCoefficients(Poles, PLib::NoWeights(),
181 CachePoles, PLib::NoWeights());
182}
183
184//=======================================================================
185//function : PolesCoefficients
186//purpose :
187//=======================================================================
188
189inline void BSplCLib::PolesCoefficients
190(const TColgp_Array1OfPnt2d& Poles,
191 TColgp_Array1OfPnt2d& CachePoles)
192{
193 BSplCLib::PolesCoefficients(Poles, PLib::NoWeights(),
194 CachePoles, PLib::NoWeights());
195}
196