0024171: Eliminate CLang compiler warning -Wreorder
[occt.git] / src / BRepExtrema / BRepExtrema_ExtFF.hxx
CommitLineData
b311480e 1// Copyright (c) 1999-2012 OPEN CASCADE SAS
2//
3// The content of this file is subject to the Open CASCADE Technology Public
4// License Version 6.5 (the "License"). You may not use the content of this file
5// except in compliance with the License. Please obtain a copy of the License
6// at http://www.opencascade.org and read it completely before using this file.
7//
8// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
9// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
10//
11// The Original Code and all software distributed under the License is
12// distributed on an "AS IS" basis, without warranty of any kind, and the
13// Initial Developer hereby disclaims all such warranties, including without
14// limitation, any warranties of merchantability, fitness for a particular
15// purpose or non-infringement. Please see the License for the specific terms
16// and conditions governing the rights and limitations under the License.
92d1589b
A
17
18#ifndef _BRepExtrema_ExtFF_HeaderFile
19#define _BRepExtrema_ExtFF_HeaderFile
20
21#ifndef _Standard_HeaderFile
22#include <Standard.hxx>
23#endif
1c35b92f 24#ifndef _Standard_DefineAlloc_HeaderFile
25#include <Standard_DefineAlloc.hxx>
26#endif
92d1589b
A
27#ifndef _Standard_Macro_HeaderFile
28#include <Standard_Macro.hxx>
29#endif
30
31#ifndef _Extrema_ExtSS_HeaderFile
32#include <Extrema_ExtSS.hxx>
33#endif
34#ifndef _Standard_Integer_HeaderFile
35#include <Standard_Integer.hxx>
36#endif
37#ifndef _TColStd_SequenceOfReal_HeaderFile
38#include <TColStd_SequenceOfReal.hxx>
39#endif
40#ifndef _Extrema_SequenceOfPOnSurf_HeaderFile
41#include <Extrema_SequenceOfPOnSurf.hxx>
42#endif
43#ifndef _Handle_BRepAdaptor_HSurface_HeaderFile
44#include <Handle_BRepAdaptor_HSurface.hxx>
45#endif
46#ifndef _Standard_Boolean_HeaderFile
47#include <Standard_Boolean.hxx>
48#endif
49#ifndef _Standard_Real_HeaderFile
50#include <Standard_Real.hxx>
51#endif
52#ifndef _Extrema_POnSurf_HeaderFile
53#include <Extrema_POnSurf.hxx>
54#endif
55class BRepAdaptor_HSurface;
56class TopoDS_Face;
57class gp_Pnt;
58
59
60
61class BRepExtrema_ExtFF
62{
63 public:
64
1c35b92f 65 DEFINE_STANDARD_ALLOC
92d1589b
A
66
67 Standard_EXPORT BRepExtrema_ExtFF()
68 {
69 }
70 //! It calculates all the distances. <br>
71 Standard_EXPORT BRepExtrema_ExtFF(const TopoDS_Face& F1,const TopoDS_Face& F2);
72
73 Standard_EXPORT void Initialize(const TopoDS_Face& F2) ;
74 //! An exception is raised if the fields have not been initialized. <br>
75 //! Be careful: this method uses the Face F2 only for classify, not for the fields. <br>
76 Standard_EXPORT void Perform(const TopoDS_Face& F1,const TopoDS_Face& F2);
77 //! True if the distances are found. <br>
78 Standard_EXPORT Standard_Boolean IsDone() const
79 {
80 return myExtSS.IsDone();
81 }
82 //! Returns True if the surfaces are parallel. <br>
83 Standard_EXPORT Standard_Boolean IsParallel() const
84 {
85 return myExtSS.IsParallel();
86 }
87 //! Returns the number of extremum distances. <br>
88 Standard_EXPORT Standard_Integer NbExt() const
89 {
90 return mySqDist.Length();
91 }
92 //! Returns the value of the <N>th extremum square distance. <br>
93 Standard_EXPORT Standard_Real SquareDistance(const Standard_Integer N) const
94 {
95 return mySqDist.Value(N);
96 }
97 //! Returns the parameters on the Face F1 of the <N>th extremum distance. <br>
98 Standard_EXPORT void ParameterOnFace1(const Standard_Integer N,Standard_Real& U,Standard_Real& V) const
99 {
100 myPointsOnS1.Value(N).Parameter(U, V);
101 }
102 //! Returns the parameters on the Face F2 of the <N>th extremum distance. <br>
103 Standard_EXPORT void ParameterOnFace2(const Standard_Integer N,Standard_Real& U,Standard_Real& V) const
104 {
105 myPointsOnS2.Value(N).Parameter(U, V);
106 }
107 //! Returns the Point of the <N>th extremum distance. <br>
108 Standard_EXPORT gp_Pnt PointOnFace1(const Standard_Integer N) const
109 {
110 return myPointsOnS1.Value(N).Value();
111 }
112 //! Returns the Point of the <N>th extremum distance. <br>
113 Standard_EXPORT gp_Pnt PointOnFace2(const Standard_Integer N) const
114 {
115 return myPointsOnS2.Value(N).Value();
116 }
117
118 private:
119
120 Extrema_ExtSS myExtSS;
121 TColStd_SequenceOfReal mySqDist;
122 Extrema_SequenceOfPOnSurf myPointsOnS1;
123 Extrema_SequenceOfPOnSurf myPointsOnS2;
124 Handle_BRepAdaptor_HSurface myHS;
125};
126
127#endif