0031668: Visualization - WebGL sample doesn't work on Emscripten 1.39
[occt.git] / src / BSplSLib / BSplSLib.lxx
CommitLineData
b311480e 1// Created on: 1993-11-25
2// Created by: Bruno DUMORTIER
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 <BSplCLib.hxx>
18#include <TColgp_Array2OfPnt.hxx>
19#include <TColStd_Array2OfReal.hxx>
20
21//=======================================================================
22//function : CoefsD0
23//purpose :
24//=======================================================================
25
26inline void BSplSLib::CoefsD0(const Standard_Real U,
27 const Standard_Real V,
28 const TColgp_Array2OfPnt& Poles,
0e14656b 29 const TColStd_Array2OfReal* Weights,
7fd59977 30 gp_Pnt& Point)
31{
32 BSplSLib::CacheD0(U, V,
33 Poles.RowLength() - 1, Poles.ColLength() - 1,
34 0., 0., 1., 1.,
35 Poles, Weights, Point);
36}
37
38//=======================================================================
39//function : CoefsD1
40//purpose :
41//=======================================================================
42
43inline void BSplSLib::CoefsD1(const Standard_Real U,
44 const Standard_Real V,
45 const TColgp_Array2OfPnt& Poles,
0e14656b 46 const TColStd_Array2OfReal* Weights,
7fd59977 47 gp_Pnt& Point,
48 gp_Vec& VecU,
49 gp_Vec& VecV)
50{
51 BSplSLib::CacheD1(U, V,
52 Poles.RowLength() - 1, Poles.ColLength() - 1,
53 0., 0., 1., 1.,
54 Poles, Weights, Point, VecU, VecV);
55}
56
57//=======================================================================
58//function : CoefsD2
59//purpose :
60//=======================================================================
61
62inline void BSplSLib::CoefsD2(const Standard_Real U,
63 const Standard_Real V,
64 const TColgp_Array2OfPnt& Poles,
0e14656b 65 const TColStd_Array2OfReal* Weights,
7fd59977 66 gp_Pnt& Point,
67 gp_Vec& VecU,
68 gp_Vec& VecV,
69 gp_Vec& VecUU,
70 gp_Vec& VecUV,
71 gp_Vec& VecVV)
72{
73 BSplSLib::CacheD2(U, V,
74 Poles.RowLength() - 1, Poles.ColLength() - 1,
75 0., 0., 1., 1.,
76 Poles, Weights, Point, VecU, VecV,
77 VecUU, VecUV, VecVV);
78}
79
80
81//=======================================================================
82//function : PolesCoefficients
83//purpose :
84//=======================================================================
85
86inline void BSplSLib::PolesCoefficients(const TColgp_Array2OfPnt& Poles,
87 TColgp_Array2OfPnt& CachePoles)
88{
89 BSplSLib::PolesCoefficients(Poles, BSplSLib::NoWeights(),
90 CachePoles, BSplSLib::NoWeights());
91}
92
93//=======================================================================
94//function : NoWeights
95//purpose :
96//=======================================================================
97
0e14656b 98inline TColStd_Array2OfReal* BSplSLib::NoWeights()
7fd59977 99{
0e14656b 100 return NULL;
7fd59977 101}
102