0027232: Configuration - fix mblen missing building issue on Android
[occt.git] / src / Geom2dHatch / Geom2dHatch_FClass2dOfClassifier.hxx
CommitLineData
42cf5bc1 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>
32class Standard_DomainError;
33class Geom2dAdaptor_Curve;
34class Geom2dHatch_Intersector;
35class gp_Lin2d;
36
37
38
39class Geom2dHatch_FClass2dOfClassifier
40{
41public:
42
43 DEFINE_STANDARD_ALLOC
44
45
36b9ff75 46 //! Creates an undefined classifier.
42cf5bc1 47 Standard_EXPORT Geom2dHatch_FClass2dOfClassifier();
48
36b9ff75 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.
42cf5bc1 54 Standard_EXPORT void Reset (const gp_Lin2d& L, const Standard_Real P, const Standard_Real Tol);
55
36b9ff75 56 //! Updates the classification process with the edge
57 //! <E> from the boundary.
42cf5bc1 58 Standard_EXPORT void Compare (const Geom2dAdaptor_Curve& E, const TopAbs_Orientation Or);
59
36b9ff75 60 //! Returns the current value of the parameter.
42cf5bc1 61 Standard_Real Parameter() const;
62
36b9ff75 63 //! Returns the intersecting algorithm.
42cf5bc1 64 Geom2dHatch_Intersector& Intersector();
65
36b9ff75 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.
42cf5bc1 70 Standard_Integer ClosestIntersection() const;
71
36b9ff75 72 //! Returns the current state of the point.
42cf5bc1 73 TopAbs_State State() const;
74
36b9ff75 75 //! Returns the Standard_True if the closest intersection point
76 //! represents head or end of the edge. Returns Standard_False
77 //! otherwise.
42cf5bc1 78 Standard_Boolean IsHeadOrEnd() const;
79
80
81
82
83protected:
84
85
86
87
88
89private:
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