Back to home page

EIC code displayed by LXR

 
 

    


Warning, /include/opencascade/BSplSLib.lxx is written in an unsupported language. File is not indexed.

0001 // Created on: 1993-11-25
0002 // Created by: Bruno DUMORTIER
0003 // Copyright (c) 1993-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #include <BSplCLib.hxx>
0018 #include <gp_Pnt.hxx>
0019 #include <NCollection_Array2.hxx>
0020 
0021 //=================================================================================================
0022 
0023 inline void BSplSLib::CoefsD0(const double                      U,
0024                               const double                      V,
0025                               const NCollection_Array2<gp_Pnt>& Poles,
0026                               const NCollection_Array2<double>* Weights,
0027                               gp_Pnt&                           Point)
0028 {
0029   BSplSLib::CacheD0(U,
0030                     V,
0031                     Poles.RowLength() - 1,
0032                     Poles.ColLength() - 1,
0033                     0.,
0034                     0.,
0035                     1.,
0036                     1.,
0037                     Poles,
0038                     Weights,
0039                     Point);
0040 }
0041 
0042 //=================================================================================================
0043 
0044 inline void BSplSLib::CoefsD1(const double                      U,
0045                               const double                      V,
0046                               const NCollection_Array2<gp_Pnt>& Poles,
0047                               const NCollection_Array2<double>* Weights,
0048                               gp_Pnt&                           Point,
0049                               gp_Vec&                           VecU,
0050                               gp_Vec&                           VecV)
0051 {
0052   BSplSLib::CacheD1(U,
0053                     V,
0054                     Poles.RowLength() - 1,
0055                     Poles.ColLength() - 1,
0056                     0.,
0057                     0.,
0058                     1.,
0059                     1.,
0060                     Poles,
0061                     Weights,
0062                     Point,
0063                     VecU,
0064                     VecV);
0065 }
0066 
0067 //=================================================================================================
0068 
0069 inline void BSplSLib::CoefsD2(const double                      U,
0070                               const double                      V,
0071                               const NCollection_Array2<gp_Pnt>& Poles,
0072                               const NCollection_Array2<double>* Weights,
0073                               gp_Pnt&                           Point,
0074                               gp_Vec&                           VecU,
0075                               gp_Vec&                           VecV,
0076                               gp_Vec&                           VecUU,
0077                               gp_Vec&                           VecUV,
0078                               gp_Vec&                           VecVV)
0079 {
0080   BSplSLib::CacheD2(U,
0081                     V,
0082                     Poles.RowLength() - 1,
0083                     Poles.ColLength() - 1,
0084                     0.,
0085                     0.,
0086                     1.,
0087                     1.,
0088                     Poles,
0089                     Weights,
0090                     Point,
0091                     VecU,
0092                     VecV,
0093                     VecUU,
0094                     VecUV,
0095                     VecVV);
0096 }
0097 
0098 //=================================================================================================
0099 
0100 inline void BSplSLib::PolesCoefficients(const NCollection_Array2<gp_Pnt>& Poles,
0101                                         NCollection_Array2<gp_Pnt>&       CachePoles)
0102 {
0103   BSplSLib::PolesCoefficients(Poles, BSplSLib::NoWeights(), CachePoles, BSplSLib::NoWeights());
0104 }
0105 
0106 //=================================================================================================
0107 
0108 inline NCollection_Array2<double>* BSplSLib::NoWeights()
0109 {
0110   return nullptr;
0111 }