Warning, /include/opencascade/BSplCLib.lxx is written in an unsupported language. File is not indexed.
0001 // Created on: 1993-05-04
0002 // Created by: Philippe DAUTRY
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 <PLib.hxx>
0018 #include <gp_Pnt.hxx>
0019 #include <NCollection_Array1.hxx>
0020 #include <gp_Pnt2d.hxx>
0021
0022 //=================================================================================================
0023
0024 inline constexpr int BSplCLib::MaxDegree()
0025 {
0026 return 25;
0027 }
0028
0029 //=================================================================================================
0030
0031 inline NCollection_Array1<double>* BSplCLib::NoWeights()
0032 {
0033 return nullptr;
0034 }
0035
0036 //=================================================================================================
0037
0038 inline NCollection_Array1<int>* BSplCLib::NoMults()
0039 {
0040 return nullptr;
0041 }
0042
0043 //=================================================================================================
0044
0045 inline void BSplCLib::CoefsD0(const double U,
0046 const NCollection_Array1<gp_Pnt>& Poles,
0047 const NCollection_Array1<double>* Weights,
0048 gp_Pnt& P)
0049 {
0050 BSplCLib::CacheD0(U, Poles.Length() - 1, 0., 1., Poles, Weights, P);
0051 }
0052
0053 //=================================================================================================
0054
0055 inline void BSplCLib::CoefsD0(const double U,
0056 const NCollection_Array1<gp_Pnt2d>& Poles,
0057 const NCollection_Array1<double>* Weights,
0058 gp_Pnt2d& P)
0059 {
0060 BSplCLib::CacheD0(U, Poles.Length() - 1, 0., 1., Poles, Weights, P);
0061 }
0062
0063 //=================================================================================================
0064
0065 inline void BSplCLib::CoefsD1(const double U,
0066 const NCollection_Array1<gp_Pnt>& Poles,
0067 const NCollection_Array1<double>* Weights,
0068 gp_Pnt& P,
0069 gp_Vec& Vec)
0070 {
0071 BSplCLib::CacheD1(U, Poles.Length() - 1, 0., 1., Poles, Weights, P, Vec);
0072 }
0073
0074 //=================================================================================================
0075
0076 inline void BSplCLib::CoefsD1(const double U,
0077 const NCollection_Array1<gp_Pnt2d>& Poles,
0078 const NCollection_Array1<double>* Weights,
0079 gp_Pnt2d& P,
0080 gp_Vec2d& Vec)
0081 {
0082 BSplCLib::CacheD1(U, Poles.Length() - 1, 0., 1., Poles, Weights, P, Vec);
0083 }
0084
0085 //=================================================================================================
0086
0087 inline void BSplCLib::CoefsD2(const double U,
0088 const NCollection_Array1<gp_Pnt>& Poles,
0089 const NCollection_Array1<double>* Weights,
0090 gp_Pnt& P,
0091 gp_Vec& Vec1,
0092 gp_Vec& Vec2)
0093 {
0094 BSplCLib::CacheD2(U, Poles.Length() - 1, 0., 1., Poles, Weights, P, Vec1, Vec2);
0095 }
0096
0097 //=================================================================================================
0098
0099 inline void BSplCLib::CoefsD2(const double U,
0100 const NCollection_Array1<gp_Pnt2d>& Poles,
0101 const NCollection_Array1<double>* Weights,
0102 gp_Pnt2d& P,
0103 gp_Vec2d& Vec1,
0104 gp_Vec2d& Vec2)
0105 {
0106 BSplCLib::CacheD2(U, Poles.Length() - 1, 0., 1., Poles, Weights, P, Vec1, Vec2);
0107 }
0108
0109 //=================================================================================================
0110
0111 inline void BSplCLib::CoefsD3(const double U,
0112 const NCollection_Array1<gp_Pnt>& Poles,
0113 const NCollection_Array1<double>* Weights,
0114 gp_Pnt& P,
0115 gp_Vec& Vec1,
0116 gp_Vec& Vec2,
0117 gp_Vec& Vec3)
0118 {
0119 BSplCLib::CacheD3(U, Poles.Length() - 1, 0., 1., Poles, Weights, P, Vec1, Vec2, Vec3);
0120 }
0121
0122 //=================================================================================================
0123
0124 inline void BSplCLib::CoefsD3(const double U,
0125 const NCollection_Array1<gp_Pnt2d>& Poles,
0126 const NCollection_Array1<double>* Weights,
0127 gp_Pnt2d& P,
0128 gp_Vec2d& Vec1,
0129 gp_Vec2d& Vec2,
0130 gp_Vec2d& Vec3)
0131 {
0132 BSplCLib::CacheD3(U, Poles.Length() - 1, 0., 1., Poles, Weights, P, Vec1, Vec2, Vec3);
0133 }
0134
0135 //=================================================================================================
0136
0137 inline void BSplCLib::PolesCoefficients(const NCollection_Array1<gp_Pnt>& Poles,
0138 NCollection_Array1<gp_Pnt>& CachePoles)
0139 {
0140 BSplCLib::PolesCoefficients(Poles, PLib::NoWeights(), CachePoles, PLib::NoWeights());
0141 }
0142
0143 //=================================================================================================
0144
0145 inline void BSplCLib::PolesCoefficients(const NCollection_Array1<gp_Pnt2d>& Poles,
0146 NCollection_Array1<gp_Pnt2d>& CachePoles)
0147 {
0148 BSplCLib::PolesCoefficients(Poles, PLib::NoWeights(), CachePoles, PLib::NoWeights());
0149 }