0023024: Update headers of OCCT files
[occt.git] / src / BRepExtrema / BRepExtrema_SolutionElem.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.
17
92d1589b
A
18// This file is generated by WOK (CPPExt).
19// Please do not edit this file; modify original file instead.
20// The copyright and license terms as defined for the original file apply to
21// this header file considered to be the "object code" form of the original source.
22
23#ifndef _BRepExtrema_SolutionElem_HeaderFile
24#define _BRepExtrema_SolutionElem_HeaderFile
25
26#ifndef _Standard_HeaderFile
27#include <Standard.hxx>
28#endif
1c35b92f 29#ifndef _Standard_DefineAlloc_HeaderFile
30#include <Standard_DefineAlloc.hxx>
31#endif
92d1589b
A
32#ifndef _Standard_Macro_HeaderFile
33#include <Standard_Macro.hxx>
34#endif
35
36#ifndef _Standard_Real_HeaderFile
37#include <Standard_Real.hxx>
38#endif
39#ifndef _gp_Pnt_HeaderFile
40#include <gp_Pnt.hxx>
41#endif
42#ifndef _BRepExtrema_SupportType_HeaderFile
43#include <BRepExtrema_SupportType.hxx>
44#endif
45#ifndef _TopoDS_Vertex_HeaderFile
46#include <TopoDS_Vertex.hxx>
47#endif
48#ifndef _TopoDS_Edge_HeaderFile
49#include <TopoDS_Edge.hxx>
50#endif
51#ifndef _TopoDS_Face_HeaderFile
52#include <TopoDS_Face.hxx>
53#endif
54class gp_Pnt;
55class TopoDS_Vertex;
56class TopoDS_Edge;
57class TopoDS_Face;
58
59
60//! This class is used to store information relative to the <br>
61//! minimum distance between two shapes. <br>
62class BRepExtrema_SolutionElem
63{
64 public:
65
1c35b92f 66 DEFINE_STANDARD_ALLOC
92d1589b 67
92d1589b
A
68 Standard_EXPORT BRepExtrema_SolutionElem()
69 : myDist(0.), myPoint(0.,0.,0.), mySupType(BRepExtrema_IsVertex), myPar1(0.), myPar2(0.)
70 {
71 }
72 //! initialisation of the fields <br>
73 //! This constructor is used when the solution of a distance is a Vertex. <br>
74 //! The different initialized fields are: <br>
75 //! _ the distance d <br>
76 //! _ the solution point <br>
77 //! _ the type of solution <br>
78 //! _ and the Vertex. <br>
79 Standard_EXPORT BRepExtrema_SolutionElem(const Standard_Real d,const gp_Pnt& Pt,const BRepExtrema_SupportType SolType,const TopoDS_Vertex& vertex)
80 : myDist(d), myPoint(Pt), mySupType(SolType), myVertex(vertex), myPar1(0.), myPar2(0.)
81 {
82 }
83 //! initialisation of the fiels. <br>
84 //! This constructor is used when the solution of distance is on an Edge. <br>
85 //! The different initialized fields are: <br>
86 //! _ the distance d, <br>
87 //! _ the solution point, <br>
88 //! _ the type of solution, <br>
89 //! _ the Edge, <br>
90 //! _ and the parameter t to locate the solution. <br>
91 Standard_EXPORT BRepExtrema_SolutionElem(const Standard_Real d,const gp_Pnt& Pt,const BRepExtrema_SupportType SolType,const TopoDS_Edge& edge,const Standard_Real t)
92 : myDist(d), myPoint(Pt), mySupType(SolType), myEdge(edge), myPar1(t), myPar2(0.)
93 {
94 }
95 //! initialisation of the fields <br>
96 //! This constructor is used when the solution of distance is in <br>
97 //! a Face. The different initialized fields are: <br>
98 //! _ the distance d, <br>
99 //! _ the solution point, <br>
100 //! _ the type of solution, <br>
101 //! _ the Face, <br>
102 //! _ and the parameter u et v to locate the solution. <br>
103 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)
104 : myDist(d), myPoint(Pt), mySupType(SolType), myFace(face), myPar1(u), myPar2(v)
105 {
106 }
107 //! returns the value of the minimum distance. <br>
108 Standard_EXPORT Standard_Real Dist() const
109 {
110 return myDist;
111 }
112 //! returns the solution point. <br>
113 Standard_EXPORT const gp_Pnt & Point() const
114 {
115 return myPoint;
116 }
117 //! returns the Support type : <br>
118 //! IsVertex => The solution is a vertex. <br>
119 //! IsOnEdge => The solution belongs to an Edge. <br>
120 //! IsInFace => The solution is inside a Face. <br>
121 Standard_EXPORT BRepExtrema_SupportType SupportKind() const
122 {
123 return mySupType;
124 }
125 //! returns the vertex if the solution is a Vertex. <br>
126 Standard_EXPORT const TopoDS_Vertex & Vertex() const
127 {
128 return myVertex;
129 }
130 //! returns the vertex if the solution is an Edge. <br>
131 Standard_EXPORT const TopoDS_Edge & Edge() const
132 {
133 return myEdge;
134 }
135 //! returns the vertex if the solution is an Face. <br>
136 Standard_EXPORT const TopoDS_Face & Face() const
137 {
138 return myFace;
139 }
140 //! returns the parameter t if the solution is on Edge. <br>
141 Standard_EXPORT void EdgeParameter(Standard_Real& par1) const
142 {
143 par1 = myPar1;
144 }
145 //! returns the parameters u et v if the solution is in a Face. <br>
146 Standard_EXPORT void FaceParameter(Standard_Real& par1,Standard_Real& par2) const
147 {
148 par1 = myPar1;
149 par2 = myPar2;
150 }
151
152 private:
153
154 Standard_Real myDist;
155 gp_Pnt myPoint;
156 BRepExtrema_SupportType mySupType;
157 TopoDS_Vertex myVertex;
158 TopoDS_Edge myEdge;
159 TopoDS_Face myFace;
160 Standard_Real myPar1;
161 Standard_Real myPar2;
162};
163
164#endif