b311480e |
1 | // Created by: Peter KURNEV |
db8e4b9a |
2 | // Copyright (c) 2010-2012 OPEN CASCADE SAS |
4e57c75e |
3 | // Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE |
4 | // Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, |
5 | // EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS |
b311480e |
6 | // |
b311480e |
7 | // |
d5f74e42 |
8 | // This file is part of Open CASCADE Technology software library. |
b311480e |
9 | // |
d5f74e42 |
10 | // This library is free software; you can redistribute it and/or modify it under |
11 | // the terms of the GNU Lesser General Public License version 2.1 as published |
12 | // by the Free Software Foundation, with special exception defined in the file |
13 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
14 | // distribution for complete text of the license and disclaimer of any warranty. |
15 | // |
16 | // Alternatively, this file may be used under the terms of Open CASCADE |
17 | // commercial license or contractual agreement. |
db8e4b9a |
18 | |
19 | #include <BOPCol_Box2DBndTree.hxx> |
7fd59977 |
20 | |
7fd59977 |
21 | //======================================================================= |
4e57c75e |
22 | //function : |
7fd59977 |
23 | //purpose : |
24 | //======================================================================= |
db8e4b9a |
25 | BOPCol_Box2DBndTreeSelector::BOPCol_Box2DBndTreeSelector() |
4e57c75e |
26 | { |
27 | } |
7fd59977 |
28 | //======================================================================= |
4e57c75e |
29 | //function : ~ |
7fd59977 |
30 | //purpose : |
31 | //======================================================================= |
db8e4b9a |
32 | BOPCol_Box2DBndTreeSelector::~BOPCol_Box2DBndTreeSelector() |
7fd59977 |
33 | { |
7fd59977 |
34 | } |
7fd59977 |
35 | //======================================================================= |
4e57c75e |
36 | //function : Reject |
7fd59977 |
37 | //purpose : |
38 | //======================================================================= |
db8e4b9a |
39 | Standard_Boolean BOPCol_Box2DBndTreeSelector::Reject |
40 | (const Bnd_Box2d& aBox2D) const |
7fd59977 |
41 | { |
db8e4b9a |
42 | return myBox2D.IsOut(aBox2D); |
7fd59977 |
43 | } |
7fd59977 |
44 | //======================================================================= |
4e57c75e |
45 | //function : Accept |
7fd59977 |
46 | //purpose : |
47 | //======================================================================= |
db8e4b9a |
48 | Standard_Boolean BOPCol_Box2DBndTreeSelector::Accept |
49 | (const Standard_Integer& aIndex) |
7fd59977 |
50 | { |
4e57c75e |
51 | Standard_Boolean bRet=Standard_False; |
52 | // |
4e57c75e |
53 | myIndices.Append(aIndex); |
54 | bRet=!bRet; |
55 | //} |
56 | return bRet; |
7fd59977 |
57 | } |
7fd59977 |
58 | //======================================================================= |
4e57c75e |
59 | //function : SetBox |
7fd59977 |
60 | //purpose : |
61 | //======================================================================= |
db8e4b9a |
62 | void BOPCol_Box2DBndTreeSelector::SetBox(const Bnd_Box2d& aBox2D) |
7fd59977 |
63 | { |
db8e4b9a |
64 | myBox2D=aBox2D; |
7fd59977 |
65 | } |
7fd59977 |
66 | //======================================================================= |
4e57c75e |
67 | //function : Clear |
7fd59977 |
68 | //purpose : |
69 | //======================================================================= |
db8e4b9a |
70 | void BOPCol_Box2DBndTreeSelector::Clear() |
7fd59977 |
71 | { |
4e57c75e |
72 | myIndices.Clear(); |
7fd59977 |
73 | } |
74 | //======================================================================= |
4e57c75e |
75 | //function : Indices |
7fd59977 |
76 | //purpose : |
77 | //======================================================================= |
db8e4b9a |
78 | const BOPCol_ListOfInteger& BOPCol_Box2DBndTreeSelector::Indices() const |
7fd59977 |
79 | { |
4e57c75e |
80 | return myIndices; |
7fd59977 |
81 | } |