0026936: Drawbacks of inlining in new type system in OCCT 7.0 -- automatic
[occt.git] / src / BRepApprox / BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox.hxx
CommitLineData
42cf5bc1 1// Created on: 1995-06-06
2// Created by: Jean Yves LEBEY
3// Copyright (c) 1995-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 _BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox_HeaderFile
18#define _BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <Standard_Address.hxx>
25#include <Standard_Real.hxx>
26#include <gp_Pnt.hxx>
27#include <Standard_Boolean.hxx>
28#include <gp_Vec.hxx>
29#include <gp_Dir2d.hxx>
30#include <math_FunctionSetWithDerivatives.hxx>
31#include <Standard_Integer.hxx>
32#include <math_Vector.hxx>
33class StdFail_UndefinedDerivative;
34class BRepAdaptor_Surface;
35class BRepApprox_SurfaceTool;
36class IntSurf_Quadric;
37class IntSurf_QuadricTool;
38class math_Matrix;
39class gp_Pnt;
40class gp_Vec;
41class gp_Dir2d;
42
43
44
45class BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox : public math_FunctionSetWithDerivatives
46{
47public:
48
49 DEFINE_STANDARD_ALLOC
50
51
52 Standard_EXPORT BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox();
53
54 Standard_EXPORT BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox(const BRepAdaptor_Surface& PS, const IntSurf_Quadric& IS);
55
56 Standard_EXPORT BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox(const IntSurf_Quadric& IS);
57
58 void Set (const BRepAdaptor_Surface& PS);
59
60 void SetImplicitSurface (const IntSurf_Quadric& IS);
61
62 void Set (const Standard_Real Tolerance);
63
64 Standard_EXPORT Standard_Integer NbVariables() const;
65
66 Standard_EXPORT Standard_Integer NbEquations() const;
67
68 Standard_EXPORT Standard_Boolean Value (const math_Vector& X, math_Vector& F);
69
70 Standard_EXPORT Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& D);
71
72 Standard_EXPORT Standard_Boolean Values (const math_Vector& X, math_Vector& F, math_Matrix& D);
73
74 Standard_Real Root() const;
75
36b9ff75 76 //! Returns the value Tol so that if Abs(Func.Root())<Tol
77 //! the function is considered null.
42cf5bc1 78 Standard_Real Tolerance() const;
79
80 const gp_Pnt& Point() const;
81
82 Standard_EXPORT Standard_Boolean IsTangent();
83
84 const gp_Vec& Direction3d();
85
86 const gp_Dir2d& Direction2d();
87
88 const BRepAdaptor_Surface& PSurface() const;
89
90 const IntSurf_Quadric& ISurface() const;
91
92
93
94
95protected:
96
97
98
99
100
101private:
102
103
104
105 Standard_Address surf;
106 Standard_Address func;
107 Standard_Real u;
108 Standard_Real v;
109 Standard_Real tol;
110 gp_Pnt pntsol;
111 Standard_Real valf;
112 Standard_Boolean computed;
113 Standard_Boolean tangent;
114 Standard_Real tgdu;
115 Standard_Real tgdv;
116 gp_Vec gradient;
117 Standard_Boolean derived;
118 gp_Vec d1u;
119 gp_Vec d1v;
120 gp_Vec d3d;
121 gp_Dir2d d2d;
122
123
124};
125
126#define ThePSurface BRepAdaptor_Surface
127#define ThePSurface_hxx <BRepAdaptor_Surface.hxx>
128#define ThePSurfaceTool BRepApprox_SurfaceTool
129#define ThePSurfaceTool_hxx <BRepApprox_SurfaceTool.hxx>
130#define TheISurface IntSurf_Quadric
131#define TheISurface_hxx <IntSurf_Quadric.hxx>
132#define TheISurfaceTool IntSurf_QuadricTool
133#define TheISurfaceTool_hxx <IntSurf_QuadricTool.hxx>
134#define IntImp_ZerImpFunc BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox
135#define IntImp_ZerImpFunc_hxx <BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox.hxx>
136
137#include <IntImp_ZerImpFunc.lxx>
138
139#undef ThePSurface
140#undef ThePSurface_hxx
141#undef ThePSurfaceTool
142#undef ThePSurfaceTool_hxx
143#undef TheISurface
144#undef TheISurface_hxx
145#undef TheISurfaceTool
146#undef TheISurfaceTool_hxx
147#undef IntImp_ZerImpFunc
148#undef IntImp_ZerImpFunc_hxx
149
150
151
152
153#endif // _BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox_HeaderFile