0024157: Parallelization of assembly part of BO
[occt.git] / src / BOPCol / BOPCol_Box2DBndTree.cxx
CommitLineData
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//
db8e4b9a 7// The content of this file is subject to the Open CASCADE Technology Public
8// License Version 6.5 (the "License"). You may not use the content of this file
9// except in compliance with the License. Please obtain a copy of the License
10// at http://www.opencascade.org and read it completely before using this file.
b311480e 11//
db8e4b9a 12// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
13// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
b311480e 14//
db8e4b9a 15// The Original Code and all software distributed under the License is
16// distributed on an "AS IS" basis, without warranty of any kind, and the
17// Initial Developer hereby disclaims all such warranties, including without
18// limitation, any warranties of merchantability, fitness for a particular
19// purpose or non-infringement. Please see the License for the specific terms
20// and conditions governing the rights and limitations under the License.
21
22
23#include <BOPCol_Box2DBndTree.hxx>
7fd59977 24
7fd59977 25//=======================================================================
4e57c75e 26//function :
7fd59977 27//purpose :
28//=======================================================================
db8e4b9a 29BOPCol_Box2DBndTreeSelector::BOPCol_Box2DBndTreeSelector()
4e57c75e 30{
31}
7fd59977 32//=======================================================================
4e57c75e 33//function : ~
7fd59977 34//purpose :
35//=======================================================================
db8e4b9a 36BOPCol_Box2DBndTreeSelector::~BOPCol_Box2DBndTreeSelector()
7fd59977 37{
7fd59977 38}
7fd59977 39//=======================================================================
4e57c75e 40//function : Reject
7fd59977 41//purpose :
42//=======================================================================
db8e4b9a 43Standard_Boolean BOPCol_Box2DBndTreeSelector::Reject
44 (const Bnd_Box2d& aBox2D) const
7fd59977 45{
db8e4b9a 46 return myBox2D.IsOut(aBox2D);
7fd59977 47}
7fd59977 48//=======================================================================
4e57c75e 49//function : Accept
7fd59977 50//purpose :
51//=======================================================================
db8e4b9a 52Standard_Boolean BOPCol_Box2DBndTreeSelector::Accept
53 (const Standard_Integer& aIndex)
7fd59977 54{
4e57c75e 55 Standard_Boolean bRet=Standard_False;
56 //
4e57c75e 57 myIndices.Append(aIndex);
58 bRet=!bRet;
59 //}
60 return bRet;
7fd59977 61}
7fd59977 62//=======================================================================
4e57c75e 63//function : SetBox
7fd59977 64//purpose :
65//=======================================================================
db8e4b9a 66void BOPCol_Box2DBndTreeSelector::SetBox(const Bnd_Box2d& aBox2D)
7fd59977 67{
db8e4b9a 68 myBox2D=aBox2D;
7fd59977 69}
7fd59977 70//=======================================================================
4e57c75e 71//function : Clear
7fd59977 72//purpose :
73//=======================================================================
db8e4b9a 74void BOPCol_Box2DBndTreeSelector::Clear()
7fd59977 75{
4e57c75e 76 myIndices.Clear();
7fd59977 77}
78//=======================================================================
4e57c75e 79//function : Indices
7fd59977 80//purpose :
81//=======================================================================
db8e4b9a 82const BOPCol_ListOfInteger& BOPCol_Box2DBndTreeSelector::Indices() const
7fd59977 83{
4e57c75e 84 return myIndices;
7fd59977 85}