0022048: Visualization, AIS_InteractiveContext - single object selection should alway...
[occt.git] / src / IntCurveSurface / IntCurveSurface_TheInterferenceOfHInter.hxx
1 // Created on: 1993-04-07
2 // Created by: Laurent BUCHARD
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #ifndef _IntCurveSurface_TheInterferenceOfHInter_HeaderFile
18 #define _IntCurveSurface_TheInterferenceOfHInter_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <Standard_Boolean.hxx>
25 #include <Standard_Integer.hxx>
26 #include <Intf_Interference.hxx>
27 #include <Intf_Array1OfLin.hxx>
28 #include <Standard_Real.hxx>
29 class IntCurveSurface_ThePolygonOfHInter;
30 class IntCurveSurface_ThePolygonToolOfHInter;
31 class IntCurveSurface_ThePolyhedronOfHInter;
32 class IntCurveSurface_ThePolyhedronToolOfHInter;
33 class gp_Lin;
34 class Bnd_BoundSortBox;
35 class gp_Pnt;
36 class gp_XYZ;
37
38
39
40 class IntCurveSurface_TheInterferenceOfHInter  : public Intf_Interference
41 {
42 public:
43
44   DEFINE_STANDARD_ALLOC
45
46   
47   //! Constructs  an  empty   interference  between Polygon   and
48   //! Polyhedron.
49   Standard_EXPORT IntCurveSurface_TheInterferenceOfHInter();
50   
51   //! Constructs and computes an interference between the Polygon
52   //! and the Polyhedron.
53   Standard_EXPORT IntCurveSurface_TheInterferenceOfHInter(const IntCurveSurface_ThePolygonOfHInter& thePolyg, const IntCurveSurface_ThePolyhedronOfHInter& thePolyh);
54   
55   //! Constructs  and computes  an  interference   between    the
56   //! Straight Line and the Polyhedron.
57   Standard_EXPORT IntCurveSurface_TheInterferenceOfHInter(const gp_Lin& theLin, const IntCurveSurface_ThePolyhedronOfHInter& thePolyh);
58   
59   //! Constructs   and   computes  an  interference   between the
60   //! Straight Lines and the Polyhedron.
61   Standard_EXPORT IntCurveSurface_TheInterferenceOfHInter(const Intf_Array1OfLin& theLins, const IntCurveSurface_ThePolyhedronOfHInter& thePolyh);
62   
63   //! Computes  an interference    between the   Polygon  and the
64   //! Polyhedron.
65   Standard_EXPORT void Perform (const IntCurveSurface_ThePolygonOfHInter& thePolyg, const IntCurveSurface_ThePolyhedronOfHInter& thePolyh);
66   
67   //! Computes an interference between the Straight  Line and the
68   //! Polyhedron.
69   Standard_EXPORT void Perform (const gp_Lin& theLin, const IntCurveSurface_ThePolyhedronOfHInter& thePolyh);
70   
71   //! Computes an interference  between the  Straight Lines  and
72   //! the Polyhedron.
73   Standard_EXPORT void Perform (const Intf_Array1OfLin& theLins, const IntCurveSurface_ThePolyhedronOfHInter& thePolyh);
74   
75   //! Constructs and computes an interference between the Polygon
76   //! and the Polyhedron.
77   Standard_EXPORT IntCurveSurface_TheInterferenceOfHInter(const IntCurveSurface_ThePolygonOfHInter& thePolyg, const IntCurveSurface_ThePolyhedronOfHInter& thePolyh, Bnd_BoundSortBox& theBoundSB);
78   
79   //! Constructs  and computes  an  interference   between    the
80   //! Straight Line and the Polyhedron.
81   Standard_EXPORT IntCurveSurface_TheInterferenceOfHInter(const gp_Lin& theLin, const IntCurveSurface_ThePolyhedronOfHInter& thePolyh, Bnd_BoundSortBox& theBoundSB);
82   
83   //! Constructs   and   computes  an  interference   between the
84   //! Straight Lines and the Polyhedron.
85   Standard_EXPORT IntCurveSurface_TheInterferenceOfHInter(const Intf_Array1OfLin& theLins, const IntCurveSurface_ThePolyhedronOfHInter& thePolyh, Bnd_BoundSortBox& theBoundSB);
86   
87   //! Computes  an interference    between the   Polygon  and the
88   //! Polyhedron.
89   Standard_EXPORT void Perform (const IntCurveSurface_ThePolygonOfHInter& thePolyg, const IntCurveSurface_ThePolyhedronOfHInter& thePolyh, Bnd_BoundSortBox& theBoundSB);
90   
91   //! Computes an interference between the Straight  Line and the
92   //! Polyhedron.
93   Standard_EXPORT void Perform (const gp_Lin& theLin, const IntCurveSurface_ThePolyhedronOfHInter& thePolyh, Bnd_BoundSortBox& theBoundSB);
94   
95   //! Computes an interference  between the  Straight Lines  and
96   //! the Polyhedron.
97   Standard_EXPORT void Perform (const Intf_Array1OfLin& theLins, const IntCurveSurface_ThePolyhedronOfHInter& thePolyh, Bnd_BoundSortBox& theBoundSB);
98   
99   //! Compares the boundings between the segment of <thePolyg> and
100   //! the facets of <thePolyh>.
101   Standard_EXPORT void Interference (const IntCurveSurface_ThePolygonOfHInter& thePolyg, const IntCurveSurface_ThePolyhedronOfHInter& thePolyh, Bnd_BoundSortBox& theBoundSB);
102   
103   //! Compares the boundings between the segment of <thePolyg> and
104   //! the facets of <thePolyh>.
105   Standard_EXPORT void Interference (const IntCurveSurface_ThePolygonOfHInter& thePolyg, const IntCurveSurface_ThePolyhedronOfHInter& thePolyh);
106
107
108
109
110 protected:
111
112
113
114
115
116 private:
117
118   
119   //! Computes the intersection between  the segment <BegO><EndO>
120   //! and the triangle <TTri> of <thePolyh>.
121   Standard_EXPORT void Intersect (const gp_Pnt& BegO, const gp_Pnt& EndO, const Standard_Boolean Infinite, const Standard_Integer TTri, const IntCurveSurface_ThePolyhedronOfHInter& thePolyh);
122   
123   //! Computes the intersection between  the segment <BegO><EndO>
124   //! and the triangle <TTri> of <thePolyh>.
125   Standard_EXPORT void Intersect (const gp_Pnt& BegO, const gp_Pnt& EndO, const Standard_Boolean Infinite, const Standard_Integer TTri, const IntCurveSurface_ThePolyhedronOfHInter& thePolyh, const gp_XYZ& TriNormal, const Standard_Real TriDp, const Standard_Real dBegTri, const Standard_Real dEndTri);
126
127
128   Standard_Boolean BeginOfClosedPolygon;
129   Standard_Integer iLin;
130
131
132 };
133
134
135
136
137
138
139
140 #endif // _IntCurveSurface_TheInterferenceOfHInter_HeaderFile