0024907: Compilation fails on vc12 (VS2013)
[occt.git] / src / BVH / BVH_Set.hxx
1 // Created on: 2013-12-20
2 // Created by: Denis BOGOLEPOV
3 // Copyright (c) 2013-2014 OPEN CASCADE SAS
4 //
5 // This file is part of Open CASCADE Technology software library.
6 //
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
12 //
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
15
16 #ifndef _BVH_Set_Header
17 #define _BVH_Set_Header
18
19 #include <BVH_Box.hxx>
20
21 //! Set of abstract entities to build BVH.
22 template<class T, int N>
23 class BVH_Set
24 {
25 public:
26
27   typedef BVH_Box<T, N> BVH_BoxNt;
28
29 public:
30
31   //! Creates new abstract set of objects.
32   BVH_Set();
33
34   //! Releases resources of set of objects.
35   virtual ~BVH_Set() = 0;
36
37   //! Returns AABB of entire set of objects.
38   virtual BVH_Box<T, N> Box() const;
39
40 public:
41
42   //! Return total number of objects.
43   virtual Standard_Integer Size() const = 0;
44
45   //! Returns AABB of specified object.
46   virtual BVH_Box<T, N> Box (const Standard_Integer theIndex) const = 0;
47
48   //! Returns centroid position in specified axis.
49   virtual T Center (const Standard_Integer theIndex,
50                     const Standard_Integer theAxis) const = 0;
51
52   //! Swaps indices of two specified objects in the set.
53   virtual void Swap (const Standard_Integer theIndex1,
54                      const Standard_Integer theIndex2) = 0;
55
56 };
57
58 #include <BVH_Set.lxx>
59
60 #endif // _BVH_Set_Header