0031668: Visualization - WebGL sample doesn't work on Emscripten 1.39
[occt.git] / src / HLRAlgo / HLRAlgo_EdgeIterator.lxx
1 // Created on: 1993-01-11
2 // Created by: Christophe MARION
3 // Copyright (c) 1993-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 #include <HLRAlgo_EdgeStatus.hxx>
18
19 //=======================================================================
20 //function : MoreHidden
21 //purpose  : 
22 //=======================================================================
23
24 inline Standard_Boolean HLRAlgo_EdgeIterator::MoreHidden () const
25 { return iHid <= myNbHid + 1; }
26
27 //=======================================================================
28 //function : Hidden
29 //purpose  : 
30 //=======================================================================
31
32 inline void 
33 HLRAlgo_EdgeIterator::Hidden (Standard_Real& Start,
34                               Standard_ShortReal& TolStart,
35                               Standard_Real& End  ,
36                               Standard_ShortReal& TolEnd) const
37 {
38   Start    = myHidStart;
39   TolStart = myHidTolStart;
40   End      = myHidEnd;
41   TolEnd   = myHidTolEnd;
42 }
43
44 //=======================================================================
45 //function : InitVisible
46 //purpose  : 
47 //=======================================================================
48
49 inline void 
50 HLRAlgo_EdgeIterator::InitVisible(HLRAlgo_EdgeStatus& status)
51 {
52   EVis    = &status;
53   iVis    = 1;
54   myNbVis = ((HLRAlgo_EdgeStatus*)EVis)->NbVisiblePart();
55 }
56
57 //=======================================================================
58 //function : MoreVisible
59 //purpose  : 
60 //=======================================================================
61
62 inline Standard_Boolean HLRAlgo_EdgeIterator::MoreVisible () const
63 { return iVis <= myNbVis; }
64
65 //=======================================================================
66 //function : NextVisible
67 //purpose  : 
68 //=======================================================================
69
70 inline void HLRAlgo_EdgeIterator::NextVisible ()
71 { iVis++; }
72
73 //=======================================================================
74 //function : Visible
75 //purpose  : 
76 //=======================================================================
77
78 inline void 
79 HLRAlgo_EdgeIterator::Visible (Standard_Real& Start,
80                                Standard_ShortReal& TolStart,
81                                Standard_Real& End  ,
82                                Standard_ShortReal& TolEnd)
83
84   ((HLRAlgo_EdgeStatus*)EVis)->VisiblePart
85     (iVis,Start,TolStart,End,TolEnd);
86 }