Warnings on vc14 were eliminated
[occt.git] / src / Geom2dHatch / Geom2dHatch_FClass2dOfClassifier.hxx
1 // Created on: 1994-02-03
2 // Created by: Jean Marc LACHAUME
3 // Copyright (c) 1994-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 _Geom2dHatch_FClass2dOfClassifier_HeaderFile
18 #define _Geom2dHatch_FClass2dOfClassifier_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <Standard_Boolean.hxx>
25 #include <gp_Lin2d.hxx>
26 #include <Standard_Real.hxx>
27 #include <TopTrans_CurveTransition.hxx>
28 #include <Geom2dHatch_Intersector.hxx>
29 #include <Standard_Integer.hxx>
30 #include <TopAbs_State.hxx>
31 #include <TopAbs_Orientation.hxx>
32 class Standard_DomainError;
33 class Geom2dAdaptor_Curve;
34 class Geom2dHatch_Intersector;
35 class gp_Lin2d;
36
37
38
39 class Geom2dHatch_FClass2dOfClassifier 
40 {
41 public:
42
43   DEFINE_STANDARD_ALLOC
44
45   
46   //! Creates an undefined classifier.
47   Standard_EXPORT Geom2dHatch_FClass2dOfClassifier();
48   
49   //! Starts  a  classification process.   The  point to
50   //! classify is the origin of  the  line <L>.  <P>  is
51   //! the original length of the segment on <L>  used to
52   //! compute  intersections.   <Tol> is the   tolerance
53   //! attached to the line segment in intersections.
54   Standard_EXPORT void Reset (const gp_Lin2d& L, const Standard_Real P, const Standard_Real Tol);
55   
56   //! Updates  the classification process with  the edge
57   //! <E> from the boundary.
58   Standard_EXPORT void Compare (const Geom2dAdaptor_Curve& E, const TopAbs_Orientation Or);
59   
60   //! Returns the current value of the parameter.
61     Standard_Real Parameter() const;
62   
63   //! Returns the intersecting algorithm.
64     Geom2dHatch_Intersector& Intersector();
65   
66   //! Returns  0  if  the   last  compared   edge had no
67   //! relevant intersection.  Else returns  the index of
68   //! this   intersection  in the    last   intersection
69   //! algorithm.
70     Standard_Integer ClosestIntersection() const;
71   
72   //! Returns the current state of the point.
73     TopAbs_State State() const;
74   
75   //! Returns the Standard_True if the closest intersection point
76   //! represents head or end of the edge. Returns Standard_False
77   //! otherwise.
78     Standard_Boolean IsHeadOrEnd() const;
79
80
81
82
83 protected:
84
85
86
87
88
89 private:
90
91
92
93   Standard_Boolean myIsSet;
94   Standard_Boolean myFirstCompare;
95   Standard_Boolean myFirstTrans;
96   gp_Lin2d myLin;
97   Standard_Real myParam;
98   Standard_Real myTolerance;
99   TopTrans_CurveTransition myTrans;
100   Geom2dHatch_Intersector myIntersector;
101   Standard_Integer myClosest;
102   TopAbs_State myState;
103   Standard_Boolean myIsHeadOrEnd;
104
105
106 };
107
108 #define TheEdge Geom2dAdaptor_Curve
109 #define TheEdge_hxx <Geom2dAdaptor_Curve.hxx>
110 #define TheIntersector Geom2dHatch_Intersector
111 #define TheIntersector_hxx <Geom2dHatch_Intersector.hxx>
112 #define TopClass_Classifier2d Geom2dHatch_FClass2dOfClassifier
113 #define TopClass_Classifier2d_hxx <Geom2dHatch_FClass2dOfClassifier.hxx>
114
115 #include <TopClass_Classifier2d.lxx>
116
117 #undef TheEdge
118 #undef TheEdge_hxx
119 #undef TheIntersector
120 #undef TheIntersector_hxx
121 #undef TopClass_Classifier2d
122 #undef TopClass_Classifier2d_hxx
123
124
125
126
127 #endif // _Geom2dHatch_FClass2dOfClassifier_HeaderFile