Commit | Line | Data |
---|---|---|
92d1589b A |
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_ExtPC_HeaderFile | |
7 | #define _BRepExtrema_ExtPC_HeaderFile | |
8 | ||
9 | #ifndef _Standard_HeaderFile | |
10 | #include <Standard.hxx> | |
11 | #endif | |
12 | #ifndef _Standard_Macro_HeaderFile | |
13 | #include <Standard_Macro.hxx> | |
14 | #endif | |
15 | ||
16 | #ifndef _Extrema_ExtPC_HeaderFile | |
17 | #include <Extrema_ExtPC.hxx> | |
18 | #endif | |
19 | #ifndef _Handle_BRepAdaptor_HCurve_HeaderFile | |
20 | #include <Handle_BRepAdaptor_HCurve.hxx> | |
21 | #endif | |
22 | #ifndef _Standard_Boolean_HeaderFile | |
23 | #include <Standard_Boolean.hxx> | |
24 | #endif | |
25 | #ifndef _Standard_Integer_HeaderFile | |
26 | #include <Standard_Integer.hxx> | |
27 | #endif | |
28 | #ifndef _Standard_Real_HeaderFile | |
29 | #include <Standard_Real.hxx> | |
30 | #endif | |
31 | class BRepAdaptor_HCurve; | |
32 | class TopoDS_Vertex; | |
33 | class TopoDS_Edge; | |
34 | class gp_Pnt; | |
35 | ||
36 | ||
37 | class BRepExtrema_ExtPC | |
38 | { | |
39 | public: | |
40 | ||
41 | void* operator new(size_t,void* anAddress) | |
42 | { | |
43 | return anAddress; | |
44 | } | |
45 | void* operator new(size_t size) | |
46 | { | |
47 | return Standard::Allocate(size); | |
48 | } | |
49 | void operator delete(void *anAddress) | |
50 | { | |
51 | if (anAddress) Standard::Free((Standard_Address&)anAddress); | |
52 | } | |
53 | ||
54 | ||
55 | Standard_EXPORT BRepExtrema_ExtPC() | |
56 | { | |
57 | } | |
58 | //! It calculates all the distances. <br> | |
59 | Standard_EXPORT BRepExtrema_ExtPC(const TopoDS_Vertex& V,const TopoDS_Edge& E); | |
60 | ||
61 | Standard_EXPORT void Initialize(const TopoDS_Edge& E); | |
62 | //! An exception is raised if the fields have not been initialized. <br> | |
63 | Standard_EXPORT void Perform(const TopoDS_Vertex& V); | |
64 | //! True if the distances are found. <br> | |
65 | Standard_EXPORT Standard_Boolean IsDone() const | |
66 | { | |
67 | return myExtPC.IsDone(); | |
68 | } | |
69 | //! Returns the number of extremum distances. <br> | |
70 | Standard_EXPORT Standard_Integer NbExt() const | |
71 | { | |
72 | return myExtPC.NbExt(); | |
73 | } | |
74 | //! Returns True if the <N>th extremum distance is a minimum. <br> | |
75 | Standard_EXPORT Standard_Boolean IsMin(const Standard_Integer N) const | |
76 | { | |
77 | return myExtPC.IsMin(N); | |
78 | } | |
79 | //! Returns the value of the <N>th extremum square distance. <br> | |
80 | Standard_EXPORT Standard_Real SquareDistance(const Standard_Integer N) const | |
81 | { | |
82 | return myExtPC.SquareDistance(N); | |
83 | } | |
84 | //! Returns the parameter on the edge of the <N>th extremum distance. <br> | |
85 | Standard_EXPORT Standard_Real Parameter(const Standard_Integer N) const | |
86 | { | |
87 | return myExtPC.Point(N).Parameter(); | |
88 | } | |
89 | //! Returns the Point of the <N>th extremum distance. <br> | |
90 | Standard_EXPORT gp_Pnt Point(const Standard_Integer N) const | |
91 | { | |
92 | return myExtPC.Point(N).Value(); | |
93 | } | |
94 | //! if the curve is a trimmed curve, <br> | |
95 | //! dist1 is a square distance between <P> and the point <br> | |
96 | //! of parameter FirstParameter <pnt1> and <br> | |
97 | //! dist2 is a square distance between <P> and the point <br> | |
98 | //! of parameter LastParameter <pnt2>. <br> | |
99 | Standard_EXPORT void TrimmedSquareDistances(Standard_Real& dist1,Standard_Real& dist2,gp_Pnt& pnt1,gp_Pnt& pnt2) const | |
100 | { | |
101 | myExtPC.TrimmedSquareDistances(dist1,dist2,pnt1,pnt2); | |
102 | } | |
103 | ||
104 | private: | |
105 | ||
106 | Extrema_ExtPC myExtPC; | |
107 | Handle_BRepAdaptor_HCurve myHC; | |
108 | }; | |
109 | ||
110 | #endif |