| 1 | // Created on: 1993-11-25 |
| 2 | // Created by: Bruno DUMORTIER |
| 3 | // Copyright (c) 1993-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 <BSplCLib.hxx> |
| 18 | #include <TColgp_Array2OfPnt.hxx> |
| 19 | #include <TColStd_Array2OfReal.hxx> |
| 20 | |
| 21 | //======================================================================= |
| 22 | //function : CoefsD0 |
| 23 | //purpose : |
| 24 | //======================================================================= |
| 25 | |
| 26 | inline void BSplSLib::CoefsD0(const Standard_Real U, |
| 27 | const Standard_Real V, |
| 28 | const TColgp_Array2OfPnt& Poles, |
| 29 | const TColStd_Array2OfReal& Weights, |
| 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 | |
| 43 | inline void BSplSLib::CoefsD1(const Standard_Real U, |
| 44 | const Standard_Real V, |
| 45 | const TColgp_Array2OfPnt& Poles, |
| 46 | const TColStd_Array2OfReal& Weights, |
| 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 | |
| 62 | inline void BSplSLib::CoefsD2(const Standard_Real U, |
| 63 | const Standard_Real V, |
| 64 | const TColgp_Array2OfPnt& Poles, |
| 65 | const TColStd_Array2OfReal& Weights, |
| 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 | |
| 86 | inline 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 | |
| 98 | inline TColStd_Array2OfReal& BSplSLib::NoWeights() |
| 99 | { |
| 100 | return (*((TColStd_Array2OfReal*) NULL)); |
| 101 | } |
| 102 | |