0031668: Visualization - WebGL sample doesn't work on Emscripten 1.39
[occt.git] / src / Extrema / Extrema_GenLocateExtSS.hxx
1 // Created on: 1996-01-22
2 // Created by: Laurent PAINNOT
3 // Copyright (c) 1996-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 _Extrema_GenLocateExtSS_HeaderFile
18 #define _Extrema_GenLocateExtSS_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <Standard_Boolean.hxx>
25 #include <Standard_Real.hxx>
26 #include <Extrema_POnSurf.hxx>
27 class Standard_DomainError;
28 class StdFail_NotDone;
29 class Adaptor3d_Surface;
30 class Extrema_POnSurf;
31
32
33 //! With two close points it calculates the distance
34 //! between two surfaces.
35 //! This distance can be a minimum or a maximum.
36 class Extrema_GenLocateExtSS 
37 {
38 public:
39
40   DEFINE_STANDARD_ALLOC
41
42   
43   Standard_EXPORT Extrema_GenLocateExtSS();
44   
45   //! Calculates the distance with two close points.
46   //! The close points are defined by the parameter values
47   //! (U1,V1) for S1 and (U2,V2) for S2.
48   //! The function F(u1,v1,u2,v2)=distance(S1(u1,v1),S2(u2,v2))
49   //! has an extremun when gradient(F)=0. The algorithm searchs
50   //! a zero near the close points.
51   Standard_EXPORT Extrema_GenLocateExtSS(const Adaptor3d_Surface& S1, const Adaptor3d_Surface& S2, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2, const Standard_Real Tol1, const Standard_Real Tol2);
52   
53   Standard_EXPORT void Perform (const Adaptor3d_Surface& S1, const Adaptor3d_Surface& S2, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2, const Standard_Real Tol1, const Standard_Real Tol2);
54   
55   //! Returns True if the distance is found.
56   Standard_EXPORT Standard_Boolean IsDone() const;
57   
58   //! Returns the value of the extremum square distance.
59   Standard_EXPORT Standard_Real SquareDistance() const;
60   
61   //! Returns the point of the extremum distance on S1.
62   Standard_EXPORT const Extrema_POnSurf& PointOnS1() const;
63   
64   //! Returns the point of the extremum distance on S2.
65   Standard_EXPORT const Extrema_POnSurf& PointOnS2() const;
66
67
68
69
70 protected:
71
72
73
74
75
76 private:
77
78
79
80   Standard_Boolean myDone;
81   Standard_Real mySqDist;
82   Extrema_POnSurf myPoint1;
83   Extrema_POnSurf myPoint2;
84
85
86 };
87
88
89
90
91
92
93
94 #endif // _Extrema_GenLocateExtSS_HeaderFile