b311480e |
1 | // Created on: 1995-04-20 |
2 | // Created by: Christophe MARION |
3 | // Copyright (c) 1995-1999 Matra Datavision |
973c2be1 |
4 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | // |
973c2be1 |
6 | // This file is part of Open CASCADE Technology software library. |
b311480e |
7 | // |
d5f74e42 |
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 |
973c2be1 |
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. |
b311480e |
13 | // |
973c2be1 |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
7fd59977 |
16 | |
17 | #define EMaskOrient ((Standard_Boolean)15) |
18 | #define EMaskOutLine ((Standard_Boolean)16) |
19 | #define EMaskInternal ((Standard_Boolean)32) |
20 | #define EMaskDouble ((Standard_Boolean)64) |
21 | #define EMaskIsoLine ((Standard_Boolean)128) |
22 | |
23 | //======================================================================= |
24 | //function : NbEdges |
25 | //purpose : |
26 | //======================================================================= |
27 | |
28 | inline Standard_Integer HLRAlgo_EdgesBlock::NbEdges() const |
29 | { |
30 | return myEdges.Upper(); |
31 | } |
32 | |
33 | //======================================================================= |
34 | //function : Edge |
35 | //purpose : |
36 | //======================================================================= |
37 | |
38 | inline void HLRAlgo_EdgesBlock::Edge (const Standard_Integer I, |
39 | const Standard_Integer EI) |
40 | { |
41 | myEdges(I) = EI; |
42 | } |
43 | |
44 | //======================================================================= |
45 | //function : Edge |
46 | //purpose : |
47 | //======================================================================= |
48 | |
49 | inline Standard_Integer |
50 | HLRAlgo_EdgesBlock::Edge (const Standard_Integer I) const |
51 | { |
52 | return myEdges(I); |
53 | } |
54 | |
55 | //======================================================================= |
56 | //function : Orientation |
57 | //purpose : |
58 | //======================================================================= |
59 | |
60 | inline TopAbs_Orientation |
61 | HLRAlgo_EdgesBlock::Orientation (const Standard_Integer I) const |
62 | { |
63 | return ((TopAbs_Orientation)(myFlags(I) & EMaskOrient)); |
64 | } |
65 | |
66 | //======================================================================= |
67 | //function : Orientation |
68 | //purpose : |
69 | //======================================================================= |
70 | |
71 | inline void |
72 | HLRAlgo_EdgesBlock::Orientation (const Standard_Integer I, |
73 | const TopAbs_Orientation Or) |
74 | { |
75 | myFlags(I) &= ~EMaskOrient; |
76 | myFlags(I) |= (((Standard_Boolean)Or) & EMaskOrient); |
77 | } |
78 | |
79 | //======================================================================= |
80 | //function : OutLine |
81 | //purpose : |
82 | //======================================================================= |
83 | |
84 | inline Standard_Boolean |
85 | HLRAlgo_EdgesBlock::OutLine (const Standard_Integer I) const |
86 | { |
87 | return (myFlags(I) & EMaskOutLine) != 0; |
88 | } |
89 | |
90 | //======================================================================= |
91 | //function : OutLine |
92 | //purpose : |
93 | //======================================================================= |
94 | |
95 | inline void |
96 | HLRAlgo_EdgesBlock::OutLine (const Standard_Integer I, |
97 | const Standard_Boolean B) |
98 | { |
99 | if (B) myFlags(I) |= EMaskOutLine; |
100 | else myFlags(I) &= ~EMaskOutLine; |
101 | } |
102 | |
103 | //======================================================================= |
104 | //function : Internal |
105 | //purpose : |
106 | //======================================================================= |
107 | |
108 | inline Standard_Boolean |
109 | HLRAlgo_EdgesBlock::Internal (const Standard_Integer I) const |
110 | { |
111 | return (myFlags(I) & EMaskInternal) != 0; |
112 | } |
113 | |
114 | //======================================================================= |
115 | //function : Internal |
116 | //purpose : |
117 | //======================================================================= |
118 | |
119 | inline void |
120 | HLRAlgo_EdgesBlock::Internal (const Standard_Integer I, |
121 | const Standard_Boolean B) |
122 | { |
123 | if (B) myFlags(I) |= EMaskInternal; |
124 | else myFlags(I) &= ~EMaskInternal; |
125 | } |
126 | |
127 | //======================================================================= |
128 | //function : Double |
129 | //purpose : |
130 | //======================================================================= |
131 | |
132 | inline Standard_Boolean |
133 | HLRAlgo_EdgesBlock::Double (const Standard_Integer I) const |
134 | { |
135 | return (myFlags(I) & EMaskDouble) != 0; |
136 | } |
137 | |
138 | //======================================================================= |
139 | //function : Double |
140 | //purpose : |
141 | //======================================================================= |
142 | |
143 | inline void HLRAlgo_EdgesBlock::Double (const Standard_Integer I, |
144 | const Standard_Boolean B) |
145 | { |
146 | if (B) myFlags(I) |= EMaskDouble; |
147 | else myFlags(I) &= ~EMaskDouble; |
148 | } |
149 | |
150 | //======================================================================= |
151 | //function : IsoLine |
152 | //purpose : |
153 | //======================================================================= |
154 | |
155 | inline Standard_Boolean |
156 | HLRAlgo_EdgesBlock::IsoLine (const Standard_Integer I) const |
157 | { |
158 | return (myFlags(I) & EMaskIsoLine) != 0; |
159 | } |
160 | |
161 | //======================================================================= |
162 | //function : IsoLine |
163 | //purpose : |
164 | //======================================================================= |
165 | |
166 | inline void HLRAlgo_EdgesBlock::IsoLine (const Standard_Integer I, |
167 | const Standard_Boolean B) |
168 | { |
169 | if (B) myFlags(I) |= EMaskIsoLine; |
170 | else myFlags(I) &= ~EMaskIsoLine; |
171 | } |
172 | |
173 | //======================================================================= |
174 | //function : MinMax |
175 | //purpose : |
176 | //======================================================================= |
177 | |
178 | inline Standard_Address HLRAlgo_EdgesBlock::MinMax () const |
179 | { return (Standard_Address)&myMinMax; } |