@@ -26,17 +26,21 @@ SOFTWARE.
26
26
/* Settings
27
27
* Use the following define-s before the header include
28
28
29
- Node center is not stored within the nodes. It will be calculated ad-hoc everytime when it is required, e.g in search algorithm.
29
+ Node center is not stored within the nodes. It will be calculated ad-hoc every time when it is required, e.g in search algorithm.
30
30
#define ORTHOTREE__DISABLED_NODECENTER
31
31
32
- Node size is not stored within the nodes. It will be calculated ad-hoc everytime when it is required, e.g in search algorithm.
32
+ Node size is not stored within the nodes. It will be calculated ad-hoc every time when it is required, e.g in search algorithm.
33
33
#define ORTHOTREE__DISABLED_NODESIZE
34
34
35
35
// PMR is used with MSVC only by default. To use PMR anyway
36
36
ORTHOTREE__USE_PMR
37
37
38
38
// To disable PMR on all platforms use:
39
39
ORTHOTREE__DISABLE_PMR
40
+
41
+ // Contiguous container of geometry data does not have specified index type. Octree lib uses index_t for it, it can specified to int or std::size_t.
42
+ ORTHOTREE_INDEX_T__INT / ORTHOTREE_INDEX_T__SIZE_T / ORTHOTREE_INDEX_T__UINT_FAST32_T
43
+
40
44
*/
41
45
42
46
#if defined(ORTHOTREE__USE_PMR) || defined(_MSC_VER)
@@ -129,12 +133,19 @@ ORTHOTREE__DISABLE_PMR
129
133
130
134
namespace OrthoTree
131
135
{
136
+ #ifdef ORTHOTREE_INDEX_T__SIZE_T
137
+ using index_t = std::size_t ;
138
+ #else
139
+ #ifdef ORTHOTREE_INDEX_T__UINT_FAST32_T
140
+ using index_t = std::uint_fast32_t ;
141
+ #else
132
142
#ifdef ORTHOTREE_INDEX_T__INT
133
143
using index_t = int ;
134
144
#else
135
- using index_t = std::size_t ;
145
+ using index_t = std::uint32_t ;
136
146
#endif // ORTHOTREE_INDEX_INT
137
-
147
+ #endif // ORTHOTREE_INDEX_T__UINT_FAST32_T
148
+ #endif // ORTHOTREE_INDEX_T__SIZE_T
138
149
139
150
#ifdef __clang__
140
151
#pragma clang diagnostic push
0 commit comments