Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-09 09:16:39

0001 // Created on: 1997-10-22
0002 // Created by: Philippe MANGIN / Sergey SOKOLOV
0003 // Copyright (c) 1997-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 #ifndef _PLib_Base_HeaderFile
0018 #define _PLib_Base_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <Standard_Transient.hxx>
0024 #include <Standard_Integer.hxx>
0025 #include <TColStd_Array1OfReal.hxx>
0026 #include <Standard_Real.hxx>
0027 
0028 class PLib_Base;
0029 DEFINE_STANDARD_HANDLE(PLib_Base, Standard_Transient)
0030 
0031 //! To work with different polynomial's Bases
0032 class PLib_Base : public Standard_Transient
0033 {
0034 
0035 public:
0036   //! Convert the polynomial P(t) in the canonical base.
0037   Standard_EXPORT virtual void ToCoefficients(const Standard_Integer      Dimension,
0038                                               const Standard_Integer      Degree,
0039                                               const TColStd_Array1OfReal& CoeffinBase,
0040                                               TColStd_Array1OfReal&       Coefficients) const = 0;
0041 
0042   //! Compute the values of the basis functions in u
0043   Standard_EXPORT virtual void D0(const Standard_Real U, TColStd_Array1OfReal& BasisValue) = 0;
0044 
0045   //! Compute the values and the derivatives values of
0046   //! the basis functions in u
0047   Standard_EXPORT virtual void D1(const Standard_Real   U,
0048                                   TColStd_Array1OfReal& BasisValue,
0049                                   TColStd_Array1OfReal& BasisD1) = 0;
0050 
0051   //! Compute the values and the derivatives values of
0052   //! the basis functions in u
0053   Standard_EXPORT virtual void D2(const Standard_Real   U,
0054                                   TColStd_Array1OfReal& BasisValue,
0055                                   TColStd_Array1OfReal& BasisD1,
0056                                   TColStd_Array1OfReal& BasisD2) = 0;
0057 
0058   //! Compute the values and the derivatives values of
0059   //! the basis functions in u
0060   Standard_EXPORT virtual void D3(const Standard_Real   U,
0061                                   TColStd_Array1OfReal& BasisValue,
0062                                   TColStd_Array1OfReal& BasisD1,
0063                                   TColStd_Array1OfReal& BasisD2,
0064                                   TColStd_Array1OfReal& BasisD3) = 0;
0065 
0066   //! returns WorkDegree
0067   Standard_EXPORT virtual Standard_Integer WorkDegree() const = 0;
0068 
0069   //! Compute NewDegree <= MaxDegree so that MaxError is lower
0070   //! than Tol.
0071   //! MaxError can be greater than Tol if it is not possible
0072   //! to find a NewDegree <= MaxDegree.
0073   //! In this case NewDegree = MaxDegree
0074   Standard_EXPORT virtual void ReduceDegree(const Standard_Integer Dimension,
0075                                             const Standard_Integer MaxDegree,
0076                                             const Standard_Real    Tol,
0077                                             Standard_Real&         BaseCoeff,
0078                                             Standard_Integer&      NewDegree,
0079                                             Standard_Real&         MaxError) const = 0;
0080 
0081   DEFINE_STANDARD_RTTIEXT(PLib_Base, Standard_Transient)
0082 
0083 protected:
0084 private:
0085 };
0086 
0087 #endif // _PLib_Base_HeaderFile