Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-18 09:19:57

0001 // Copyright (c) 2017 OPEN CASCADE SAS
0002 //
0003 // This file is part of Open CASCADE Technology software library.
0004 //
0005 // This library is free software; you can redistribute it and/or modify it under
0006 // the terms of the GNU Lesser General Public License version 2.1 as published
0007 // by the Free Software Foundation, with special exception defined in the file
0008 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0009 // distribution for complete text of the license and disclaimer of any warranty.
0010 //
0011 // Alternatively, this file may be used under the terms of Open CASCADE
0012 // commercial license or contractual agreement.
0013 
0014 #ifndef _BVH_Constants_Header
0015 #define _BVH_Constants_Header
0016 
0017 enum
0018 {
0019   //! The optimal tree depth.
0020   //! Should be in sync with maximum stack size while traversing the tree - don't pass the trees of
0021   //! greater depth to OCCT algorithms!
0022   BVH_Constants_MaxTreeDepth = 32,
0023 
0024   //! Leaf node size optimal for complex nodes,
0025   //! e.g. for upper-level BVH trees within multi-level structure (nodes point to another BVH
0026   //! trees).
0027   BVH_Constants_LeafNodeSizeSingle = 1,
0028   //! Average leaf node size (4 primitive per leaf), optimal for average tree nodes.
0029   BVH_Constants_LeafNodeSizeAverage = 4,
0030   //! Default leaf node size (5 primitives per leaf).
0031   BVH_Constants_LeafNodeSizeDefault = 5,
0032   //! Leaf node size (8 primitives per leaf), optimal for small tree nodes (e.g. triangles).
0033   BVH_Constants_LeafNodeSizeSmall = 8,
0034 
0035   //! The optimal number of bins for binned builder.
0036   BVH_Constants_NbBinsOptimal = 32,
0037   //! The maximum number of bins for binned builder (giving the best traversal time at cost of
0038   //! longer tree construction time).
0039   BVH_Constants_NbBinsBest = 48,
0040 };
0041 
0042 namespace BVH
0043 {
0044 //! Minimum node size to split.
0045 constexpr double THE_NODE_MIN_SIZE = 1e-5;
0046 } // namespace BVH
0047 
0048 #endif // _BVH_Constants_Header