Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:38

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