dd36b9c45834ea4f947c25773d9b7ee8213c8dbd
[occt.git] / src / BOPDS / BOPDS_BoxBndTree.cxx
1 // Created by: Peter KURNEV
2 // Copyright (c) 2010-2014 OPEN CASCADE SAS
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
6 //
7 // This file is part of Open CASCADE Technology software library.
8 //
9 // This library is free software; you can redistribute it and / or modify it
10 // under the terms of the GNU Lesser General Public version 2.1 as published
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.
14 //
15 // Alternatively, this file may be used under the terms of Open CASCADE
16 // commercial license or contractual agreement.
17
18 #include <BOPDS_BoxBndTree.hxx>
19 //=======================================================================
20 //function : 
21 //purpose  : 
22 //=======================================================================
23   BOPDS_BoxBndTreeSelector::BOPDS_BoxBndTreeSelector()
24 {
25 }
26 //=======================================================================
27 //function : ~
28 //purpose  : 
29 //=======================================================================
30   BOPDS_BoxBndTreeSelector::~BOPDS_BoxBndTreeSelector()
31 {
32 }
33 //=======================================================================
34 //function : Reject
35 //purpose  : 
36 //=======================================================================
37   Standard_Boolean BOPDS_BoxBndTreeSelector::Reject (const Bnd_Box& aBox) const
38 {
39   return myBox.IsOut(aBox);
40 }
41 //=======================================================================
42 //function : Accept
43 //purpose  : 
44 //=======================================================================
45   Standard_Boolean BOPDS_BoxBndTreeSelector::Accept (const Standard_Integer& aIndex)
46 {
47   Standard_Boolean bRet=Standard_False;
48   //
49   //if (myFence.Add(aIndex)) {
50   myIndices.Append(aIndex);
51   bRet=!bRet;
52   //}
53   return bRet;
54 }
55 //=======================================================================
56 //function : SetBox
57 //purpose  : 
58 //=======================================================================
59   void BOPDS_BoxBndTreeSelector::SetBox(const Bnd_Box& aBox)
60 {
61   myBox=aBox;
62 }
63 //=======================================================================
64 //function : Clear
65 //purpose  : 
66 //=======================================================================
67   void BOPDS_BoxBndTreeSelector::Clear()
68 {
69   //myFence.Clear();
70   myIndices.Clear();
71 }
72 //=======================================================================
73 //function : Indices
74 //purpose  : 
75 //=======================================================================
76   const BOPCol_ListOfInteger& BOPDS_BoxBndTreeSelector::Indices() const
77 {
78   return myIndices;
79 }