Salome HOME
copy tag mergefrom_BR_V0_1_CC_Salome_04oct07
[modules/yacs.git] / src / lineconn2d / LineConn2d_BoxTree.cxx
1 // File:      LineConn2d_BoxTree.cpp
2 // Created:   12.08.05 15:19:55
3 // Author:    Alexander GRIGORIEV
4 // Copyright: Open Cascade 2005
5
6
7 #include <LineConn2dAfx.h>
8
9 #include <LineConn2d_BoxTree.h>
10 #include <LineConn2d_Segment.h>
11
12 //=======================================================================
13 //function : LineConn2d_BoxTreeSelector
14 //purpose  : Constructor
15 //=======================================================================
16
17 LineConn2d_BoxTreeSelector::LineConn2d_BoxTreeSelector
18                 (const LineConn2d_Segment& theSeg)
19 {
20   myBox.Add (theSeg.Origin());
21   myBox.Add (theSeg.Extremity());
22 }
23
24
25 //=======================================================================
26 //function : Accept
27 //purpose  : 
28 //=======================================================================
29
30 Standard_Boolean LineConn2d_BoxTreeSelector::Accept
31                                 (const LineConn2d_Object * const& theObj)
32 {
33   myList.Append (theObj);
34   return Standard_True;
35 }
36
37 //=======================================================================
38 //function : Reject
39 //purpose  : 
40 //=======================================================================
41
42 Standard_Boolean LineConn2d_BoxTreeSelector::Reject
43                                 (const LineConn2d_Box& theBox) const
44 {
45   return theBox.IsOut (myBox);
46 }
47