0031668: Visualization - WebGL sample doesn't work on Emscripten 1.39
[occt.git] / src / HLRBRep / HLRBRep_EdgeInterferenceTool.hxx
CommitLineData
42cf5bc1 1// Created on: 1997-04-17
2// Created by: Christophe MARION
3// Copyright (c) 1997-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 _HLRBRep_EdgeInterferenceTool_HeaderFile
18#define _HLRBRep_EdgeInterferenceTool_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <HLRAlgo_Intersection.hxx>
25#include <Standard_Integer.hxx>
26#include <Standard_Boolean.hxx>
27#include <TopAbs_Orientation.hxx>
28#include <Standard_Real.hxx>
29class HLRBRep_Data;
30class HLRAlgo_Intersection;
31class gp_Dir;
32class HLRAlgo_Interference;
33
34
35//! Implements the methods required to instantiates
36//! the EdgeInterferenceList from HLRAlgo.
37class HLRBRep_EdgeInterferenceTool
38{
39public:
40
41 DEFINE_STANDARD_ALLOC
42
43
44 Standard_EXPORT HLRBRep_EdgeInterferenceTool(const Handle(HLRBRep_Data)& DS);
45
46 Standard_EXPORT void LoadEdge();
47
48 void InitVertices();
49
50 Standard_Boolean MoreVertices() const;
51
52 void NextVertex();
53
54 const HLRAlgo_Intersection& CurrentVertex() const;
55
56 TopAbs_Orientation CurrentOrientation() const;
57
58 Standard_Real CurrentParameter() const;
59
60 Standard_Boolean IsPeriodic() const;
61
62 //! Returns local geometric description of the Edge at
63 //! parameter <Para>. See method Reset of class
64 //! EdgeFaceTransition from TopCnx for other arguments.
65 Standard_EXPORT void EdgeGeometry (const Standard_Real Param, gp_Dir& Tgt, gp_Dir& Nrm, Standard_Real& Curv) const;
66
67 Standard_Real ParameterOfInterference (const HLRAlgo_Interference& I) const;
68
69 //! True if the two interferences are on the same
70 //! geometric locus.
71 Standard_EXPORT Standard_Boolean SameInterferences (const HLRAlgo_Interference& I1, const HLRAlgo_Interference& I2) const;
72
73 //! True if the Interference and the current Vertex
74 //! are on the same geometric locus.
75 Standard_EXPORT Standard_Boolean SameVertexAndInterference (const HLRAlgo_Interference& I) const;
76
77 //! Returns the geometry of the boundary at the
78 //! interference <I>. See the AddInterference method
79 //! of the class EdgeFaceTransition from TopCnx for
80 //! the other arguments.
81 Standard_EXPORT void InterferenceBoundaryGeometry (const HLRAlgo_Interference& I, gp_Dir& Tang, gp_Dir& Norm, Standard_Real& Curv) const;
82
83
84
85
86protected:
87
88
89
90
91
92private:
93
94
95
96 Handle(HLRBRep_Data) myDS;
97 HLRAlgo_Intersection inter[2];
98 Standard_Integer cur;
99
100
101};
102
103
104#include <HLRBRep_EdgeInterferenceTool.lxx>
105
106
107
108
109
110#endif // _HLRBRep_EdgeInterferenceTool_HeaderFile