0022048: Visualization, AIS_InteractiveContext - single object selection should alway...
[occt.git] / src / BRepClass / BRepClass_FClassifier.hxx
1 // Created on: 1992-11-18
2 // Created by: Remi LEQUETTE
3 // Copyright (c) 1992-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 _BRepClass_FClassifier_HeaderFile
18 #define _BRepClass_FClassifier_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <BRepClass_FClass2dOfFClassifier.hxx>
25 #include <BRepClass_Edge.hxx>
26 #include <Standard_Real.hxx>
27 #include <IntRes2d_Position.hxx>
28 #include <Standard_Boolean.hxx>
29 #include <TopAbs_State.hxx>
30 class Standard_DomainError;
31 class BRepClass_FaceExplorer;
32 class BRepClass_Edge;
33 class BRepClass_Intersector;
34 class BRepClass_FClass2dOfFClassifier;
35 class gp_Pnt2d;
36
37
38
39 class BRepClass_FClassifier 
40 {
41 public:
42
43   DEFINE_STANDARD_ALLOC
44
45   
46   //! Empty constructor, undefined algorithm.
47   Standard_EXPORT BRepClass_FClassifier();
48   
49   //! Creates an algorithm to classify the Point  P with
50   //! Tolerance <T> on the face described by <F>.
51   Standard_EXPORT BRepClass_FClassifier(BRepClass_FaceExplorer& F, const gp_Pnt2d& P, const Standard_Real Tol);
52   
53   //! Classify  the Point  P  with  Tolerance <T> on the
54   //! face described by <F>.
55   Standard_EXPORT void Perform (BRepClass_FaceExplorer& F, const gp_Pnt2d& P, const Standard_Real Tol);
56   
57   //! Returns the result of the classification.
58   Standard_EXPORT TopAbs_State State() const;
59   
60   //! Returns  True when  the   state was computed by  a
61   //! rejection. The state is OUT.
62     Standard_Boolean Rejected() const;
63   
64   //! Returns True if  the face  contains  no wire.  The
65   //! state is IN.
66     Standard_Boolean NoWires() const;
67   
68   //! Returns   the    Edge  used   to    determine  the
69   //! classification. When the State is ON  this  is the
70   //! Edge containing the point.
71   Standard_EXPORT const BRepClass_Edge& Edge() const;
72   
73   //! Returns the parameter on Edge() used to determine  the
74   //! classification.
75   Standard_EXPORT Standard_Real EdgeParameter() const;
76   
77   //! Returns the  position of  the   point on the  edge
78   //! returned by Edge.
79     IntRes2d_Position Position() const;
80
81
82
83
84 protected:
85
86
87
88   BRepClass_FClass2dOfFClassifier myClassifier;
89   BRepClass_Edge myEdge;
90   Standard_Real myEdgeParameter;
91   IntRes2d_Position myPosition;
92   Standard_Boolean rejected;
93   Standard_Boolean nowires;
94
95
96 private:
97
98
99
100
101
102 };
103
104 #define TheFaceExplorer BRepClass_FaceExplorer
105 #define TheFaceExplorer_hxx <BRepClass_FaceExplorer.hxx>
106 #define TheEdge BRepClass_Edge
107 #define TheEdge_hxx <BRepClass_Edge.hxx>
108 #define TheIntersection2d BRepClass_Intersector
109 #define TheIntersection2d_hxx <BRepClass_Intersector.hxx>
110 #define TopClass_FClass2d BRepClass_FClass2dOfFClassifier
111 #define TopClass_FClass2d_hxx <BRepClass_FClass2dOfFClassifier.hxx>
112 #define TopClass_FaceClassifier BRepClass_FClassifier
113 #define TopClass_FaceClassifier_hxx <BRepClass_FClassifier.hxx>
114
115 #include <TopClass_FaceClassifier.lxx>
116
117 #undef TheFaceExplorer
118 #undef TheFaceExplorer_hxx
119 #undef TheEdge
120 #undef TheEdge_hxx
121 #undef TheIntersection2d
122 #undef TheIntersection2d_hxx
123 #undef TopClass_FClass2d
124 #undef TopClass_FClass2d_hxx
125 #undef TopClass_FaceClassifier
126 #undef TopClass_FaceClassifier_hxx
127
128
129
130
131 #endif // _BRepClass_FClassifier_HeaderFile