0031687: Draw Harness, ViewerTest - extend command vrenderparams with option updating...
[occt.git] / src / HLRBRep / HLRBRep_EdgeBuilder.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_EdgeBuilder_HeaderFile
18#define _HLRBRep_EdgeBuilder_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <TopAbs_State.hxx>
25#include <Standard_Integer.hxx>
26#include <Standard_Boolean.hxx>
27#include <TopAbs_Orientation.hxx>
28class HLRBRep_AreaLimit;
29class Standard_NoMoreObject;
30class Standard_NoSuchObject;
31class Standard_DomainError;
32class HLRBRep_VertexList;
33class HLRAlgo_Intersection;
34
35
36
37class HLRBRep_EdgeBuilder
38{
39public:
40
41 DEFINE_STANDARD_ALLOC
42
43
44 //! Creates an EdgeBuilder algorithm. <VList>
45 //! describes the edge and the interferences.
46 //! AreaLimits are created from the vertices.
47 //! Builds(IN) is automatically called.
48 Standard_EXPORT HLRBRep_EdgeBuilder(HLRBRep_VertexList& VList);
49
50 //! Initialize an iteration on the areas.
51 Standard_EXPORT void InitAreas();
52
53 //! Set the current area to the next area.
54 Standard_EXPORT void NextArea();
55
56 //! Set the current area to the previous area.
57 Standard_EXPORT void PreviousArea();
58
59 //! Returns True if there is a current area.
60 Standard_EXPORT Standard_Boolean HasArea() const;
61
62 //! Returns the state of the current area.
63 Standard_EXPORT TopAbs_State AreaState() const;
64
65 //! Returns the edge state of the current area.
66 Standard_EXPORT TopAbs_State AreaEdgeState() const;
67
68 //! Returns the AreaLimit beginning the current area.
69 //! This is a NULL handle when the area is infinite on
70 //! the left.
71 Standard_EXPORT Handle(HLRBRep_AreaLimit) LeftLimit() const;
72
73 //! Returns the AreaLimit ending the current area.
74 //! This is a NULL handle when the area is infinite on
75 //! the right.
76 Standard_EXPORT Handle(HLRBRep_AreaLimit) RightLimit() const;
77
78 //! Reinitialize the results iteration to the parts
79 //! with State <ToBuild>. If this method is not called
80 //! after construction the default is <ToBuild> = IN.
81 Standard_EXPORT void Builds (const TopAbs_State ToBuild);
82
83 //! Returns True if there are more new edges to build.
84 Standard_EXPORT Standard_Boolean MoreEdges() const;
85
86 //! Proceeds to the next edge to build. Skip all
87 //! remaining vertices on the current edge.
88 Standard_EXPORT void NextEdge();
89
90 //! True if there are more vertices in the current new
91 //! edge.
92 Standard_EXPORT Standard_Boolean MoreVertices() const;
93
94 //! Proceeds to the next vertex of the current edge.
95 Standard_EXPORT void NextVertex();
96
97 //! Returns the current vertex of the current edge.
98 Standard_EXPORT const HLRAlgo_Intersection& Current() const;
99
100 //! Returns True if the current vertex comes from the
101 //! boundary of the edge.
102 Standard_EXPORT Standard_Boolean IsBoundary() const;
103
104 //! Returns True if the current vertex was an
105 //! interference.
106 Standard_EXPORT Standard_Boolean IsInterference() const;
107
108 //! Returns the new orientation of the current vertex.
109 Standard_EXPORT TopAbs_Orientation Orientation() const;
110
111 Standard_EXPORT void Destroy();
112~HLRBRep_EdgeBuilder()
113{
114 Destroy();
115}
116
117
118
119
120protected:
121
122
123
124
125
126private:
127
128
129
130 TopAbs_State toBuild;
131 Handle(HLRBRep_AreaLimit) myLimits;
132 Handle(HLRBRep_AreaLimit) left;
133 Handle(HLRBRep_AreaLimit) right;
134 Standard_Integer current;
135
136
137};
138
139
140
141
142
143
144
145#endif // _HLRBRep_EdgeBuilder_HeaderFile