summaryrefslogtreecommitdiff
path: root/inc/IntAna_IntConicQuad.hxx
blob: f0a42991375422f867e9778d9398f62f3f8a3389 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
// This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to 
// this header file considered to be the "object code" form of the original source.

#ifndef _IntAna_IntConicQuad_HeaderFile
#define _IntAna_IntConicQuad_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#endif

#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
#ifndef _gp_Pnt_HeaderFile
#include <gp_Pnt.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
class StdFail_NotDone;
class Standard_OutOfRange;
class Standard_DomainError;
class gp_Lin;
class IntAna_Quadric;
class gp_Circ;
class gp_Elips;
class gp_Parab;
class gp_Hypr;
class gp_Pln;
class gp_Pnt;


//! This class provides the analytic intersection between <br>
//!          a conic defined as an element of gp (Lin,Circ,Elips, <br>
//!          Parab,Hypr) and a quadric as defined in the class <br>
//!          Quadric from IntAna. <br>
//!          The intersection between a conic and a plane is treated <br>
//!          as a special case. <br>
//! <br>
//!          The result of the intersection are points (Pnt from <br>
//!          gp), associated with the parameter on the conic. <br>
//! <br>
//!          A call to an Intersection  L:Lin from gp and <br>
//!          SPH: Sphere from gp can be written either : <br>
//!               IntAna_IntConicQuad Inter(L,IntAna_Quadric(SPH)) <br>
//!           or : <br>
//!               IntAna_IntConicQuad Inter(L,SPH) (it is necessary <br>
//!                  to include IntAna_Quadric.hxx in this case) <br>
class IntAna_IntConicQuad  {
public:

  void* operator new(size_t,void* anAddress) 
  {
    return anAddress;
  }
  void* operator new(size_t size) 
  {
    return Standard::Allocate(size); 
  }
  void  operator delete(void *anAddress) 
  {
    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
  }

