Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/opencascade/Law_Constant.hxx was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // Created on: 1996-03-29
0002 // Created by: Laurent BOURESCHE
0003 // Copyright (c) 1996-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 _Law_Constant_HeaderFile
0018 #define _Law_Constant_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <Standard_Real.hxx>
0024 #include <Law_Function.hxx>
0025 #include <GeomAbs_Shape.hxx>
0026 #include <Standard_Integer.hxx>
0027 #include <NCollection_Array1.hxx>
0028 
0029 //! Loi constante
0030 class Law_Constant : public Law_Function
0031 {
0032 
0033 public:
0034   Standard_EXPORT Law_Constant();
0035 
0036   //! Set the radius and the range of the constant Law.
0037   Standard_EXPORT void Set(const double Radius, const double PFirst, const double PLast);
0038 
0039   //! Returns GeomAbs_CN
0040   Standard_EXPORT GeomAbs_Shape Continuity() const override;
0041 
0042   //! Returns 1
0043   Standard_EXPORT int NbIntervals(const GeomAbs_Shape S) const override;
0044 
0045   Standard_EXPORT void Intervals(NCollection_Array1<double>& T,
0046                                  const GeomAbs_Shape         S) const override;
0047 
0048   //! Returns the value at parameter X.
0049   Standard_EXPORT double Value(const double X) override;
0050 
0051   //! Returns the value and the first derivative at parameter X.
0052   Standard_EXPORT void D1(const double X, double& F, double& D) override;
0053 
0054   //! Returns the value, first and second derivatives
0055   //! at parameter X.
0056   Standard_EXPORT void D2(const double X, double& F, double& D, double& D2) override;
0057 
0058   Standard_EXPORT occ::handle<Law_Function> Trim(const double PFirst,
0059                                                  const double PLast,
0060                                                  const double Tol) const override;
0061 
0062   //! Returns the parametric bounds of the function.
0063   Standard_EXPORT void Bounds(double& PFirst, double& PLast) override;
0064 
0065   DEFINE_STANDARD_RTTIEXT(Law_Constant, Law_Function)
0066 
0067 private:
0068   double radius;
0069   double first;
0070   double last;
0071 };
0072 
0073 #endif // _Law_Constant_HeaderFile