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