56814977b63ea697a2601023144dd21f6f6e8cef
[occt.git] / src / Contap / Contap_ArcFunction.hxx
1 // Created on: 1993-06-03
2 // Created by: Jacques GOUSSARD
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #ifndef _Contap_ArcFunction_HeaderFile
18 #define _Contap_ArcFunction_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <Standard_Real.hxx>
25 #include <Contap_TFunction.hxx>
26 #include <gp_Dir.hxx>
27 #include <gp_Pnt.hxx>
28 #include <TColgp_SequenceOfPnt.hxx>
29 #include <IntSurf_Quadric.hxx>
30 #include <math_FunctionWithDerivative.hxx>
31 #include <Standard_Boolean.hxx>
32 #include <Standard_Integer.hxx>
33 class Adaptor2d_HCurve2d;
34 class Adaptor3d_HSurface;
35 class gp_Dir;
36 class gp_Pnt;
37 class IntSurf_Quadric;
38
39
40
41 class Contap_ArcFunction  : public math_FunctionWithDerivative
42 {
43 public:
44
45   DEFINE_STANDARD_ALLOC
46
47   
48   Standard_EXPORT Contap_ArcFunction();
49   
50   Standard_EXPORT void Set (const Handle(Adaptor3d_HSurface)& S);
51   
52     void Set (const gp_Dir& Direction);
53   
54     void Set (const gp_Dir& Direction, const Standard_Real Angle);
55   
56     void Set (const gp_Pnt& Eye);
57   
58     void Set (const gp_Pnt& Eye, const Standard_Real Angle);
59   
60     void Set (const Handle(Adaptor2d_HCurve2d)& A);
61   
62   Standard_EXPORT Standard_Boolean Value (const Standard_Real X, Standard_Real& F) Standard_OVERRIDE;
63   
64   Standard_EXPORT Standard_Boolean Derivative (const Standard_Real X, Standard_Real& D) Standard_OVERRIDE;
65   
66   Standard_EXPORT Standard_Boolean Values (const Standard_Real X, Standard_Real& F, Standard_Real& D) Standard_OVERRIDE;
67   
68   Standard_EXPORT Standard_Integer NbSamples() const;
69   
70   Standard_EXPORT virtual Standard_Integer GetStateNumber() Standard_OVERRIDE;
71   
72     const gp_Pnt& Valpoint (const Standard_Integer Index) const;
73   
74   Standard_EXPORT const IntSurf_Quadric& Quadric() const;
75
76
77
78
79 protected:
80
81
82
83
84
85 private:
86
87
88
89   Handle(Adaptor2d_HCurve2d) myArc;
90   Handle(Adaptor3d_HSurface) mySurf;
91   Standard_Real myMean;
92   Contap_TFunction myType;
93   gp_Dir myDir;
94   Standard_Real myCosAng;
95   gp_Pnt myEye;
96   gp_Pnt solpt;
97   TColgp_SequenceOfPnt seqpt;
98   IntSurf_Quadric myQuad;
99
100
101 };
102
103
104 #include <Contap_ArcFunction.lxx>
105
106
107
108
109
110 #endif // _Contap_ArcFunction_HeaderFile