1 // Copyright (c) 2017 OPEN CASCADE SAS
3 // This file is part of Open CASCADE Technology software library.
5 // This library is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU Lesser General Public License version 2.1 as published
7 // by the Free Software Foundation, with special exception defined in the file
8 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 // distribution for complete text of the license and disclaimer of any warranty.
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
14 #ifndef _BVH_Constants_Header
15 #define _BVH_Constants_Header
19 //! The optimal tree depth.
20 //! Should be in sync with maximum stack size while traversing the tree - don't pass the trees of greater depth to OCCT algorithms!
21 BVH_Constants_MaxTreeDepth = 32,
23 //! Leaf node size optimal for complex nodes,
24 //! e.g. for upper-level BVH trees within multi-level structure (nodes point to another BVH trees).
25 BVH_Constants_LeafNodeSizeSingle = 1,
26 //! Average leaf node size (4 primitive per leaf), optimal for average tree nodes.
27 BVH_Constants_LeafNodeSizeAverage = 4,
28 //! Default leaf node size (5 primitives per leaf).
29 BVH_Constants_LeafNodeSizeDefault = 5,
30 //! Leaf node size (8 primitives per leaf), optimal for small tree nodes (e.g. triangles).
31 BVH_Constants_LeafNodeSizeSmall = 8,
33 //! The optimal number of bins for binned builder.
34 BVH_Constants_NbBinsOptimal = 32,
35 //! The maximum number of bins for binned builder (giving the best traversal time at cost of longer tree construction time).
36 BVH_Constants_NbBinsBest = 48,
41 //! Minimum node size to split.
42 const double THE_NODE_MIN_SIZE = 1e-5;
45 #endif // _BVH_Constants_Header