  //! Empty constructor. <br>
//! <br>
  Standard_EXPORT   IntAna_IntConicQuad();
  //! Creates the intersection between a line and a quadric. <br>
  Standard_EXPORT   IntAna_IntConicQuad(const gp_Lin& L,const IntAna_Quadric& Q);
  //! Intersects a line and a quadric. <br>
  Standard_EXPORT     void Perform(const gp_Lin& L,const IntAna_Quadric& Q) ;
  //! Creates the intersection between a circle and a quadric. <br>
  Standard_EXPORT   IntAna_IntConicQuad(const gp_Circ& C,const IntAna_Quadric& Q);
  //! Intersects a circle and a quadric. <br>
  Standard_EXPORT     void Perform(const gp_Circ& C,const IntAna_Quadric& Q) ;
  //! Creates the intersection between an ellipse and a quadric. <br>
  Standard_EXPORT   IntAna_IntConicQuad(const gp_Elips& E,const IntAna_Quadric& Q);
  //! Intersects an ellipse and a quadric. <br>
  Standard_EXPORT     void Perform(const gp_Elips& E,const IntAna_Quadric& Q) ;
  //! Creates the intersection between a parabola and a quadric. <br>
  Standard_EXPORT   IntAna_IntConicQuad(const gp_Parab& P,const IntAna_Quadric& Q);
  //! Intersects a parabola and a quadric. <br>
  Standard_EXPORT     void Perform(const gp_Parab& P,const IntAna_Quadric& Q) ;
  //! Creates the intersection between an hyperbola and <br>
//!          a quadric. <br>
  Standard_EXPORT   IntAna_IntConicQuad(const gp_Hypr& H,const IntAna_Quadric& Q);
  //! Intersects an hyperbola and a quadric. <br>
  Standard_EXPORT     void Perform(const gp_Hypr& H,const IntAna_Quadric& Q) ;
  //! Intersection between a line and a plane. <br>
//!          Tolang is used to determine if the angle between two <br>
//!          vectors is null. <br>
  Standard_EXPORT   IntAna_IntConicQuad(const gp_Lin& L,const gp_Pln& P,const Standard_Real Tolang);
  //! Intersects a line and a plane. <br>
//!          Tolang is used to determine if the angle between two <br>
//!          vectors is null. <br>
  Standard_EXPORT     void Perform(const gp_Lin& L,const gp_Pln& P,const Standard_Real Tolang) ;
  //! Intersection between a circle and a plane. <br>
//!          Tolang is used to determine if the angle between two <br>
//!          vectors is null. <br>
//!          Tol is used to determine if a distance is null. <br>
  Standard_EXPORT   IntAna_IntConicQuad(const gp_Circ& C,const gp_Pln& P,const Standard_Real Tolang,const Standard_Real Tol);
  //! Intersects a circle and a plane. <br>
//!          Tolang is used to determine if the angle between two <br>
//!          vectors is null. <br>
//!          Tol is used to determine if a distance is null. <br>
  Standard_EXPORT     void Perform(const gp_Circ& C,const gp_Pln& P,const Standard_Real Tolang,const Standard_Real Tol) ;
  //! Intersection between an ellipse and a plane. <br>
//!          Tolang is used to determine if the angle between two <br>
//!          vectors is null. <br>
//!          Tol is used to determine if a distance is null. <br>
  Standard_EXPORT   IntAna_IntConicQuad(const gp_Elips& E,const gp_Pln& P,const Standard_Real Tolang,const Standard_Real Tol);
  //! Intersects an ellipse and a plane. <br>
//!          Tolang is used to determine if the angle between two <br>
//!          vectors is null. <br>
//!          Tol is used to determine if a distance is null. <br>
  Standard_EXPORT     void Perform(const gp_Elips& E,const gp_Pln& P,const Standard_Real Tolang,const Standard_Real Tol) ;
  //! Intersection between a parabola and a plane. <br>
//!          Tolang is used to determine if the angle between two <br>
//!          vectors is null. <br>
  Standard_EXPORT   IntAna_IntConicQuad(const gp_Parab& Pb,const gp_Pln& P,const Standard_Real Tolang);
  //! Intersects a parabola and a plane. <br>
//!          Tolang is used to determine if the angle between two <br>
//!          vectors is null. <br>
  Standard_EXPORT     void Perform(const gp_Parab& Pb,const gp_Pln& P,const Standard_Real Tolang) ;
  //! Intersection between an hyperbola and a plane. <br>
//!          Tolang is used to determine if the angle between two <br>
//!          vectors is null. <br>
  Standard_EXPORT   IntAna_IntConicQuad(const gp_Hypr& H,const gp_Pln& P,const Standard_Real Tolang);
  //! Intersects an hyperbola and a plane. <br>
//!          Tolang is used to determine if the angle between two <br>
//!          vectors is null. <br>
  Standard_EXPORT     void Perform(const gp_Hypr& H,const gp_Pln& P,const Standard_Real Tolang) ;
  //! Returns TRUE if the creation completed. <br>
//! <br>
        Standard_Boolean IsDone() const;
  //! Returns TRUE if the conic is in the quadric. <br>
//! <br>
        Standard_Boolean IsInQuadric() const;
  //! Returns TRUE if the line is in a quadric which <br>
//!          is parallel to the quadric. <br>
        Standard_Boolean IsParallel() const;
  //! Returns the number of intersection point. <br>
//! <br>
        Standard_Integer NbPoints() const;
  //! Returns the point of range N. <br>
//! <br>
       const gp_Pnt& Point(const Standard_Integer N) const;
  //! Returns the parameter on the line of the intersection <br>
//!          point of range N. <br>
//! <br>
        Standard_Real ParamOnConic(const Standard_Integer N) const;





protected:





private:



Standard_Boolean done;
Standard_Boolean parallel;
Standard_Boolean inquadric;
Standard_Integer nbpts;
gp_Pnt pnts[4];
Standard_Real paramonc[4];


};


#include <IntAna_IntConicQuad.lxx>



// other Inline functions and methods (like "C++: function call" methods)


#endif