0024624: Lost word in license statement in source files
[occt.git] / src / BRepExtrema / BRepExtrema_SolutionElem.hxx
1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
2 //
3 // This file is part of Open CASCADE Technology software library.
4 //
5 // This library is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU Lesser General Public License version 2.1 as published
7 // by the Free Software Foundation, with special exception defined in the file
8 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 // distribution for complete text of the license and disclaimer of any warranty.
10 //
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
13
14 // This file is generated by WOK (CPPExt).
15 // Please do not edit this file; modify original file instead.
16 // The copyright and license terms as defined for the original file apply to 
17 // this header file considered to be the "object code" form of the original source.
18
19 #ifndef _BRepExtrema_SolutionElem_HeaderFile
20 #define _BRepExtrema_SolutionElem_HeaderFile
21
22 #ifndef _Standard_HeaderFile
23 #include <Standard.hxx>
24 #endif
25 #ifndef _Standard_DefineAlloc_HeaderFile
26 #include <Standard_DefineAlloc.hxx>
27 #endif
28 #ifndef _Standard_Macro_HeaderFile
29 #include <Standard_Macro.hxx>
30 #endif
31
32 #ifndef _Standard_Real_HeaderFile
33 #include <Standard_Real.hxx>
34 #endif
35 #ifndef _gp_Pnt_HeaderFile
36 #include <gp_Pnt.hxx>
37 #endif
38 #ifndef _BRepExtrema_SupportType_HeaderFile
39 #include <BRepExtrema_SupportType.hxx>
40 #endif
41 #ifndef _TopoDS_Vertex_HeaderFile
42 #include <TopoDS_Vertex.hxx>
43 #endif
44 #ifndef _TopoDS_Edge_HeaderFile
45 #include <TopoDS_Edge.hxx>
46 #endif
47 #ifndef _TopoDS_Face_HeaderFile
48 #include <TopoDS_Face.hxx>
49 #endif
50 class gp_Pnt;
51 class TopoDS_Vertex;
52 class TopoDS_Edge;
53 class TopoDS_Face;
54
55
56 //! This class is used to store information relative to the <br>
57 //! minimum distance between two shapes. <br>
58 class BRepExtrema_SolutionElem
59 {
60  public:
61
62   DEFINE_STANDARD_ALLOC
63
64   Standard_EXPORT BRepExtrema_SolutionElem()
65   : myDist(0.), myPoint(0.,0.,0.), mySupType(BRepExtrema_IsVertex), myPar1(0.), myPar2(0.)
66   {
67   }
68   //! initialisation of the fields <br>
69   //! This constructor is used when the solution of a distance is a Vertex. <br>
70   //! The different initialized fields are: <br>
71   //!            _ the distance d <br>
72   //!            _ the solution point <br>
73   //!            _ the type of solution <br>
74   //!            _ and the Vertex. <br>
75   Standard_EXPORT BRepExtrema_SolutionElem(const Standard_Real d,const gp_Pnt& Pt,const BRepExtrema_SupportType SolType,const TopoDS_Vertex& vertex)
76   : myDist(d), myPoint(Pt), mySupType(SolType), myVertex(vertex), myPar1(0.), myPar2(0.)
77   {
78   }
79   //! initialisation of  the fiels. <br>
80   //! This constructor is used when the  solution of distance is on an Edge. <br>
81   //! The different initialized fields are: <br>
82   //!            _ the distance d, <br>
83   //!            _ the solution point, <br>
84   //!            _ the type of solution, <br>
85   //!            _ the Edge, <br>
86   //!            _ and the parameter t to locate the solution. <br>
87   Standard_EXPORT BRepExtrema_SolutionElem(const Standard_Real d,const gp_Pnt& Pt,const BRepExtrema_SupportType SolType,const TopoDS_Edge& edge,const Standard_Real t)
88   : myDist(d), myPoint(Pt), mySupType(SolType), myEdge(edge), myPar1(t), myPar2(0.)
89   {
90   }
91   //! initialisation of the fields <br>
92   //! This constructor is used when the  solution of distance is in <br>
93   //! a Face. The different initialized fields are: <br>
94   //!            _ the distance d, <br>
95   //!            _ the solution point, <br>
96   //!            _ the type of solution, <br>
97   //!            _ the Face, <br>
98   //!            _ and the parameter u et v to locate the solution. <br>
99   Standard_EXPORT BRepExtrema_SolutionElem(const Standard_Real d,const gp_Pnt& Pt,const BRepExtrema_SupportType SolType,const TopoDS_Face& face,const Standard_Real u,const Standard_Real v)
100   : myDist(d), myPoint(Pt), mySupType(SolType), myFace(face), myPar1(u), myPar2(v)
101   {
102   }
103   //! returns the value of the minimum distance. <br>
104   Standard_EXPORT Standard_Real Dist() const
105   {
106     return myDist;
107   }
108   //! returns the solution point. <br>
109   Standard_EXPORT const gp_Pnt & Point() const
110   {
111     return myPoint;
112   }
113   //! returns the Support type : <br>
114   //!       IsVertex => The solution is a vertex. <br>
115   //!       IsOnEdge => The solution belongs to an Edge. <br>
116   //!       IsInFace => The solution is inside a Face. <br>
117   Standard_EXPORT BRepExtrema_SupportType SupportKind() const
118   {
119     return mySupType;
120   }
121   //! returns the vertex if the solution is a Vertex. <br>
122   Standard_EXPORT const TopoDS_Vertex & Vertex() const
123   {
124     return myVertex;
125   }
126   //! returns the vertex if the solution is an Edge. <br>
127   Standard_EXPORT const TopoDS_Edge & Edge() const
128   {
129     return myEdge;
130   }
131   //! returns the vertex if the solution is an Face. <br>
132   Standard_EXPORT const TopoDS_Face & Face() const
133   {
134     return myFace;
135   }
136   //! returns the parameter t if the solution is on Edge. <br>
137   Standard_EXPORT void EdgeParameter(Standard_Real& par1) const
138   {
139     par1 = myPar1;
140   }
141   //! returns the parameters u et v if the solution is in a Face. <br>
142   Standard_EXPORT void FaceParameter(Standard_Real& par1,Standard_Real& par2) const
143   {
144     par1 = myPar1;
145     par2 = myPar2;
146   }
147
148  private:
149
150   Standard_Real myDist;
151   gp_Pnt myPoint;
152   BRepExtrema_SupportType mySupType;
153   TopoDS_Vertex myVertex;
154   TopoDS_Edge myEdge;
155   TopoDS_Face myFace;
156   Standard_Real myPar1;
157   Standard_Real myPar2;
158 };
159
160 #endif