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