14 #ifndef NANOVDB_PNANOVDB_H_HAS_BEEN_INCLUDED
15 #define NANOVDB_PNANOVDB_H_HAS_BEEN_INCLUDED
27 #if defined(PNANOVDB_C)
28 #ifndef PNANOVDB_ADDRESS_32
29 #define PNANOVDB_ADDRESS_64
31 #elif defined(PNANOVDB_HLSL)
32 #ifndef PNANOVDB_ADDRESS_64
33 #define PNANOVDB_ADDRESS_32
35 #elif defined(PNANOVDB_GLSL)
36 #ifndef PNANOVDB_ADDRESS_64
37 #define PNANOVDB_ADDRESS_32
45 #if defined(PNANOVDB_C)
48 #ifndef PNANOVDB_CMATH
49 #define PNANOVDB_CMATH
52 #elif defined(PNANOVDB_HLSL)
54 #elif defined(PNANOVDB_GLSL)
59 #ifndef __CUDACC_RTC__
66 #if defined(PNANOVDB_BUF_CUSTOM)
68 #elif defined(PNANOVDB_C)
69 #define PNANOVDB_BUF_C
70 #elif defined(PNANOVDB_HLSL)
71 #define PNANOVDB_BUF_HLSL
72 #elif defined(PNANOVDB_GLSL)
73 #define PNANOVDB_BUF_GLSL
76 #if defined(PNANOVDB_BUF_C)
77 #ifndef __CUDACC_RTC__
80 #if defined(__CUDACC__)
81 #define PNANOVDB_BUF_FORCE_INLINE static __host__ __device__ __forceinline__
83 #define PNANOVDB_BUF_FORCE_INLINE static inline __forceinline
85 #define PNANOVDB_BUF_FORCE_INLINE static inline __attribute__((always_inline))
90 #ifdef PNANOVDB_BUF_BOUNDS_CHECK
91 uint64_t size_in_words;
98 #ifdef PNANOVDB_BUF_BOUNDS_CHECK
99 ret.size_in_words = size_in_words;
103 #if defined(PNANOVDB_ADDRESS_32)
106 uint32_t wordaddress = (byte_offset >> 2u);
107 #ifdef PNANOVDB_BUF_BOUNDS_CHECK
108 return wordaddress < buf.size_in_words ? buf.
data[wordaddress] : 0u;
110 return buf.
data[wordaddress];
115 uint64_t* data64 = (uint64_t*)buf.
data;
116 uint32_t wordaddress64 = (byte_offset >> 3u);
117 #ifdef PNANOVDB_BUF_BOUNDS_CHECK
118 uint64_t size_in_words64 = buf.size_in_words >> 1u;
119 return wordaddress64 < size_in_words64 ? data64[wordaddress64] : 0llu;
121 return data64[wordaddress64];
126 uint32_t wordaddress = (byte_offset >> 2u);
127 #ifdef PNANOVDB_BUF_BOUNDS_CHECK
128 if (wordaddress < buf.size_in_words)
138 uint64_t* data64 = (uint64_t*)buf.
data;
139 uint32_t wordaddress64 = (byte_offset >> 3u);
140 #ifdef PNANOVDB_BUF_BOUNDS_CHECK
141 uint64_t size_in_words64 = buf.size_in_words >> 1u;
142 if (wordaddress64 < size_in_words64)
144 data64[wordaddress64] =
value;
147 data64[wordaddress64] =
value;
150 #elif defined(PNANOVDB_ADDRESS_64)
153 uint64_t wordaddress = (byte_offset >> 2u);
154 #ifdef PNANOVDB_BUF_BOUNDS_CHECK
155 return wordaddress < buf.size_in_words ? buf.
data[wordaddress] : 0u;
157 return buf.
data[wordaddress];
162 uint64_t* data64 = (uint64_t*)buf.
data;
163 uint64_t wordaddress64 = (byte_offset >> 3u);
164 #ifdef PNANOVDB_BUF_BOUNDS_CHECK
165 uint64_t size_in_words64 = buf.size_in_words >> 1u;
166 return wordaddress64 < size_in_words64 ? data64[wordaddress64] : 0llu;
168 return data64[wordaddress64];
173 uint64_t wordaddress = (byte_offset >> 2u);
174 #ifdef PNANOVDB_BUF_BOUNDS_CHECK
175 if (wordaddress < buf.size_in_words)
185 uint64_t* data64 = (uint64_t*)buf.
data;
186 uint64_t wordaddress64 = (byte_offset >> 3u);
187 #ifdef PNANOVDB_BUF_BOUNDS_CHECK
188 uint64_t size_in_words64 = buf.size_in_words >> 1u;
189 if (wordaddress64 < size_in_words64)
191 data64[wordaddress64] =
value;
194 data64[wordaddress64] =
value;
199 #define PNANOVDB_GRID_TYPE_GET(grid_typeIn, nameIn) pnanovdb_grid_type_constants[grid_typeIn].nameIn
200 #elif defined(PNANOVDB_BUF_HLSL)
201 #if defined(PNANOVDB_ADDRESS_32)
202 #define pnanovdb_buf_t StructuredBuffer<uint>
205 return buf[(byte_offset >> 2u)];
222 #elif defined(PNANOVDB_ADDRESS_64)
223 #define pnanovdb_buf_t StructuredBuffer<uint>
226 return buf[
uint(byte_offset >> 2u)];
244 #define pnanovdb_grid_type_t uint
245 #define PNANOVDB_GRID_TYPE_GET(grid_typeIn, nameIn) pnanovdb_grid_type_constants[grid_typeIn].nameIn
246 #elif defined(PNANOVDB_BUF_GLSL)
253 return pnanovdb_buf_data[(byte_offset >> 2u)];
270 #define pnanovdb_grid_type_t uint
271 #define PNANOVDB_GRID_TYPE_GET(grid_typeIn, nameIn) pnanovdb_grid_type_constants[grid_typeIn].nameIn
277 #if defined(PNANOVDB_C)
278 #if defined(__CUDACC__)
279 #define PNANOVDB_FORCE_INLINE static __host__ __device__ __forceinline__
280 #elif defined(_WIN32)
281 #define PNANOVDB_FORCE_INLINE static inline __forceinline
283 #define PNANOVDB_FORCE_INLINE static inline __attribute__((always_inline))
285 #elif defined(PNANOVDB_HLSL)
286 #define PNANOVDB_FORCE_INLINE
287 #elif defined(PNANOVDB_GLSL)
288 #define PNANOVDB_FORCE_INLINE
292 #if defined(PNANOVDB_C)
293 #define PNANOVDB_STRUCT_TYPEDEF(X) typedef struct X X;
294 #define PNANOVDB_STATIC_CONST static const
295 #define PNANOVDB_INOUT(X) X*
296 #define PNANOVDB_IN(X) const X*
297 #define PNANOVDB_DEREF(X) (*X)
298 #define PNANOVDB_REF(X) &X
299 #elif defined(PNANOVDB_HLSL)
300 #define PNANOVDB_STRUCT_TYPEDEF(X)
301 #define PNANOVDB_STATIC_CONST static const
302 #define PNANOVDB_INOUT(X) inout X
303 #define PNANOVDB_IN(X) X
304 #define PNANOVDB_DEREF(X) X
305 #define PNANOVDB_REF(X) X
306 #elif defined(PNANOVDB_GLSL)
307 #define PNANOVDB_STRUCT_TYPEDEF(X)
308 #define PNANOVDB_STATIC_CONST const
309 #define PNANOVDB_INOUT(X) inout X
310 #define PNANOVDB_IN(X) X
311 #define PNANOVDB_DEREF(X) X
312 #define PNANOVDB_REF(X) X
316 #if defined(PNANOVDB_C)
317 #define PNANOVDB_NATIVE_64
318 #ifndef __CUDACC_RTC__
321 #if !defined(PNANOVDB_MEMCPY_CUSTOM)
322 #ifndef __CUDACC_RTC__
325 #define pnanovdb_memcpy memcpy
330 #define PNANOVDB_FALSE 0
331 #define PNANOVDB_TRUE 1
356 #ifdef PNANOVDB_CMATH
364 #elif defined(PNANOVDB_HLSL)
368 #define PNANOVDB_FALSE false
369 #define PNANOVDB_TRUE true
376 float pnanovdb_floor(
float v) {
return floor(v); }
382 #if defined(PNANOVDB_ADDRESS_32)
401 pnanovdb_uint64_t
pnanovdb_double_as_uint64(
double v) { uint2 ret; asuint(v, ret.x, ret.y);
return uint64_t(ret.x) + (uint64_t(ret.y) << 32u); }
404 pnanovdb_uint64_t
pnanovdb_uint32_as_uint64(pnanovdb_uint32_t
x, pnanovdb_uint32_t
y) {
return uint64_t(x) + (uint64_t(y) << 32u); }
409 #elif defined(PNANOVDB_GLSL)
410 #define pnanovdb_uint32_t uint
411 #define pnanovdb_int32_t int
412 #define pnanovdb_bool_t bool
413 #define PNANOVDB_FALSE false
414 #define PNANOVDB_TRUE true
415 #define pnanovdb_uint64_t uvec2
416 #define pnanovdb_int64_t ivec2
417 #define pnanovdb_coord_t ivec3
418 #define pnanovdb_vec3_t vec3
433 float pnanovdb_floor(
float v) {
return floor(v); }
443 #if defined(PNANOVDB_C)
487 v.
x = a.
x < b.
x ? a.
x : b.
x;
488 v.
y = a.
y < b.
y ? a.
y : b.
y;
489 v.
z = a.
z < b.
z ? a.
z : b.
z;
495 v.
x = a.
x > b.
x ? a.
x : b.
x;
496 v.
y = a.
y > b.
y ? a.
y : b.
y;
497 v.
z = a.
z > b.
z ? a.
z : b.
z;
524 #elif defined(PNANOVDB_HLSL)
526 pnanovdb_vec3_t
pnanovdb_vec3_add(pnanovdb_vec3_t a, pnanovdb_vec3_t b) {
return a +
b; }
527 pnanovdb_vec3_t
pnanovdb_vec3_sub(pnanovdb_vec3_t a, pnanovdb_vec3_t b) {
return a -
b; }
528 pnanovdb_vec3_t
pnanovdb_vec3_mul(pnanovdb_vec3_t a, pnanovdb_vec3_t b) {
return a *
b; }
529 pnanovdb_vec3_t
pnanovdb_vec3_div(pnanovdb_vec3_t a, pnanovdb_vec3_t b) {
return a /
b; }
534 pnanovdb_coord_t
pnanovdb_coord_add(pnanovdb_coord_t a, pnanovdb_coord_t b) {
return a +
b; }
535 #elif defined(PNANOVDB_GLSL)
537 pnanovdb_vec3_t
pnanovdb_vec3_add(pnanovdb_vec3_t a, pnanovdb_vec3_t b) {
return a +
b; }
538 pnanovdb_vec3_t
pnanovdb_vec3_sub(pnanovdb_vec3_t a, pnanovdb_vec3_t b) {
return a -
b; }
539 pnanovdb_vec3_t
pnanovdb_vec3_mul(pnanovdb_vec3_t a, pnanovdb_vec3_t b) {
return a *
b; }
540 pnanovdb_vec3_t
pnanovdb_vec3_div(pnanovdb_vec3_t a, pnanovdb_vec3_t b) {
return a /
b; }
545 pnanovdb_coord_t
pnanovdb_coord_add(pnanovdb_coord_t a, pnanovdb_coord_t b) {
return a +
b; }
552 #if defined(PNANOVDB_C)
553 #if defined(_MSC_VER) && (_MSC_VER >= 1928) && defined(PNANOVDB_USE_INTRINSICS)
554 return __popcnt(value);
555 #elif (defined(__GNUC__) || defined(__clang__)) && defined(PNANOVDB_USE_INTRINSICS)
556 return __builtin_popcount(value);
558 value = value - ((value >> 1) & 0x55555555);
559 value = (value & 0x33333333) + ((value >> 2) & 0x33333333);
560 value = (value + (value >> 4)) & 0x0F0F0F0F;
561 return (value * 0x01010101) >> 24;
563 #elif defined(PNANOVDB_HLSL)
564 return countbits(value);
565 #elif defined(PNANOVDB_GLSL)
566 return bitCount(value);
575 #if defined(PNANOVDB_ADDRESS_32)
606 ((low >>
b) | ((b > 0) ? (high << (32u -
b)) : 0u));
611 pnanovdb_uint32_t mask_low = bit_idx < 32u ? 1u << bit_idx : 0u;
612 pnanovdb_uint32_t mask_high = bit_idx >= 32u ? 1u << (bit_idx - 32u) : 0u;
647 return 1llu << bit_idx;
663 #if defined(PNANOVDB_ADDRESS_32)
724 #elif defined(PNANOVDB_ADDRESS_64)
814 pnanovdb_coord_t ret;
842 const float scale = 1.f / 65535.f;
851 const float scale = 1.f / 255.f;
863 return ((value_word >> bit_index) & 1) != 0u;
866 #if defined(PNANOVDB_C)
872 #elif defined(PNANOVDB_HLSL)
878 #elif defined(PNANOVDB_GLSL)
927 #define PNANOVDB_MAGIC_NUMBER 0x304244566f6e614eUL// "NanoVDB0" in hex - little endian (uint64_t)
928 #define PNANOVDB_MAGIC_GRID 0x314244566f6e614eUL// "NanoVDB1" in hex - little endian (uint64_t)
929 #define PNANOVDB_MAGIC_FILE 0x324244566f6e614eUL// "NanoVDB2" in hex - little endian (uint64_t)
931 #define PNANOVDB_MAJOR_VERSION_NUMBER 32// reflects changes to the ABI
932 #define PNANOVDB_MINOR_VERSION_NUMBER 6// reflects changes to the API but not ABI
933 #define PNANOVDB_PATCH_VERSION_NUMBER 0// reflects bug-fixes with no ABI or API changes
935 #define PNANOVDB_GRID_TYPE_UNKNOWN 0
936 #define PNANOVDB_GRID_TYPE_FLOAT 1
937 #define PNANOVDB_GRID_TYPE_DOUBLE 2
938 #define PNANOVDB_GRID_TYPE_INT16 3
939 #define PNANOVDB_GRID_TYPE_INT32 4
940 #define PNANOVDB_GRID_TYPE_INT64 5
941 #define PNANOVDB_GRID_TYPE_VEC3F 6
942 #define PNANOVDB_GRID_TYPE_VEC3D 7
943 #define PNANOVDB_GRID_TYPE_MASK 8
944 #define PNANOVDB_GRID_TYPE_HALF 9
945 #define PNANOVDB_GRID_TYPE_UINT32 10
946 #define PNANOVDB_GRID_TYPE_BOOLEAN 11
947 #define PNANOVDB_GRID_TYPE_RGBA8 12
948 #define PNANOVDB_GRID_TYPE_FP4 13
949 #define PNANOVDB_GRID_TYPE_FP8 14
950 #define PNANOVDB_GRID_TYPE_FP16 15
951 #define PNANOVDB_GRID_TYPE_FPN 16
952 #define PNANOVDB_GRID_TYPE_VEC4F 17
953 #define PNANOVDB_GRID_TYPE_VEC4D 18
954 #define PNANOVDB_GRID_TYPE_INDEX 19
955 #define PNANOVDB_GRID_TYPE_ONINDEX 20
956 #define PNANOVDB_GRID_TYPE_INDEXMASK 21
957 #define PNANOVDB_GRID_TYPE_ONINDEXMASK 22
958 #define PNANOVDB_GRID_TYPE_POINTINDEX 23
959 #define PNANOVDB_GRID_TYPE_VEC3U8 24
960 #define PNANOVDB_GRID_TYPE_VEC3U16 25
961 #define PNANOVDB_GRID_TYPE_END 26
963 #define PNANOVDB_GRID_CLASS_UNKNOWN 0
964 #define PNANOVDB_GRID_CLASS_LEVEL_SET 1 // narrow band level set, e.g. SDF
965 #define PNANOVDB_GRID_CLASS_FOG_VOLUME 2 // fog volume, e.g. density
966 #define PNANOVDB_GRID_CLASS_STAGGERED 3 // staggered MAC grid, e.g. velocity
967 #define PNANOVDB_GRID_CLASS_POINT_INDEX 4 // point index grid
968 #define PNANOVDB_GRID_CLASS_POINT_DATA 5 // point data grid
969 #define PNANOVDB_GRID_CLASS_TOPOLOGY 6 // grid with active states only (no values)
970 #define PNANOVDB_GRID_CLASS_VOXEL_VOLUME 7 // volume of geometric cubes, e.g. minecraft
971 #define PNANOVDB_GRID_CLASS_INDEX_GRID 8 // grid whose values are offsets, e.g. into an external array
972 #define PNANOVDB_GRID_CLASS_TENSOR_GRID 9 // grid which can have extra metadata and features
973 #define PNANOVDB_GRID_CLASS_END 10
975 #define PNANOVDB_GRID_FLAGS_HAS_LONG_GRID_NAME (1 << 0)
976 #define PNANOVDB_GRID_FLAGS_HAS_BBOX (1 << 1)
977 #define PNANOVDB_GRID_FLAGS_HAS_MIN_MAX (1 << 2)
978 #define PNANOVDB_GRID_FLAGS_HAS_AVERAGE (1 << 3)
979 #define PNANOVDB_GRID_FLAGS_HAS_STD_DEVIATION (1 << 4)
980 #define PNANOVDB_GRID_FLAGS_IS_BREADTH_FIRST (1 << 5)
981 #define PNANOVDB_GRID_FLAGS_END (1 << 6)
983 #define PNANOVDB_LEAF_TYPE_DEFAULT 0
984 #define PNANOVDB_LEAF_TYPE_LITE 1
985 #define PNANOVDB_LEAF_TYPE_FP 2
986 #define PNANOVDB_LEAF_TYPE_INDEX 3
987 #define PNANOVDB_LEAF_TYPE_INDEXMASK 4
988 #define PNANOVDB_LEAF_TYPE_POINTINDEX 5
992 PNANOVDB_STATIC_CONST pnanovdb_uint32_t
pnanovdb_grid_type_value_strides_bits[
PNANOVDB_GRID_TYPE_END] = { 0, 32, 64, 16, 32, 64, 96, 192, 0, 16, 32, 1, 32, 4, 8, 16, 0, 128, 256, 0, 0, 0, 0, 16, 24, 48 };
994 PNANOVDB_STATIC_CONST pnanovdb_uint32_t
pnanovdb_grid_type_table_strides_bits[
PNANOVDB_GRID_TYPE_END] = { 64, 64, 64, 64, 64, 64, 128, 192, 64, 64, 64, 64, 64, 64, 64, 64, 64, 128, 256, 64, 64, 64, 64, 64, 64, 64 };
996 PNANOVDB_STATIC_CONST pnanovdb_uint32_t
pnanovdb_grid_type_minmax_strides_bits[
PNANOVDB_GRID_TYPE_END] = { 0, 32, 64, 16, 32, 64, 96, 192, 8, 16, 32, 8, 32, 32, 32, 32, 32, 128, 256, 64, 64, 64, 64, 64, 24, 48 };
998 PNANOVDB_STATIC_CONST pnanovdb_uint32_t
pnanovdb_grid_type_minmax_aligns_bits[
PNANOVDB_GRID_TYPE_END] = { 0, 32, 64, 16, 32, 64, 32, 64, 8, 16, 32, 8, 32, 32, 32, 32, 32, 32, 64, 64, 64, 64, 64, 64, 8, 16 };
1000 PNANOVDB_STATIC_CONST pnanovdb_uint32_t
pnanovdb_grid_type_stat_strides_bits[
PNANOVDB_GRID_TYPE_END] = { 0, 32, 64, 32, 32, 64, 32, 64, 8, 32, 32, 8, 32, 32, 32, 32, 32, 32, 64, 64, 64, 64, 64, 64, 32, 32 };
1002 PNANOVDB_STATIC_CONST pnanovdb_uint32_t
pnanovdb_grid_type_leaf_type[
PNANOVDB_GRID_TYPE_END] = { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 2, 2, 2, 2, 0, 0, 3, 3, 4, 4, 5, 0, 0 };
1019 #define PNANOVDB_MAP_SIZE 264
1021 #define PNANOVDB_MAP_OFF_MATF 0
1022 #define PNANOVDB_MAP_OFF_INVMATF 36
1023 #define PNANOVDB_MAP_OFF_VECF 72
1024 #define PNANOVDB_MAP_OFF_TAPERF 84
1025 #define PNANOVDB_MAP_OFF_MATD 88
1026 #define PNANOVDB_MAP_OFF_INVMATD 160
1027 #define PNANOVDB_MAP_OFF_VECD 232
1028 #define PNANOVDB_MAP_OFF_TAPERD 256
1103 #define PNANOVDB_GRID_SIZE 672
1105 #define PNANOVDB_GRID_OFF_MAGIC 0
1106 #define PNANOVDB_GRID_OFF_CHECKSUM 8
1107 #define PNANOVDB_GRID_OFF_VERSION 16
1108 #define PNANOVDB_GRID_OFF_FLAGS 20
1109 #define PNANOVDB_GRID_OFF_GRID_INDEX 24
1110 #define PNANOVDB_GRID_OFF_GRID_COUNT 28
1111 #define PNANOVDB_GRID_OFF_GRID_SIZE 32
1112 #define PNANOVDB_GRID_OFF_GRID_NAME 40
1113 #define PNANOVDB_GRID_OFF_MAP 296
1114 #define PNANOVDB_GRID_OFF_WORLD_BBOX 560
1115 #define PNANOVDB_GRID_OFF_VOXEL_SIZE 608
1116 #define PNANOVDB_GRID_OFF_GRID_CLASS 632
1117 #define PNANOVDB_GRID_OFF_GRID_TYPE 636
1118 #define PNANOVDB_GRID_OFF_BLIND_METADATA_OFFSET 640
1119 #define PNANOVDB_GRID_OFF_BLIND_METADATA_COUNT 648
1214 return (major << 21u) | (minor << 10u) | patch_num;
1219 return (version >> 21u) & ((1u << 11u) - 1u);
1223 return (version >> 10u) & ((1u << 11u) - 1u);
1227 return version & ((1u << 10u) - 1u);
1244 #define PNANOVDB_GRIDBLINDMETADATA_SIZE 288
1246 #define PNANOVDB_GRIDBLINDMETADATA_OFF_BYTE_OFFSET 0
1247 #define PNANOVDB_GRIDBLINDMETADATA_OFF_ELEMENT_COUNT 8
1248 #define PNANOVDB_GRIDBLINDMETADATA_OFF_FLAGS 16
1249 #define PNANOVDB_GRIDBLINDMETADATA_OFF_SEMANTIC 20
1250 #define PNANOVDB_GRIDBLINDMETADATA_OFF_DATA_CLASS 24
1251 #define PNANOVDB_GRIDBLINDMETADATA_OFF_DATA_TYPE 28
1252 #define PNANOVDB_GRIDBLINDMETADATA_OFF_NAME 32
1294 #define PNANOVDB_TREE_SIZE 64
1296 #define PNANOVDB_TREE_OFF_NODE_OFFSET_LEAF 0
1297 #define PNANOVDB_TREE_OFF_NODE_OFFSET_LOWER 8
1298 #define PNANOVDB_TREE_OFF_NODE_OFFSET_UPPER 16
1299 #define PNANOVDB_TREE_OFF_NODE_OFFSET_ROOT 24
1300 #define PNANOVDB_TREE_OFF_NODE_COUNT_LEAF 32
1301 #define PNANOVDB_TREE_OFF_NODE_COUNT_LOWER 36
1302 #define PNANOVDB_TREE_OFF_NODE_COUNT_UPPER 40
1303 #define PNANOVDB_TREE_OFF_TILE_COUNT_LEAF 44
1304 #define PNANOVDB_TREE_OFF_TILE_COUNT_LOWER 48
1305 #define PNANOVDB_TREE_OFF_TILE_COUNT_UPPER 52
1306 #define PNANOVDB_TREE_OFF_VOXEL_COUNT 56
1388 #define PNANOVDB_ROOT_BASE_SIZE 28
1390 #define PNANOVDB_ROOT_OFF_BBOX_MIN 0
1391 #define PNANOVDB_ROOT_OFF_BBOX_MAX 12
1392 #define PNANOVDB_ROOT_OFF_TABLE_SIZE 24
1426 #define PNANOVDB_ROOT_TILE_BASE_SIZE 20
1428 #define PNANOVDB_ROOT_TILE_OFF_KEY 0
1429 #define PNANOVDB_ROOT_TILE_OFF_CHILD 8
1430 #define PNANOVDB_ROOT_TILE_OFF_STATE 16
1466 #define PNANOVDB_UPPER_TABLE_COUNT 32768
1467 #define PNANOVDB_UPPER_BASE_SIZE 8224
1469 #define PNANOVDB_UPPER_OFF_BBOX_MIN 0
1470 #define PNANOVDB_UPPER_OFF_BBOX_MAX 12
1471 #define PNANOVDB_UPPER_OFF_FLAGS 24
1472 #define PNANOVDB_UPPER_OFF_VALUE_MASK 32
1473 #define PNANOVDB_UPPER_OFF_CHILD_MASK 4128
1486 return ((value >> (bit_index & 31u)) & 1) != 0u;
1490 return ((value >> (bit_index & 31u)) & 1) != 0u;
1502 if (!value) { valueMask &= ~(1u << (bit_index & 31u)); }
1503 if (value) valueMask |= (1u << (bit_index & 31u));
1521 #define PNANOVDB_LOWER_TABLE_COUNT 4096
1522 #define PNANOVDB_LOWER_BASE_SIZE 1056
1524 #define PNANOVDB_LOWER_OFF_BBOX_MIN 0
1525 #define PNANOVDB_LOWER_OFF_BBOX_MAX 12
1526 #define PNANOVDB_LOWER_OFF_FLAGS 24
1527 #define PNANOVDB_LOWER_OFF_VALUE_MASK 32
1528 #define PNANOVDB_LOWER_OFF_CHILD_MASK 544
1541 return ((value >> (bit_index & 31u)) & 1) != 0u;
1545 return ((value >> (bit_index & 31u)) & 1) != 0u;
1557 if (!value) { valueMask &= ~(1u << (bit_index & 31u)); }
1558 if (value) valueMask |= (1u << (bit_index & 31u));
1574 #define PNANOVDB_LEAF_TABLE_COUNT 512
1575 #define PNANOVDB_LEAF_BASE_SIZE 80
1577 #define PNANOVDB_LEAF_OFF_BBOX_MIN 0
1578 #define PNANOVDB_LEAF_OFF_BBOX_DIF_AND_FLAGS 12
1579 #define PNANOVDB_LEAF_OFF_VALUE_MASK 16
1581 #define PNANOVDB_LEAF_TABLE_NEG_OFF_BBOX_DIF_AND_FLAGS 84
1582 #define PNANOVDB_LEAF_TABLE_NEG_OFF_MINIMUM 16
1583 #define PNANOVDB_LEAF_TABLE_NEG_OFF_QUANTUM 12
1593 return ((value >> (bit_index & 31u)) & 1) != 0u;
1639 {28, 28, 28, 28, 28, 32, 0, 8, 20, 32, 8224, 8224, 8224, 8224, 8224, 270368, 1056, 1056, 1056, 1056, 1056, 33824, 80, 80, 80, 80, 96, 96},
1640 {28, 32, 36, 40, 44, 64, 32, 8, 20, 32, 8224, 8228, 8232, 8236, 8256, 270400, 1056, 1060, 1064, 1068, 1088, 33856, 80, 84, 88, 92, 96, 2144},
1641 {32, 40, 48, 56, 64, 96, 64, 8, 24, 32, 8224, 8232, 8240, 8248, 8256, 270400, 1056, 1064, 1072, 1080, 1088, 33856, 80, 88, 96, 104, 128, 4224},
1642 {28, 30, 32, 36, 40, 64, 16, 8, 20, 32, 8224, 8226, 8228, 8232, 8256, 270400, 1056, 1058, 1060, 1064, 1088, 33856, 80, 82, 84, 88, 96, 1120},
1643 {28, 32, 36, 40, 44, 64, 32, 8, 20, 32, 8224, 8228, 8232, 8236, 8256, 270400, 1056, 1060, 1064, 1068, 1088, 33856, 80, 84, 88, 92, 96, 2144},
1644 {32, 40, 48, 56, 64, 96, 64, 8, 24, 32, 8224, 8232, 8240, 8248, 8256, 270400, 1056, 1064, 1072, 1080, 1088, 33856, 80, 88, 96, 104, 128, 4224},
1645 {28, 40, 52, 64, 68, 96, 96, 16, 20, 32, 8224, 8236, 8248, 8252, 8256, 532544, 1056, 1068, 1080, 1084, 1088, 66624, 80, 92, 104, 108, 128, 6272},
1646 {32, 56, 80, 104, 112, 128, 192, 24, 24, 64, 8224, 8248, 8272, 8280, 8288, 794720, 1056, 1080, 1104, 1112, 1120, 99424, 80, 104, 128, 136, 160, 12448},
1647 {28, 29, 30, 31, 32, 64, 0, 8, 20, 32, 8224, 8225, 8226, 8227, 8256, 270400, 1056, 1057, 1058, 1059, 1088, 33856, 80, 80, 80, 80, 96, 96},
1648 {28, 30, 32, 36, 40, 64, 16, 8, 20, 32, 8224, 8226, 8228, 8232, 8256, 270400, 1056, 1058, 1060, 1064, 1088, 33856, 80, 82, 84, 88, 96, 1120},
1649 {28, 32, 36, 40, 44, 64, 32, 8, 20, 32, 8224, 8228, 8232, 8236, 8256, 270400, 1056, 1060, 1064, 1068, 1088, 33856, 80, 84, 88, 92, 96, 2144},
1650 {28, 29, 30, 31, 32, 64, 1, 8, 20, 32, 8224, 8225, 8226, 8227, 8256, 270400, 1056, 1057, 1058, 1059, 1088, 33856, 80, 80, 80, 80, 96, 160},
1651 {28, 32, 36, 40, 44, 64, 32, 8, 20, 32, 8224, 8228, 8232, 8236, 8256, 270400, 1056, 1060, 1064, 1068, 1088, 33856, 80, 84, 88, 92, 96, 2144},
1652 {28, 32, 36, 40, 44, 64, 0, 8, 20, 32, 8224, 8228, 8232, 8236, 8256, 270400, 1056, 1060, 1064, 1068, 1088, 33856, 88, 90, 92, 94, 96, 352},
1653 {28, 32, 36, 40, 44, 64, 0, 8, 20, 32, 8224, 8228, 8232, 8236, 8256, 270400, 1056, 1060, 1064, 1068, 1088, 33856, 88, 90, 92, 94, 96, 608},
1654 {28, 32, 36, 40, 44, 64, 0, 8, 20, 32, 8224, 8228, 8232, 8236, 8256, 270400, 1056, 1060, 1064, 1068, 1088, 33856, 88, 90, 92, 94, 96, 1120},
1655 {28, 32, 36, 40, 44, 64, 0, 8, 20, 32, 8224, 8228, 8232, 8236, 8256, 270400, 1056, 1060, 1064, 1068, 1088, 33856, 88, 90, 92, 94, 96, 96},
1656 {28, 44, 60, 76, 80, 96, 128, 16, 20, 64, 8224, 8240, 8256, 8260, 8288, 532576, 1056, 1072, 1088, 1092, 1120, 66656, 80, 96, 112, 116, 128, 8320},
1657 {32, 64, 96, 128, 136, 160, 256, 32, 24, 64, 8224, 8256, 8288, 8296, 8320, 1056896, 1056, 1088, 1120, 1128, 1152, 132224, 80, 112, 144, 152, 160, 16544},
1658 {32, 40, 48, 56, 64, 96, 0, 8, 24, 32, 8224, 8232, 8240, 8248, 8256, 270400, 1056, 1064, 1072, 1080, 1088, 33856, 80, 80, 80, 80, 80, 96},
1659 {32, 40, 48, 56, 64, 96, 0, 8, 24, 32, 8224, 8232, 8240, 8248, 8256, 270400, 1056, 1064, 1072, 1080, 1088, 33856, 80, 80, 80, 80, 80, 96},
1660 {32, 40, 48, 56, 64, 96, 0, 8, 24, 32, 8224, 8232, 8240, 8248, 8256, 270400, 1056, 1064, 1072, 1080, 1088, 33856, 80, 80, 80, 80, 80, 160},
1661 {32, 40, 48, 56, 64, 96, 0, 8, 24, 32, 8224, 8232, 8240, 8248, 8256, 270400, 1056, 1064, 1072, 1080, 1088, 33856, 80, 80, 80, 80, 80, 160},
1662 {32, 40, 48, 56, 64, 96, 16, 8, 24, 32, 8224, 8232, 8240, 8248, 8256, 270400, 1056, 1064, 1072, 1080, 1088, 33856, 80, 88, 96, 96, 96, 1120},
1663 {28, 31, 34, 40, 44, 64, 24, 8, 20, 32, 8224, 8227, 8232, 8236, 8256, 270400, 1056, 1059, 1064, 1068, 1088, 33856, 80, 83, 88, 92, 96, 1632},
1664 {28, 34, 40, 48, 52, 64, 48, 8, 20, 32, 8224, 8230, 8236, 8240, 8256, 270400, 1056, 1062, 1068, 1072, 1088, 33856, 80, 86, 92, 96, 128, 3200},
1725 #if defined(PNANOVDB_NATIVE_64)
1729 return (ku) | (ju << 21u) | (iu << 42u);
1734 pnanovdb_uint32_t key_x = ku | (ju << 21);
1735 pnanovdb_uint32_t key_y = (iu << 10) | (ju >> 11);
1745 for (pnanovdb_uint32_t i = 0u; i < tile_count; i++)
1807 pnanovdb_uint32_t value_bits = 1u << value_log_bits;
1808 pnanovdb_uint32_t value_mask = (1u << value_bits) - 1u;
1809 pnanovdb_uint32_t values_per_word_bits = 5u - value_log_bits;
1810 pnanovdb_uint32_t values_per_word_mask = (1u << values_per_word_bits) - 1u;
1816 pnanovdb_uint32_t value_compressed = (raw >> ((n & values_per_word_mask) << value_log_bits)) & value_mask;
1838 pnanovdb_uint32_t
flags = bbox_dif_and_flags >> 24u;
1839 pnanovdb_uint32_t value_log_bits = flags >> 5;
1905 pnanovdb_uint32_t word_idx = n >> 5;
1906 pnanovdb_uint32_t bit_idx = n & 31;
1907 pnanovdb_uint32_t val_mask =
1909 return (val_mask & (1u << bit_idx)) != 0u;
1913 pnanovdb_uint32_t word_idx = n >> 5;
1914 pnanovdb_uint32_t bit_idx = n & 31;
1915 pnanovdb_uint32_t val_mask =
1919 val_mask = val_mask | (1u << bit_idx);
1923 val_mask = val_mask & ~(1u << bit_idx);
1999 pnanovdb_uint32_t word_idx = n >> 6u;
2000 pnanovdb_uint32_t bit_idx = n & 63u;
2006 pnanovdb_uint32_t sum = 0u;
2055 pnanovdb_uint32_t word_idx = n >> 5;
2056 pnanovdb_uint32_t bit_idx = n & 31;
2057 pnanovdb_uint32_t val_mask =
2059 return (val_mask & (1u << bit_idx)) != 0u;
2063 pnanovdb_uint32_t word_idx = n >> 5;
2064 pnanovdb_uint32_t bit_idx = n & 31;
2065 pnanovdb_uint32_t val_mask =
2069 val_mask = val_mask | (1u << bit_idx);
2073 val_mask = val_mask & ~(1u << bit_idx);
2108 raw32 = (raw32 & 0xFFFF0000) | (value & 0x0000FFFF);
2112 raw32 = (raw32 & 0x0000FFFF) | (value << 16u);
2118 pnanovdb_uint32_t word_idx = i >> 5;
2119 pnanovdb_uint32_t bit_idx = i & 31;
2122 val_mask = val_mask | (1u << bit_idx);
2198 return value_address;
2203 pnanovdb_uint32_t
level;
2273 return value_address;
2278 pnanovdb_uint32_t
level;
2344 pnanovdb_uint32_t
level;
2350 pnanovdb_uint32_t
level;
2414 pnanovdb_uint64_t ret;
2428 pnanovdb_uint64_t ret;
2444 pnanovdb_uint32_t
level,
2449 pnanovdb_uint32_t local_range_begin = 0u;
2450 pnanovdb_uint32_t local_range_end = 0u;
2475 pnanovdb_uint32_t level,
2480 pnanovdb_uint64_t range_begin;
2481 pnanovdb_uint64_t range_end;
2484 pnanovdb_uint32_t
stride = 12u;
2524 if ((dirty & ~((1u << 3) - 1u)) != 0)
2534 if ((dirty & ~((1u << 7) - 1u)) != 0)
2544 if ((dirty & ~((1u << 12) - 1u)) != 0)
2579 return value_address;
2584 pnanovdb_uint32_t
level;
2610 return value_address;
2615 pnanovdb_uint32_t
level;
2645 pnanovdb_uint32_t
level;
2671 return value_address;
2676 pnanovdb_uint32_t
level;
2682 pnanovdb_uint32_t
level;
2698 pnanovdb_uint32_t ret;
2716 pnanovdb_uint32_t ret;
2726 ret = (1u << (4u + 3u));
2734 pnanovdb_uint32_t ret;
2737 ret = 1u << (5u + 4u + 3u);
2741 ret = 1u << (5u + 4u + 3u);
2757 pnanovdb_uint32_t dim;
2788 pnanovdb_bool_t is_active;
2806 pnanovdb_bool_t is_active;
2824 pnanovdb_bool_t is_active;
2832 is_active = state != 0u;
2848 pnanovdb_bool_t is_active;
2872 pnanovdb_vec3_t
dst;
2884 pnanovdb_vec3_t
dst;
2896 pnanovdb_vec3_t
dst;
2908 pnanovdb_vec3_t
dst;
3027 0.14425f, 0.643275f, 0.830409f, 0.331384f, 0.105263f, 0.604289f, 0.167641f, 0.666667f,
3028 0.892788f, 0.393762f, 0.0818713f, 0.580897f, 0.853801f, 0.354776f, 0.916179f, 0.417154f,
3029 0.612086f, 0.11306f, 0.79922f, 0.300195f, 0.510721f, 0.0116959f, 0.947368f, 0.448343f,
3030 0.362573f, 0.861598f, 0.0506823f, 0.549708f, 0.261209f, 0.760234f, 0.19883f, 0.697856f,
3031 0.140351f, 0.639376f, 0.576998f, 0.0779727f, 0.522417f, 0.0233918f, 0.460039f, 0.959064f,
3032 0.888889f, 0.389864f, 0.327485f, 0.826511f, 0.272904f, 0.77193f, 0.709552f, 0.210526f,
3033 0.483431f, 0.982456f, 0.296296f, 0.795322f, 0.116959f, 0.615984f, 0.0545809f, 0.553606f,
3034 0.732943f, 0.233918f, 0.545809f, 0.0467836f, 0.865497f, 0.366472f, 0.803119f, 0.304094f,
3035 0.518519f, 0.0194932f, 0.45614f, 0.955166f, 0.729045f, 0.230019f, 0.54191f, 0.042885f,
3036 0.269006f, 0.768031f, 0.705653f, 0.206628f, 0.479532f, 0.978558f, 0.292398f, 0.791423f,
3037 0.237817f, 0.736842f, 0.424951f, 0.923977f, 0.136452f, 0.635478f, 0.323587f, 0.822612f,
3038 0.986355f, 0.487329f, 0.674464f, 0.175439f, 0.88499f, 0.385965f, 0.573099f, 0.0740741f,
3039 0.51462f, 0.0155945f, 0.202729f, 0.701754f, 0.148148f, 0.647174f, 0.834308f, 0.335283f,
3040 0.265107f, 0.764133f, 0.951267f, 0.452242f, 0.896686f, 0.397661f, 0.08577f, 0.584795f,
3041 0.8577f, 0.358674f, 0.920078f, 0.421053f, 0.740741f, 0.241715f, 0.678363f, 0.179337f,
3042 0.109162f, 0.608187f, 0.17154f, 0.670565f, 0.491228f, 0.990253f, 0.42885f, 0.927875f,
3043 0.0662768f, 0.565302f, 0.62768f, 0.128655f, 0.183236f, 0.682261f, 0.744639f, 0.245614f,
3044 0.814815f, 0.315789f, 0.378168f, 0.877193f, 0.931774f, 0.432749f, 0.495127f, 0.994152f,
3045 0.0350877f, 0.534113f, 0.97076f, 0.471735f, 0.214425f, 0.71345f, 0.526316f, 0.0272904f,
3046 0.783626f, 0.2846f, 0.222222f, 0.721248f, 0.962963f, 0.463938f, 0.276803f, 0.775828f,
3047 0.966862f, 0.467836f, 0.405458f, 0.904483f, 0.0701754f, 0.569201f, 0.881092f, 0.382066f,
3048 0.218324f, 0.717349f, 0.654971f, 0.155945f, 0.818713f, 0.319688f, 0.132554f, 0.631579f,
3049 0.0623782f, 0.561404f, 0.748538f, 0.249513f, 0.912281f, 0.413255f, 0.974659f, 0.475634f,
3050 0.810916f, 0.311891f, 0.499025f, 0.998051f, 0.163743f, 0.662768f, 0.226121f, 0.725146f,
3051 0.690058f, 0.191033f, 0.00389864f, 0.502924f, 0.557505f, 0.0584795f, 0.120858f, 0.619883f,
3052 0.440546f, 0.939571f, 0.752437f, 0.253411f, 0.307992f, 0.807018f, 0.869396f, 0.37037f,
3053 0.658869f, 0.159844f, 0.346979f, 0.846004f, 0.588694f, 0.0896686f, 0.152047f, 0.651072f,
3054 0.409357f, 0.908382f, 0.596491f, 0.0974659f, 0.339181f, 0.838207f, 0.900585f, 0.401559f,
3055 0.34308f, 0.842105f, 0.779727f, 0.280702f, 0.693957f, 0.194932f, 0.25731f, 0.756335f,
3056 0.592593f, 0.0935673f, 0.0311891f, 0.530214f, 0.444444f, 0.94347f, 0.506823f, 0.00779727f,
3057 0.68616f, 0.187135f, 0.124756f, 0.623782f, 0.288499f, 0.787524f, 0.350877f, 0.849903f,
3058 0.436647f, 0.935673f, 0.873294f, 0.374269f, 0.538012f, 0.0389864f, 0.60039f, 0.101365f,
3059 0.57115f, 0.0721248f, 0.758285f, 0.259259f, 0.719298f, 0.220273f, 0.532164f, 0.0331384f,
3060 0.321637f, 0.820663f, 0.00974659f, 0.508772f, 0.469786f, 0.968811f, 0.282651f, 0.781676f,
3061 0.539961f, 0.0409357f, 0.727096f, 0.22807f, 0.500975f, 0.00194932f, 0.563353f, 0.0643275f,
3062 0.290448f, 0.789474f, 0.477583f, 0.976608f, 0.251462f, 0.750487f, 0.31384f, 0.812865f,
3063 0.94152f, 0.442495f, 0.879142f, 0.380117f, 0.37232f, 0.871345f, 0.309942f, 0.808967f,
3064 0.192982f, 0.692008f, 0.130604f, 0.62963f, 0.621832f, 0.122807f, 0.559454f, 0.0604289f,
3065 0.660819f, 0.161793f, 0.723197f, 0.224172f, 0.403509f, 0.902534f, 0.840156f, 0.341131f,
3066 0.411306f, 0.910331f, 0.473684f, 0.97271f, 0.653021f, 0.153996f, 0.0916179f, 0.590643f,
3067 0.196881f, 0.695906f, 0.384016f, 0.883041f, 0.0955166f, 0.594542f, 0.157895f, 0.65692f,
3068 0.945419f, 0.446394f, 0.633528f, 0.134503f, 0.844055f, 0.345029f, 0.906433f, 0.407407f,
3069 0.165692f, 0.664717f, 0.103314f, 0.602339f, 0.126706f, 0.625731f, 0.189084f, 0.688109f,
3070 0.91423f, 0.415205f, 0.851852f, 0.352827f, 0.875244f, 0.376218f, 0.937622f, 0.438596f,
3071 0.317739f, 0.816764f, 0.255361f, 0.754386f, 0.996101f, 0.497076f, 0.933723f, 0.434698f,
3072 0.567251f, 0.0682261f, 0.504873f, 0.00584795f, 0.247563f, 0.746589f, 0.185185f, 0.684211f,
3073 0.037037f, 0.536062f, 0.0994152f, 0.598441f, 0.777778f, 0.278752f, 0.465887f, 0.964912f,
3074 0.785575f, 0.28655f, 0.847953f, 0.348928f, 0.0292398f, 0.528265f, 0.7154f, 0.216374f,
3075 0.39961f, 0.898636f, 0.961014f, 0.461988f, 0.0487329f, 0.547758f, 0.111111f, 0.610136f,
3076 0.649123f, 0.150097f, 0.212476f, 0.711501f, 0.797271f, 0.298246f, 0.859649f, 0.360624f,
3077 0.118908f, 0.617934f, 0.0565302f, 0.555556f, 0.329435f, 0.82846f, 0.516569f, 0.0175439f,
3078 0.867446f, 0.368421f, 0.805068f, 0.306043f, 0.578947f, 0.079922f, 0.267057f, 0.766082f,
3079 0.270955f, 0.76998f, 0.707602f, 0.208577f, 0.668616f, 0.169591f, 0.606238f, 0.107212f,
3080 0.520468f, 0.0214425f, 0.45809f, 0.957115f, 0.419103f, 0.918129f, 0.356725f, 0.855751f,
3081 0.988304f, 0.489279f, 0.426901f, 0.925926f, 0.450292f, 0.949318f, 0.512671f, 0.0136452f,
3082 0.239766f, 0.738791f, 0.676413f, 0.177388f, 0.699805f, 0.20078f, 0.263158f, 0.762183f,
3083 0.773879f, 0.274854f, 0.337232f, 0.836257f, 0.672515f, 0.173489f, 0.734893f, 0.235867f,
3084 0.0253411f, 0.524366f, 0.586745f, 0.0877193f, 0.423002f, 0.922027f, 0.48538f, 0.984405f,
3085 0.74269f, 0.243665f, 0.680312f, 0.181287f, 0.953216f, 0.454191f, 0.1423f, 0.641326f,
3086 0.493177f, 0.992203f, 0.430799f, 0.929825f, 0.204678f, 0.703704f, 0.890838f, 0.391813f,
3087 0.894737f, 0.395712f, 0.0838207f, 0.582846f, 0.0448343f, 0.54386f, 0.231969f, 0.730994f,
3088 0.146199f, 0.645224f, 0.832359f, 0.333333f, 0.793372f, 0.294347f, 0.980507f, 0.481481f,
3089 0.364522f, 0.863548f, 0.80117f, 0.302144f, 0.824561f, 0.325536f, 0.138402f, 0.637427f,
3090 0.614035f, 0.11501f, 0.0526316f, 0.551657f, 0.0760234f, 0.575049f, 0.88694f, 0.387914f,
3095 return enabled ? pnanovdb_dither_lut[offset & 511] : 0.5f;
3100 #ifdef PNANOVDB_HDDA
3103 #define PNANOVDB_ENFORCE_FORWARD_STEPPING
3105 #define PNANOVDB_HDDA_FLOAT_MAX 1e38f
3107 struct pnanovdb_hdda_t
3109 pnanovdb_int32_t dim;
3112 pnanovdb_coord_t voxel;
3113 pnanovdb_coord_t step;
3114 pnanovdb_vec3_t delta;
3115 pnanovdb_vec3_t next;
3121 pnanovdb_coord_t voxel;
3130 pnanovdb_coord_t voxel;
3152 pnanovdb_vec3_t pos = pnanovdb_hdda_ray_start(origin, tmin, direction);
3164 else if (dir_inv.
x > 0.f)
3184 else if (dir_inv.
y > 0.f)
3204 else if (dir_inv.
z > 0.f)
3264 pnanovdb_bool_t ret;
3267 #ifdef PNANOVDB_ENFORCE_FORWARD_STEPPING
3280 #ifdef PNANOVDB_ENFORCE_FORWARD_STEPPING
3293 #ifdef PNANOVDB_ENFORCE_FORWARD_STEPPING
3321 pnanovdb_bool_t hit = tnear <= tfar;
3328 pnanovdb_grid_type_t grid_type,
3332 PNANOVDB_IN(pnanovdb_vec3_t) direction,
float tmax,
3343 if (!hit || tmax > 1.0e20f)
3348 pnanovdb_vec3_t pos = pnanovdb_hdda_ray_start(origin, tmin, direction);
3349 pnanovdb_coord_t ijk = pnanovdb_hdda_pos_to_ijk(
PNANOVDB_REF(pos));
3355 pnanovdb_hdda_t hdda;
3356 pnanovdb_hdda_init(
PNANOVDB_REF(hdda), origin, tmin, direction, tmax, dim);
3359 pnanovdb_vec3_t pos_start = pnanovdb_hdda_ray_start(origin, hdda.tmin + 1.0001f, direction);
3360 ijk = pnanovdb_hdda_pos_to_ijk(
PNANOVDB_REF(pos_start));
3362 pnanovdb_hdda_update(
PNANOVDB_REF(hdda), origin, direction, dim);
3384 #endif // end of NANOVDB_PNANOVDB_H_HAS_BEEN_INCLUDED
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_gridblindmetadata_get_element_count(pnanovdb_buf_t buf, pnanovdb_gridblindmetadata_handle_t p)
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_leaf_get_min_address(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_leaf_handle_t node)
#define PNANOVDB_BUF_FORCE_INLINE
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_grid_get_flags(pnanovdb_buf_t buf, pnanovdb_grid_handle_t p)
PNANOVDB_FORCE_INLINE pnanovdb_bool_t pnanovdb_leaf_get_value_mask(pnanovdb_buf_t buf, pnanovdb_leaf_handle_t p, pnanovdb_uint32_t bit_index)
pnanovdb_address_t address
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_upper_get_value_address(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_upper_handle_t upper, PNANOVDB_IN(pnanovdb_coord_t) ijk)
pnanovdb_uint32_t upper_off_max
PNANOVDB_STATIC_CONST pnanovdb_uint32_t pnanovdb_grid_type_minmax_strides_bits[PNANOVDB_GRID_TYPE_END]
pnanovdb_uint32_t lower_off_max
#define PNANOVDB_GRIDBLINDMETADATA_OFF_DATA_CLASS
PNANOVDB_FORCE_INLINE pnanovdb_int32_t pnanovdb_int64_is_zero(pnanovdb_int64_t a)
typedef int(APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int)
PNANOVDB_FORCE_INLINE float pnanovdb_leaf_fp4_read_float(pnanovdb_buf_t buf, pnanovdb_address_t address, PNANOVDB_IN(pnanovdb_coord_t) ijk)
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_leaf_onindexmask_get_value_count(pnanovdb_buf_t buf, pnanovdb_leaf_handle_t leaf)
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_version_get_major(pnanovdb_uint32_t version)
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_leaf_get_dim_and_cache(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_leaf_handle_t leaf, PNANOVDB_IN(pnanovdb_coord_t) ijk, PNANOVDB_INOUT(pnanovdb_readaccessor_t) acc)
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_leaf_onindexmask_get_min_index(pnanovdb_buf_t buf, pnanovdb_address_t min_address)
GLenum GLuint GLenum GLsizei const GLchar * buf
PNANOVDB_FORCE_INLINE pnanovdb_int64_t pnanovdb_root_tile_get_child(pnanovdb_buf_t buf, pnanovdb_root_tile_handle_t p)
#define PNANOVDB_GRIDBLINDMETADATA_SIZE
std::string upper(string_view a)
Return an all-upper case version of a (locale-independent).
PNANOVDB_FORCE_INLINE pnanovdb_vec3_t pnanovdb_read_vec3u16(pnanovdb_buf_t buf, pnanovdb_address_t address)
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_leaf_coord_to_offset(PNANOVDB_IN(pnanovdb_coord_t) ijk)
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_leaf_onindex_get_ave_index(pnanovdb_buf_t buf, pnanovdb_address_t ave_address)
PNANOVDB_FORCE_INLINE pnanovdb_bool_t pnanovdb_leaf_onindexmask_get_mask_bit(pnanovdb_buf_t buf, pnanovdb_leaf_handle_t leaf, pnanovdb_uint32_t n)
PNANOVDB_STATIC_CONST pnanovdb_uint32_t pnanovdb_grid_type_leaf_type[PNANOVDB_GRID_TYPE_END]
pnanovdb_uint32_t leaf_off_stddev
pnanovdb_uint64_t node_offset_lower
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_upper_get_max_address(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_upper_handle_t node)
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_leaf_get_bbox_dif_and_flags(pnanovdb_buf_t buf, pnanovdb_leaf_handle_t p)
PNANOVDB_FORCE_INLINE pnanovdb_bool_t pnanovdb_uint64_any_bit(pnanovdb_uint64_t a)
#define PNANOVDB_GRID_TYPE_VEC3U16
PNANOVDB_FORCE_INLINE pnanovdb_upper_handle_t pnanovdb_root_get_child(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_root_handle_t root, pnanovdb_root_tile_handle_t tile)
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_grid_get_blind_metadata_count(pnanovdb_buf_t buf, pnanovdb_grid_handle_t p)
pnanovdb_uint64_t node_offset_root
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_leaf_onindexmask_get_value_index(pnanovdb_buf_t buf, pnanovdb_address_t value_address, PNANOVDB_IN(pnanovdb_coord_t) ijk)
pnanovdb_address_t address
pnanovdb_uint32_t upper_off_stddev
PNANOVDB_FORCE_INLINE pnanovdb_map_handle_t pnanovdb_grid_get_map(pnanovdb_buf_t buf, pnanovdb_grid_handle_t p)
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_uint64_dec(pnanovdb_uint64_t a)
#define PNANOVDB_GRID_OFF_FLAGS
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_root_get_value_address_and_level(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_root_handle_t root, PNANOVDB_IN(pnanovdb_coord_t) ijk, PNANOVDB_INOUT(pnanovdb_uint32_t) level)
PNANOVDB_FORCE_INLINE float pnanovdb_map_get_vecf(pnanovdb_buf_t buf, pnanovdb_map_handle_t p, pnanovdb_uint32_t index)
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_upper_get_value_address_and_level(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_upper_handle_t upper, PNANOVDB_IN(pnanovdb_coord_t) ijk, PNANOVDB_INOUT(pnanovdb_uint32_t) level)
#define PNANOVDB_GRID_OFF_CHECKSUM
pnanovdb_uint32_t child_mask[1024]
PNANOVDB_FORCE_INLINE void pnanovdb_tree_set_tile_count_lower(pnanovdb_buf_t buf, pnanovdb_tree_handle_t p, pnanovdb_uint32_t tile_count_lower)
PNANOVDB_FORCE_INLINE pnanovdb_lower_handle_t pnanovdb_upper_get_child(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_upper_handle_t upper, pnanovdb_uint32_t n)
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_address_mask(pnanovdb_address_t address, pnanovdb_uint32_t mask)
PNANOVDB_FORCE_INLINE void pnanovdb_lower_set_table_child(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_lower_handle_t node, pnanovdb_uint32_t n, pnanovdb_int64_t child)
PNANOVDB_FORCE_INLINE pnanovdb_tree_handle_t pnanovdb_grid_get_tree(pnanovdb_buf_t buf, pnanovdb_grid_handle_t grid)
PNANOVDB_FORCE_INLINE float pnanovdb_root_fp4_read_float(pnanovdb_buf_t buf, pnanovdb_address_t address, PNANOVDB_IN(pnanovdb_coord_t) ijk, pnanovdb_uint32_t level)
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_read_uint32(pnanovdb_buf_t buf, pnanovdb_address_t address)
pnanovdb_uint64_t voxel_count
PNANOVDB_FORCE_INLINE double pnanovdb_read_double(pnanovdb_buf_t buf, pnanovdb_address_t address)
#define PNANOVDB_LOWER_OFF_FLAGS
pnanovdb_lower_handle_t lower
pnanovdb_uint32_t leaf_off_ave
#define PNANOVDB_ROOT_OFF_TABLE_SIZE
IMATH_HOSTDEVICE constexpr int floor(T x) IMATH_NOEXCEPT
pnanovdb_address_t address
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_leaf_onindex_get_min_index(pnanovdb_buf_t buf, pnanovdb_address_t min_address)
#define PNANOVDB_ROOT_TILE_OFF_STATE
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_leaf_pointindex_get_offset(pnanovdb_buf_t buf, pnanovdb_leaf_handle_t leaf)
PNANOVDB_FORCE_INLINE void pnanovdb_tree_set_node_count_lower(pnanovdb_buf_t buf, pnanovdb_tree_handle_t p, pnanovdb_uint32_t node_count_lower)
#define PNANOVDB_ROOT_OFF_BBOX_MIN
#define PNANOVDB_INOUT(X)
pnanovdb_address_t address
PNANOVDB_FORCE_INLINE void pnanovdb_grid_set_grid_name(pnanovdb_buf_t buf, pnanovdb_grid_handle_t p, pnanovdb_uint32_t index, pnanovdb_uint32_t grid_name)
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_leaf_onindexmask_get_last_offset(pnanovdb_buf_t buf, pnanovdb_leaf_handle_t leaf)
pnanovdb_uint64_t grid_size
PNANOVDB_FORCE_INLINE float pnanovdb_map_get_matf(pnanovdb_buf_t buf, pnanovdb_map_handle_t p, pnanovdb_uint32_t index)
IMF_EXPORT IMATH_NAMESPACE::V3f direction(const IMATH_NAMESPACE::Box2i &dataWindow, const IMATH_NAMESPACE::V2f &pixelPosition)
pnanovdb_leaf_handle_t leaf
#define PNANOVDB_GRID_TYPE_GET(grid_typeIn, nameIn)
pnanovdb_uint32_t tile_count_leaf
GLsizei const GLfloat * value
PNANOVDB_FORCE_INLINE void pnanovdb_upper_set_bbox_max(pnanovdb_buf_t buf, pnanovdb_upper_handle_t p, PNANOVDB_IN(pnanovdb_coord_t) bbox_max)
pnanovdb_int64_t blind_metadata_offset
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_root_get_value_address_bit(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_root_handle_t root, PNANOVDB_IN(pnanovdb_coord_t) ijk, PNANOVDB_INOUT(pnanovdb_uint32_t) bit_index)
PNANOVDB_FORCE_INLINE void pnanovdb_upper_set_bbox_min(pnanovdb_buf_t buf, pnanovdb_upper_handle_t p, PNANOVDB_IN(pnanovdb_coord_t) bbox_min)
PNANOVDB_FORCE_INLINE pnanovdb_vec3_t pnanovdb_grid_index_to_worldf(pnanovdb_buf_t buf, pnanovdb_grid_handle_t grid, PNANOVDB_IN(pnanovdb_vec3_t) src)
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_lower_get_flags(pnanovdb_buf_t buf, pnanovdb_lower_handle_t p)
PNANOVDB_FORCE_INLINE pnanovdb_leaf_handle_t pnanovdb_lower_get_child(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_lower_handle_t lower, pnanovdb_uint32_t n)
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_lower_get_ave_address(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_lower_handle_t node)
pnanovdb_uint64_t checksum
PNANOVDB_FORCE_INLINE pnanovdb_bool_t pnanovdb_root_is_active_and_cache(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_root_handle_t root, PNANOVDB_IN(pnanovdb_coord_t) ijk, PNANOVDB_INOUT(pnanovdb_readaccessor_t) acc)
PNANOVDB_FORCE_INLINE pnanovdb_coord_t pnanovdb_lower_get_bbox_max(pnanovdb_buf_t buf, pnanovdb_lower_handle_t p)
GLdouble GLdouble GLdouble z
#define PNANOVDB_TREE_OFF_NODE_OFFSET_LOWER
PNANOVDB_BUF_FORCE_INLINE uint32_t pnanovdb_buf_read_uint32(pnanovdb_buf_t buf, uint64_t byte_offset)
PNANOVDB_FORCE_INLINE pnanovdb_bool_t pnanovdb_readaccessor_iscached2(PNANOVDB_INOUT(pnanovdb_readaccessor_t) acc, int dirty)
PNANOVDB_FORCE_INLINE pnanovdb_vec3_t pnanovdb_map_apply(pnanovdb_buf_t buf, pnanovdb_map_handle_t map, PNANOVDB_IN(pnanovdb_vec3_t) src)
PNANOVDB_FORCE_INLINE pnanovdb_bool_t pnanovdb_leaf_onindex_has_stats(pnanovdb_buf_t buf, pnanovdb_leaf_handle_t leaf)
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_tree_get_node_offset_lower(pnanovdb_buf_t buf, pnanovdb_tree_handle_t p)
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_readaccessor_get_value_address_and_level(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, PNANOVDB_INOUT(pnanovdb_readaccessor_t) acc, PNANOVDB_IN(pnanovdb_coord_t) ijk, PNANOVDB_INOUT(pnanovdb_uint32_t) level)
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_gridblindmetadata_get_semantic(pnanovdb_buf_t buf, pnanovdb_gridblindmetadata_handle_t p)
PNANOVDB_FORCE_INLINE pnanovdb_bool_t pnanovdb_upper_get_child_mask(pnanovdb_buf_t buf, pnanovdb_upper_handle_t p, pnanovdb_uint32_t bit_index)
PNANOVDB_FORCE_INLINE pnanovdb_int32_t pnanovdb_uint32_as_int32(pnanovdb_uint32_t v)
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_leaf_index_get_max_index(pnanovdb_buf_t buf, pnanovdb_address_t max_address)
pnanovdb_uint32_t leaf_size
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_tree_get_node_count_leaf(pnanovdb_buf_t buf, pnanovdb_tree_handle_t p)
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_root_index_get_value_index(pnanovdb_buf_t buf, pnanovdb_address_t address, PNANOVDB_IN(pnanovdb_coord_t) ijk, pnanovdb_uint32_t level)
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_uint64_countbits(pnanovdb_uint64_t value)
PNANOVDB_FORCE_INLINE pnanovdb_root_tile_handle_t pnanovdb_root_find_tile(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_root_handle_t root, PNANOVDB_IN(pnanovdb_coord_t) ijk)
PNANOVDB_FORCE_INLINE pnanovdb_root_tile_handle_t pnanovdb_root_get_tile_zero(pnanovdb_grid_type_t grid_type, pnanovdb_root_handle_t root)
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_tree_get_node_count_upper(pnanovdb_buf_t buf, pnanovdb_tree_handle_t p)
PNANOVDB_FORCE_INLINE pnanovdb_vec3_t pnanovdb_vec3_min(const pnanovdb_vec3_t a, const pnanovdb_vec3_t b)
GLboolean GLboolean GLboolean GLboolean a
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_grid_get_grid_name(pnanovdb_buf_t buf, pnanovdb_grid_handle_t p, pnanovdb_uint32_t index)
#define PNANOVDB_GRID_OFF_BLIND_METADATA_OFFSET
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_leaf_get_max_address(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_leaf_handle_t node)
PNANOVDB_FORCE_INLINE void pnanovdb_tree_set_node_offset_leaf(pnanovdb_buf_t buf, pnanovdb_tree_handle_t p, pnanovdb_uint64_t node_offset_leaf)
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_leaf_get_value_address_and_cache(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_leaf_handle_t leaf, PNANOVDB_IN(pnanovdb_coord_t) ijk, PNANOVDB_INOUT(pnanovdb_readaccessor_t) acc)
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_float_as_uint32(float v)
#define PNANOVDB_GRID_TYPE_POINTINDEX
PNANOVDB_STATIC_CONST pnanovdb_grid_type_constants_t pnanovdb_grid_type_constants[PNANOVDB_GRID_TYPE_END]
PNANOVDB_FORCE_INLINE pnanovdb_coord_t pnanovdb_upper_get_bbox_max(pnanovdb_buf_t buf, pnanovdb_upper_handle_t p)
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_leaf_index_get_value_index(pnanovdb_buf_t buf, pnanovdb_address_t value_address, PNANOVDB_IN(pnanovdb_coord_t) ijk)
pnanovdb_uint32_t grid_index
pnanovdb_uint32_t version
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_root_tile_get_value_address(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_root_tile_handle_t root_tile)
pnanovdb_uint32_t tile_count_upper
ImageBuf OIIO_API min(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_uint64_and(pnanovdb_uint64_t a, pnanovdb_uint64_t b)
PNANOVDB_FORCE_INLINE pnanovdb_coord_t pnanovdb_root_get_bbox_max(pnanovdb_buf_t buf, pnanovdb_root_handle_t p)
PNANOVDB_FORCE_INLINE void pnanovdb_leaf_onindexmask_set_mask_bit(pnanovdb_buf_t buf, pnanovdb_leaf_handle_t leaf, pnanovdb_uint32_t n, pnanovdb_bool_t v)
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_leaf_pointindex_get_point_count(pnanovdb_buf_t buf, pnanovdb_leaf_handle_t leaf)
PNANOVDB_FORCE_INLINE void pnanovdb_leaf_pointindex_set_on(pnanovdb_buf_t buf, pnanovdb_leaf_handle_t leaf, pnanovdb_uint32_t i)
GLenum GLenum GLsizei const GLuint GLboolean enabled
pnanovdb_coord_t bbox_min
PNANOVDB_FORCE_INLINE pnanovdb_bool_t pnanovdb_leaf_index_has_stats(pnanovdb_buf_t buf, pnanovdb_leaf_handle_t leaf)
PNANOVDB_FORCE_INLINE void pnanovdb_leaf_indexmask_set_mask_bit(pnanovdb_buf_t buf, pnanovdb_leaf_handle_t leaf, pnanovdb_uint32_t n, pnanovdb_bool_t v)
PNANOVDB_FORCE_INLINE pnanovdb_vec3_t pnanovdb_map_apply_inverse_jacobi(pnanovdb_buf_t buf, pnanovdb_map_handle_t map, PNANOVDB_IN(pnanovdb_vec3_t) src)
PNANOVDB_FORCE_INLINE void pnanovdb_leaf_pointindex_set_value(pnanovdb_buf_t buf, pnanovdb_leaf_handle_t leaf, pnanovdb_uint32_t i, pnanovdb_uint32_t value)
#define PNANOVDB_GRIDBLINDMETADATA_OFF_SEMANTIC
#define PNANOVDB_GRID_OFF_GRID_CLASS
#define PNANOVDB_MAP_OFF_INVMATD
PNANOVDB_FORCE_INLINE void pnanovdb_map_set_matf(pnanovdb_buf_t buf, pnanovdb_map_handle_t p, pnanovdb_uint32_t index, float matf)
PNANOVDB_FORCE_INLINE void pnanovdb_map_set_matd(pnanovdb_buf_t buf, pnanovdb_map_handle_t p, pnanovdb_uint32_t index, double matd)
pnanovdb_uint32_t lower_off_table
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_root_get_ave_address(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_root_handle_t root)
#define PNANOVDB_LEAF_TABLE_NEG_OFF_MINIMUM
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_leaf_get_value_address(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_leaf_handle_t leaf, PNANOVDB_IN(pnanovdb_coord_t) ijk)
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_gridblindmetadata_get_data_type(pnanovdb_buf_t buf, pnanovdb_gridblindmetadata_handle_t p)
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_uint32_countbits(pnanovdb_uint32_t value)
pnanovdb_address_t address
PNANOVDB_FORCE_INLINE double pnanovdb_map_get_invmatd(pnanovdb_buf_t buf, pnanovdb_map_handle_t p, pnanovdb_uint32_t index)
PNANOVDB_FORCE_INLINE pnanovdb_root_handle_t pnanovdb_tree_get_root(pnanovdb_buf_t buf, pnanovdb_tree_handle_t tree)
PNANOVDB_FORCE_INLINE pnanovdb_bool_t pnanovdb_readaccessor_iscached1(PNANOVDB_INOUT(pnanovdb_readaccessor_t) acc, int dirty)
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_upper_get_table_address(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_upper_handle_t node, pnanovdb_uint32_t n)
PNANOVDB_FORCE_INLINE float pnanovdb_dither_lookup(pnanovdb_bool_t enabled, int offset)
PNANOVDB_FORCE_INLINE double pnanovdb_uint64_as_double(pnanovdb_uint64_t v)
#define PNANOVDB_GRID_TYPE_VEC3U8
PNANOVDB_FORCE_INLINE void pnanovdb_root_tile_set_child(pnanovdb_buf_t buf, pnanovdb_root_tile_handle_t p, pnanovdb_int64_t child)
pnanovdb_uint32_t root_tile_off_value
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_gridblindmetadata_get_name(pnanovdb_buf_t buf, pnanovdb_gridblindmetadata_handle_t p, pnanovdb_uint32_t index)
#define PNANOVDB_TREE_OFF_TILE_COUNT_LOWER
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_leaf_onindexmask_get_max_index(pnanovdb_buf_t buf, pnanovdb_address_t max_address)
PNANOVDB_FORCE_INLINE float pnanovdb_leaf_fp16_read_float(pnanovdb_buf_t buf, pnanovdb_address_t address, PNANOVDB_IN(pnanovdb_coord_t) ijk)
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_leaf_onindexmask_get_dev_index(pnanovdb_buf_t buf, pnanovdb_address_t dev_address)
pnanovdb_uint32_t table_stride
pnanovdb_uint32_t root_off_min
PNANOVDB_FORCE_INLINE pnanovdb_int64_t pnanovdb_lower_get_table_child(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_lower_handle_t node, pnanovdb_uint32_t n)
#define PNANOVDB_UPPER_OFF_FLAGS
PNANOVDB_FORCE_INLINE void pnanovdb_leaf_pointindex_set_value_only(pnanovdb_buf_t buf, pnanovdb_leaf_handle_t leaf, pnanovdb_uint32_t i, pnanovdb_uint32_t value)
uint64_t pnanovdb_uint64_t
#define PNANOVDB_GRID_SIZE
#define PNANOVDB_MAP_OFF_VECD
pnanovdb_uint32_t lower_off_stddev
PNANOVDB_FORCE_INLINE void pnanovdb_tree_set_node_offset_upper(pnanovdb_buf_t buf, pnanovdb_tree_handle_t p, pnanovdb_uint64_t node_offset_upper)
PNANOVDB_FORCE_INLINE void pnanovdb_leaf_set_bbox_dif_and_flags(pnanovdb_buf_t buf, pnanovdb_leaf_handle_t p, pnanovdb_uint32_t bbox_dif_and_flags)
pnanovdb_uint32_t lower_off_ave
#define PNANOVDB_GRID_OFF_VERSION
pnanovdb_address_t address
PNANOVDB_FORCE_INLINE void pnanovdb_write_uint64(pnanovdb_buf_t buf, pnanovdb_address_t address, pnanovdb_uint64_t value)
pnanovdb_uint32_t node_count_upper
PNANOVDB_FORCE_INLINE pnanovdb_vec3_t pnanovdb_vec3_uniform(float a)
pnanovdb_uint32_t upper_off_ave
PNANOVDB_FORCE_INLINE void pnanovdb_write_int64(pnanovdb_buf_t buf, pnanovdb_address_t address, pnanovdb_int64_t value)
pnanovdb_root_handle_t root
#define PNANOVDB_ROOT_OFF_BBOX_MAX
GA_API const UT_StringHolder scale
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_uint64_offset(pnanovdb_uint64_t a, pnanovdb_uint32_t b)
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_leaf_indexmask_get_min_index(pnanovdb_buf_t buf, pnanovdb_address_t min_address)
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_leaf_get_stddev_address(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_leaf_handle_t node)
PNANOVDB_BUF_FORCE_INLINE void pnanovdb_buf_write_uint64(pnanovdb_buf_t buf, uint64_t byte_offset, uint64_t value)
PNANOVDB_FORCE_INLINE void pnanovdb_lower_set_bbox_max(pnanovdb_buf_t buf, pnanovdb_lower_handle_t p, PNANOVDB_IN(pnanovdb_coord_t) bbox_max)
PNANOVDB_FORCE_INLINE float pnanovdb_map_get_invmatf(pnanovdb_buf_t buf, pnanovdb_map_handle_t p, pnanovdb_uint32_t index)
#define PNANOVDB_TREE_OFF_NODE_COUNT_LOWER
PNANOVDB_FORCE_INLINE double pnanovdb_map_get_matd(pnanovdb_buf_t buf, pnanovdb_map_handle_t p, pnanovdb_uint32_t index)
#define PNANOVDB_LEAF_OFF_BBOX_DIF_AND_FLAGS
#define PNANOVDB_FORCE_INLINE
PNANOVDB_FORCE_INLINE void pnanovdb_write_double(pnanovdb_buf_t buf, pnanovdb_address_t address, double value)
PNANOVDB_FORCE_INLINE float pnanovdb_leaf_fpn_read_float(pnanovdb_buf_t buf, pnanovdb_address_t address, PNANOVDB_IN(pnanovdb_coord_t) ijk)
PNANOVDB_FORCE_INLINE void pnanovdb_tree_set_node_offset_root(pnanovdb_buf_t buf, pnanovdb_tree_handle_t p, pnanovdb_uint64_t node_offset_root)
PNANOVDB_STATIC_CONST pnanovdb_uint32_t pnanovdb_grid_type_value_strides_bits[PNANOVDB_GRID_TYPE_END]
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_upper_get_value_address_and_level_and_cache(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_upper_handle_t upper, PNANOVDB_IN(pnanovdb_coord_t) ijk, PNANOVDB_INOUT(pnanovdb_readaccessor_t) acc, PNANOVDB_INOUT(pnanovdb_uint32_t) level)
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_uint64_to_uint32_lsr(pnanovdb_uint64_t a, pnanovdb_uint32_t b)
pnanovdb_uint32_t root_off_stddev
PNANOVDB_FORCE_INLINE pnanovdb_bool_t pnanovdb_lower_get_child_mask(pnanovdb_buf_t buf, pnanovdb_lower_handle_t p, pnanovdb_uint32_t bit_index)
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_leaf_indexmask_get_ave_index(pnanovdb_buf_t buf, pnanovdb_address_t ave_address)
PNANOVDB_FORCE_INLINE pnanovdb_bool_t pnanovdb_lower_get_value_mask(pnanovdb_buf_t buf, pnanovdb_lower_handle_t p, pnanovdb_uint32_t bit_index)
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_version_get_patch(pnanovdb_uint32_t version)
pnanovdb_uint32_t upper_off_table
IMATH_NAMESPACE::V2f float
PNANOVDB_FORCE_INLINE void pnanovdb_grid_set_grid_type(pnanovdb_buf_t buf, pnanovdb_grid_handle_t p, pnanovdb_uint32_t grid_type)
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_upper_get_ave_address(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_upper_handle_t node)
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_upper_get_value_address_and_cache(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_upper_handle_t upper, PNANOVDB_IN(pnanovdb_coord_t) ijk, PNANOVDB_INOUT(pnanovdb_readaccessor_t) acc)
PNANOVDB_FORCE_INLINE float pnanovdb_max(float a, float b)
#define PNANOVDB_MAP_OFF_TAPERF
#define PNANOVDB_GRIDBLINDMETADATA_OFF_NAME
PNANOVDB_FORCE_INLINE void pnanovdb_tree_set_node_count_upper(pnanovdb_buf_t buf, pnanovdb_tree_handle_t p, pnanovdb_uint32_t node_count_upper)
struct pnanovdb_coord_t pnanovdb_coord_t
pnanovdb_uint32_t leaf_off_table
PNANOVDB_FORCE_INLINE float pnanovdb_root_fp8_read_float(pnanovdb_buf_t buf, pnanovdb_address_t address, PNANOVDB_IN(pnanovdb_coord_t) ijk, pnanovdb_uint32_t level)
pnanovdb_uint32_t root_off_max
PNANOVDB_FORCE_INLINE pnanovdb_bool_t pnanovdb_address_is_null(pnanovdb_address_t address)
PNANOVDB_STATIC_CONST pnanovdb_uint32_t pnanovdb_grid_type_stat_strides_bits[PNANOVDB_GRID_TYPE_END]
pnanovdb_uint32_t value_mask[16]
pnanovdb_coord_t bbox_max
#define PNANOVDB_GRID_OFF_BLIND_METADATA_COUNT
PNANOVDB_FORCE_INLINE void pnanovdb_upper_set_table_child(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_upper_handle_t node, pnanovdb_uint32_t n, pnanovdb_int64_t child)
PNANOVDB_FORCE_INLINE void pnanovdb_root_set_bbox_min(pnanovdb_buf_t buf, pnanovdb_root_handle_t p, PNANOVDB_IN(pnanovdb_coord_t) bbox_min)
PNANOVDB_FORCE_INLINE float pnanovdb_min(float a, float b)
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_coord_to_key(PNANOVDB_IN(pnanovdb_coord_t) ijk)
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_lower_get_table_address(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_lower_handle_t node, pnanovdb_uint32_t n)
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_leaf_index_get_min_index(pnanovdb_buf_t buf, pnanovdb_address_t min_address)
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_root_pointindex_get_point_address_range(pnanovdb_buf_t buf, pnanovdb_grid_type_t value_type, pnanovdb_address_t value_address, pnanovdb_address_t blindmetadata_value_address, PNANOVDB_IN(pnanovdb_coord_t) ijk, pnanovdb_uint32_t level, PNANOVDB_INOUT(pnanovdb_address_t) address_begin, PNANOVDB_INOUT(pnanovdb_address_t) address_end)
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_leaf_get_table_address(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_leaf_handle_t node, pnanovdb_uint32_t n)
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_leaf_get_ave_address(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_leaf_handle_t node)
PNANOVDB_STATIC_CONST pnanovdb_uint32_t pnanovdb_grid_type_minmax_aligns_bits[PNANOVDB_GRID_TYPE_END]
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_uint64_low(pnanovdb_uint64_t v)
PNANOVDB_FORCE_INLINE void pnanovdb_lower_set_child_mask(pnanovdb_buf_t buf, pnanovdb_lower_handle_t p, pnanovdb_uint32_t bit_index, pnanovdb_bool_t value)
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_tree_get_node_offset_upper(pnanovdb_buf_t buf, pnanovdb_tree_handle_t p)
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_tree_get_node_offset_leaf(pnanovdb_buf_t buf, pnanovdb_tree_handle_t p)
PNANOVDB_FORCE_INLINE void pnanovdb_grid_set_grid_class(pnanovdb_buf_t buf, pnanovdb_grid_handle_t p, pnanovdb_uint32_t grid_class)
PNANOVDB_FORCE_INLINE void pnanovdb_leaf_set_bbox_min(pnanovdb_buf_t buf, pnanovdb_leaf_handle_t p, PNANOVDB_IN(pnanovdb_coord_t) bbox_min)
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_grid_get_grid_type(pnanovdb_buf_t buf, pnanovdb_grid_handle_t p)
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_grid_get_checksum(pnanovdb_buf_t buf, pnanovdb_grid_handle_t p)
PNANOVDB_FORCE_INLINE void pnanovdb_map_set_taperd(pnanovdb_buf_t buf, pnanovdb_map_handle_t p, pnanovdb_uint32_t index, double taperd)
#define PNANOVDB_GRIDBLINDMETADATA_OFF_DATA_TYPE
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_address_offset_neg(pnanovdb_address_t address, pnanovdb_uint32_t byte_offset)
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_lower_get_min_address(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_lower_handle_t node)
GLint GLenum GLboolean GLsizei stride
PNANOVDB_FORCE_INLINE void pnanovdb_root_set_tile_count(pnanovdb_buf_t buf, pnanovdb_root_handle_t p, pnanovdb_uint32_t tile_count)
PNANOVDB_FORCE_INLINE void pnanovdb_map_set_vecf(pnanovdb_buf_t buf, pnanovdb_map_handle_t p, pnanovdb_uint32_t index, float vecf)
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_tree_get_node_offset_root(pnanovdb_buf_t buf, pnanovdb_tree_handle_t p)
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_grid_get_gridblindmetadata_value_address(pnanovdb_buf_t buf, pnanovdb_grid_handle_t grid, pnanovdb_uint32_t index)
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_root_get_tile_count(pnanovdb_buf_t buf, pnanovdb_root_handle_t p)
PNANOVDB_FORCE_INLINE pnanovdb_vec3_t pnanovdb_read_vec3u8(pnanovdb_buf_t buf, pnanovdb_address_t address)
PNANOVDB_FORCE_INLINE void pnanovdb_grid_set_blind_metadata_count(pnanovdb_buf_t buf, pnanovdb_grid_handle_t p, pnanovdb_uint32_t metadata_count)
pnanovdb_upper_handle_t upper
#define PNANOVDB_TREE_OFF_NODE_COUNT_LEAF
pnanovdb_uint32_t grid_type
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_grid_get_grid_size(pnanovdb_buf_t buf, pnanovdb_grid_handle_t p)
PNANOVDB_BUF_FORCE_INLINE uint64_t pnanovdb_buf_read_uint64(pnanovdb_buf_t buf, uint64_t byte_offset)
PNANOVDB_FORCE_INLINE pnanovdb_int32_t pnanovdb_read_int32(pnanovdb_buf_t buf, pnanovdb_address_t address)
PNANOVDB_FORCE_INLINE float pnanovdb_leaf_fp8_read_float(pnanovdb_buf_t buf, pnanovdb_address_t address, PNANOVDB_IN(pnanovdb_coord_t) ijk)
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_address_offset64_product(pnanovdb_address_t address, pnanovdb_uint64_t byte_offset, pnanovdb_uint32_t multiplier)
PNANOVDB_STATIC_CONST float pnanovdb_dither_lut[512]
PNANOVDB_FORCE_INLINE void pnanovdb_lower_set_bbox_min(pnanovdb_buf_t buf, pnanovdb_lower_handle_t p, PNANOVDB_IN(pnanovdb_coord_t) bbox_min)
#define PNANOVDB_GRID_OFF_GRID_INDEX
uint32_t pnanovdb_grid_type_t
PNANOVDB_FORCE_INLINE pnanovdb_coord_t pnanovdb_coord_uniform(const pnanovdb_int32_t a)
PNANOVDB_FORCE_INLINE pnanovdb_int64_t pnanovdb_read_int64(pnanovdb_buf_t buf, pnanovdb_address_t address)
#define PNANOVDB_UPPER_OFF_BBOX_MIN
uint64_t checksum(const NanoGrid< BuildT > &grid, ChecksumMode mode=ChecksumMode::Default)
Return the (2 x CRC32) checksum of the specified grid.
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_grid_get_version(pnanovdb_buf_t buf, pnanovdb_grid_handle_t p)
pnanovdb_uint32_t value_mask[128]
PNANOVDB_FORCE_INLINE float pnanovdb_root_fp16_read_float(pnanovdb_buf_t buf, pnanovdb_address_t address, PNANOVDB_IN(pnanovdb_coord_t) ijk, pnanovdb_uint32_t level)
#define PNANOVDB_UPPER_OFF_BBOX_MAX
PNANOVDB_FORCE_INLINE void pnanovdb_tree_set_tile_count_leaf(pnanovdb_buf_t buf, pnanovdb_tree_handle_t p, pnanovdb_uint32_t tile_count_leaf)
PNANOVDB_FORCE_INLINE pnanovdb_bool_t pnanovdb_leaf_is_active_and_cache(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_leaf_handle_t leaf, PNANOVDB_IN(pnanovdb_coord_t) ijk, PNANOVDB_INOUT(pnanovdb_readaccessor_t) acc)
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_root_get_value_address(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_root_handle_t root, PNANOVDB_IN(pnanovdb_coord_t) ijk)
GLuint const GLchar * name
pnanovdb_coord_t bbox_min
PNANOVDB_FORCE_INLINE void pnanovdb_root_tile_set_state(pnanovdb_buf_t buf, pnanovdb_root_tile_handle_t p, pnanovdb_uint32_t state)
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_leaf_index_get_dev_index(pnanovdb_buf_t buf, pnanovdb_address_t dev_address)
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_int64_as_uint64(pnanovdb_int64_t v)
PNANOVDB_FORCE_INLINE void pnanovdb_grid_set_flags(pnanovdb_buf_t buf, pnanovdb_grid_handle_t p, pnanovdb_uint32_t flags)
PNANOVDB_FORCE_INLINE float pnanovdb_uint32_to_float(pnanovdb_uint32_t v)
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_upper_get_min_address(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_upper_handle_t node)
#define PNANOVDB_LEAF_OFF_BBOX_MIN
GLboolean GLboolean GLboolean b
PNANOVDB_FORCE_INLINE pnanovdb_bool_t pnanovdb_upper_get_value_mask(pnanovdb_buf_t buf, pnanovdb_upper_handle_t p, pnanovdb_uint32_t bit_index)
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_leaf_onindexmask_get_ave_index(pnanovdb_buf_t buf, pnanovdb_address_t ave_address)
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_readaccessor_get_value_address(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, PNANOVDB_INOUT(pnanovdb_readaccessor_t) acc, PNANOVDB_IN(pnanovdb_coord_t) ijk)
pnanovdb_uint32_t upper_off_min
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_tree_get_tile_count_lower(pnanovdb_buf_t buf, pnanovdb_tree_handle_t p)
pnanovdb_uint32_t root_size
PNANOVDB_FORCE_INLINE pnanovdb_vec3_t pnanovdb_grid_world_to_index_dirf(pnanovdb_buf_t buf, pnanovdb_grid_handle_t grid, PNANOVDB_IN(pnanovdb_vec3_t) src)
PNANOVDB_FORCE_INLINE double pnanovdb_map_get_vecd(pnanovdb_buf_t buf, pnanovdb_map_handle_t p, pnanovdb_uint32_t index)
PNANOVDB_FORCE_INLINE pnanovdb_vec3_t pnanovdb_vec3_div(const pnanovdb_vec3_t a, const pnanovdb_vec3_t b)
pnanovdb_uint64_t node_offset_leaf
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_tree_get_tile_count_leaf(pnanovdb_buf_t buf, pnanovdb_tree_handle_t p)
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_tree_get_node_count_lower(pnanovdb_buf_t buf, pnanovdb_tree_handle_t p)
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_upper_coord_to_offset(PNANOVDB_IN(pnanovdb_coord_t) ijk)
#define PNANOVDB_GRID_OFF_VOXEL_SIZE
PNANOVDB_FORCE_INLINE pnanovdb_vec3_t pnanovdb_vec3_mul(const pnanovdb_vec3_t a, const pnanovdb_vec3_t b)
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_grid_get_magic(pnanovdb_buf_t buf, pnanovdb_grid_handle_t p)
#define PNANOVDB_LOWER_OFF_CHILD_MASK
#define PNANOVDB_LOWER_OFF_VALUE_MASK
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_address_null()
pnanovdb_coord_t bbox_max
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_tree_get_tile_count_upper(pnanovdb_buf_t buf, pnanovdb_tree_handle_t p)
PNANOVDB_FORCE_INLINE void pnanovdb_map_set_invmatd(pnanovdb_buf_t buf, pnanovdb_map_handle_t p, pnanovdb_uint32_t index, double invmatd)
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_lower_get_stddev_address(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_lower_handle_t node)
GT_API const UT_StringHolder version
PNANOVDB_FORCE_INLINE double pnanovdb_grid_get_world_bbox(pnanovdb_buf_t buf, pnanovdb_grid_handle_t p, pnanovdb_uint32_t index)
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_root_get_value_address_and_level_and_cache(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_root_handle_t root, PNANOVDB_IN(pnanovdb_coord_t) ijk, PNANOVDB_INOUT(pnanovdb_readaccessor_t) acc, PNANOVDB_INOUT(pnanovdb_uint32_t) level)
pnanovdb_uint32_t leaf_off_min
PNANOVDB_FORCE_INLINE pnanovdb_coord_t pnanovdb_upper_get_bbox_min(pnanovdb_buf_t buf, pnanovdb_upper_handle_t p)
PNANOVDB_FORCE_INLINE void pnanovdb_tree_set_node_count_leaf(pnanovdb_buf_t buf, pnanovdb_tree_handle_t p, pnanovdb_uint32_t node_count_leaf)
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_root_get_min_address(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_root_handle_t root)
PNANOVDB_FORCE_INLINE pnanovdb_bool_t pnanovdb_lower_is_active_and_cache(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_lower_handle_t lower, PNANOVDB_IN(pnanovdb_coord_t) ijk, PNANOVDB_INOUT(pnanovdb_readaccessor_t) acc)
#define PNANOVDB_LEAF_OFF_VALUE_MASK
pnanovdb_uint32_t root_off_background
pnanovdb_uint32_t value_mask[1024]
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_read_uint64(pnanovdb_buf_t buf, pnanovdb_address_t address)
PNANOVDB_FORCE_INLINE void pnanovdb_tree_set_tile_count_upper(pnanovdb_buf_t buf, pnanovdb_tree_handle_t p, pnanovdb_uint32_t tile_count_upper)
pnanovdb_coord_t bbox_min
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_grid_get_grid_index(pnanovdb_buf_t buf, pnanovdb_grid_handle_t p)
#define PNANOVDB_TREE_OFF_NODE_OFFSET_ROOT
PNANOVDB_FORCE_INLINE void pnanovdb_root_tile_set_key(pnanovdb_buf_t buf, pnanovdb_root_tile_handle_t p, pnanovdb_uint64_t key)
PNANOVDB_FORCE_INLINE pnanovdb_int32_t pnanovdb_float_to_int32(float v)
pnanovdb_uint32_t lower_size
#define PNANOVDB_LOWER_OFF_BBOX_MIN
PNANOVDB_FORCE_INLINE pnanovdb_bool_t pnanovdb_read_bit(pnanovdb_buf_t buf, pnanovdb_address_t address, pnanovdb_uint32_t bit_offset)
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_lower_get_value_address_and_level_and_cache(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_lower_handle_t lower, PNANOVDB_IN(pnanovdb_coord_t) ijk, PNANOVDB_INOUT(pnanovdb_readaccessor_t) acc, PNANOVDB_INOUT(pnanovdb_uint32_t) level)
PNANOVDB_FORCE_INLINE pnanovdb_vec3_t pnanovdb_vec3_sub(const pnanovdb_vec3_t a, const pnanovdb_vec3_t b)
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_lower_get_max_address(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_lower_handle_t node)
#define PNANOVDB_UPPER_OFF_CHILD_MASK
#define PNANOVDB_MAP_OFF_INVMATF
PNANOVDB_FORCE_INLINE void pnanovdb_write_float(pnanovdb_buf_t buf, pnanovdb_address_t address, float value)
PNANOVDB_FORCE_INLINE double pnanovdb_map_get_taperd(pnanovdb_buf_t buf, pnanovdb_map_handle_t p, pnanovdb_uint32_t index)
PNANOVDB_FORCE_INLINE void pnanovdb_root_set_bbox_max(pnanovdb_buf_t buf, pnanovdb_root_handle_t p, PNANOVDB_IN(pnanovdb_coord_t) bbox_max)
PNANOVDB_FORCE_INLINE pnanovdb_int64_t pnanovdb_gridblindmetadata_get_byte_offset(pnanovdb_buf_t buf, pnanovdb_gridblindmetadata_handle_t p)
PNANOVDB_FORCE_INLINE void pnanovdb_grid_set_grid_index(pnanovdb_buf_t buf, pnanovdb_grid_handle_t p, pnanovdb_uint32_t grid_index)
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_address_mask_inv(pnanovdb_address_t address, pnanovdb_uint32_t mask)
pnanovdb_uint32_t grid_count
#define PNANOVDB_GRID_TYPE_FLOAT
PNANOVDB_FORCE_INLINE pnanovdb_coord_t pnanovdb_read_coord(pnanovdb_buf_t buf, pnanovdb_address_t address)
pnanovdb_address_t address
PNANOVDB_STATIC_CONST pnanovdb_uint32_t pnanovdb_grid_type_table_strides_bits[PNANOVDB_GRID_TYPE_END]
#define PNANOVDB_GRID_OFF_MAP
#define PNANOVDB_LEAF_TABLE_NEG_OFF_QUANTUM
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_root_pointindex_get_point_range(pnanovdb_buf_t buf, pnanovdb_address_t value_address, PNANOVDB_IN(pnanovdb_coord_t) ijk, pnanovdb_uint32_t level, PNANOVDB_INOUT(pnanovdb_uint64_t) range_begin, PNANOVDB_INOUT(pnanovdb_uint64_t) range_end)
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_leaf_index_get_ave_index(pnanovdb_buf_t buf, pnanovdb_address_t ave_address)
#define PNANOVDB_TREE_OFF_NODE_OFFSET_UPPER
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_root_get_max_address(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_root_handle_t root)
pnanovdb_uint32_t grid_class
#define PNANOVDB_TREE_OFF_VOXEL_COUNT
PNANOVDB_FORCE_INLINE pnanovdb_bool_t pnanovdb_address_in_interval(pnanovdb_address_t address, pnanovdb_address_t min_address, pnanovdb_address_t max_address)
PNANOVDB_FORCE_INLINE pnanovdb_bool_t pnanovdb_readaccessor_is_active(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, PNANOVDB_INOUT(pnanovdb_readaccessor_t) acc, PNANOVDB_IN(pnanovdb_coord_t) ijk)
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_leaf_onindex_get_last_offset(pnanovdb_buf_t buf, pnanovdb_leaf_handle_t leaf)
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_uint32_as_uint64_low(pnanovdb_uint32_t x)
PNANOVDB_FORCE_INLINE pnanovdb_bool_t pnanovdb_upper_is_active_and_cache(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_upper_handle_t upper, PNANOVDB_IN(pnanovdb_coord_t) ijk, PNANOVDB_INOUT(pnanovdb_readaccessor_t) acc)
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_leaf_onindex_get_value_index(pnanovdb_buf_t buf, pnanovdb_address_t value_address, PNANOVDB_IN(pnanovdb_coord_t) ijk)
std::string lower(string_view a)
Return an all-upper case version of a (locale-independent).
PNANOVDB_FORCE_INLINE void pnanovdb_write_uint32(pnanovdb_buf_t buf, pnanovdb_address_t address, pnanovdb_uint32_t value)
pnanovdb_coord_t bbox_max
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_lower_coord_to_offset(PNANOVDB_IN(pnanovdb_coord_t) ijk)
PNANOVDB_FORCE_INLINE short pnanovdb_read_half(pnanovdb_buf_t buf, pnanovdb_address_t address)
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_address_offset_product(pnanovdb_address_t address, pnanovdb_uint32_t byte_offset, pnanovdb_uint32_t multiplier)
PNANOVDB_FORCE_INLINE pnanovdb_bool_t pnanovdb_leaf_onindexmask_has_stats(pnanovdb_buf_t buf, pnanovdb_leaf_handle_t leaf)
PNANOVDB_FORCE_INLINE void pnanovdb_write_int32(pnanovdb_buf_t buf, pnanovdb_address_t address, pnanovdb_int32_t value)
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_gridblindmetadata_get_flags(pnanovdb_buf_t buf, pnanovdb_gridblindmetadata_handle_t p)
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_version_get_minor(pnanovdb_uint32_t version)
PNANOVDB_FORCE_INLINE float pnanovdb_leaf_fp_read_float(pnanovdb_buf_t buf, pnanovdb_address_t address, PNANOVDB_IN(pnanovdb_coord_t) ijk, pnanovdb_uint32_t value_log_bits)
pnanovdb_uint32_t upper_size
PNANOVDB_FORCE_INLINE double pnanovdb_grid_get_voxel_size(pnanovdb_buf_t buf, pnanovdb_grid_handle_t p, pnanovdb_uint32_t index)
#define PNANOVDB_MAP_OFF_MATD
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_address_offset64(pnanovdb_address_t address, pnanovdb_uint64_t byte_offset)
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_root_onindex_get_value_index(pnanovdb_buf_t buf, pnanovdb_address_t address, PNANOVDB_IN(pnanovdb_coord_t) ijk, pnanovdb_uint32_t level)
pnanovdb_uint32_t bbox_dif_and_flags
PNANOVDB_FORCE_INLINE void pnanovdb_map_set_vecd(pnanovdb_buf_t buf, pnanovdb_map_handle_t p, pnanovdb_uint32_t index, double vecd)
#define PNANOVDB_STATIC_CONST
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_gridblindmetadata_get_data_class(pnanovdb_buf_t buf, pnanovdb_gridblindmetadata_handle_t p)
struct pnanovdb_vec3_t pnanovdb_vec3_t
#define PNANOVDB_GRIDBLINDMETADATA_OFF_FLAGS
#define PNANOVDB_GRIDBLINDMETADATA_OFF_BYTE_OFFSET
PNANOVDB_FORCE_INLINE void pnanovdb_tree_set_node_offset_lower(pnanovdb_buf_t buf, pnanovdb_tree_handle_t p, pnanovdb_uint64_t node_offset_lower)
PNANOVDB_FORCE_INLINE void pnanovdb_map_set_taperf(pnanovdb_buf_t buf, pnanovdb_map_handle_t p, pnanovdb_uint32_t index, float taperf)
#define PNANOVDB_MAP_OFF_TAPERD
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_leaf_onindex_get_max_index(pnanovdb_buf_t buf, pnanovdb_address_t max_address)
#define PNANOVDB_STRUCT_TYPEDEF(X)
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_make_version(pnanovdb_uint32_t major, pnanovdb_uint32_t minor, pnanovdb_uint32_t patch_num)
PNANOVDB_FORCE_INLINE pnanovdb_int32_t pnanovdb_uint64_is_equal(pnanovdb_uint64_t a, pnanovdb_uint64_t b)
ImageBuf OIIO_API max(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_leaf_onindex_get_dev_index(pnanovdb_buf_t buf, pnanovdb_address_t dev_address)
PNANOVDB_FORCE_INLINE void pnanovdb_write_vec3(pnanovdb_buf_t buf, pnanovdb_address_t address, PNANOVDB_IN(pnanovdb_vec3_t) value)
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_address_offset(pnanovdb_address_t address, pnanovdb_uint32_t byte_offset)
PNANOVDB_FORCE_INLINE pnanovdb_vec3_t pnanovdb_vec3_add(const pnanovdb_vec3_t a, const pnanovdb_vec3_t b)
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_root_get_stddev_address(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_root_handle_t root)
PNANOVDB_FORCE_INLINE pnanovdb_bool_t pnanovdb_leaf_indexmask_get_mask_bit(pnanovdb_buf_t buf, pnanovdb_leaf_handle_t leaf, pnanovdb_uint32_t n)
PNANOVDB_FORCE_INLINE pnanovdb_gridblindmetadata_handle_t pnanovdb_grid_get_gridblindmetadata(pnanovdb_buf_t buf, pnanovdb_grid_handle_t grid, pnanovdb_uint32_t index)
PNANOVDB_FORCE_INLINE pnanovdb_vec3_t pnanovdb_coord_to_vec3(const pnanovdb_coord_t coord)
pnanovdb_uint32_t blind_metadata_count
PNANOVDB_FORCE_INLINE pnanovdb_int64_t pnanovdb_upper_get_table_child(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_upper_handle_t node, pnanovdb_uint32_t n)
#define PNANOVDB_GRIDBLINDMETADATA_OFF_ELEMENT_COUNT
pnanovdb_uint32_t child_mask[128]
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_uint64_high(pnanovdb_uint64_t v)
PNANOVDB_FORCE_INLINE pnanovdb_vec3_t pnanovdb_read_vec3(pnanovdb_buf_t buf, pnanovdb_address_t address)
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_root_get_value_address_and_cache(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_root_handle_t root, PNANOVDB_IN(pnanovdb_coord_t) ijk, PNANOVDB_INOUT(pnanovdb_readaccessor_t) acc)
#define PNANOVDB_GRID_OFF_MAGIC
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_leaf_pointindex_get_first(pnanovdb_buf_t buf, pnanovdb_leaf_handle_t leaf, pnanovdb_uint32_t i)
PNANOVDB_BUF_FORCE_INLINE void pnanovdb_buf_write_uint32(pnanovdb_buf_t buf, uint64_t byte_offset, uint32_t value)
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_lower_get_value_address_and_cache(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_lower_handle_t lower, PNANOVDB_IN(pnanovdb_coord_t) ijk, PNANOVDB_INOUT(pnanovdb_readaccessor_t) acc)
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_readaccessor_get_dim(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, PNANOVDB_INOUT(pnanovdb_readaccessor_t) acc, PNANOVDB_IN(pnanovdb_coord_t) ijk)
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_root_tile_get_state(pnanovdb_buf_t buf, pnanovdb_root_tile_handle_t p)
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_upper_get_flags(pnanovdb_buf_t buf, pnanovdb_upper_handle_t p)
PNANOVDB_FORCE_INLINE pnanovdb_coord_t pnanovdb_lower_get_bbox_min(pnanovdb_buf_t buf, pnanovdb_lower_handle_t p)
PNANOVDB_FORCE_INLINE void pnanovdb_upper_set_child_mask(pnanovdb_buf_t buf, pnanovdb_upper_handle_t p, pnanovdb_uint32_t bit_index, pnanovdb_bool_t value)
#define PNANOVDB_GRID_TYPE_ONINDEX
#define PNANOVDB_MAP_OFF_VECF
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_lower_get_dim_and_cache(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_lower_handle_t lower, PNANOVDB_IN(pnanovdb_coord_t) ijk, PNANOVDB_INOUT(pnanovdb_readaccessor_t) acc)
PNANOVDB_BUF_FORCE_INLINE pnanovdb_buf_t pnanovdb_make_buf(uint32_t *data, uint64_t size_in_words)
PNANOVDB_FORCE_INLINE void pnanovdb_grid_set_grid_count(pnanovdb_buf_t buf, pnanovdb_grid_handle_t p, pnanovdb_uint32_t grid_count)
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_leaf_pointindex_get_value(pnanovdb_buf_t buf, pnanovdb_leaf_handle_t leaf, pnanovdb_uint32_t i)
PNANOVDB_FORCE_INLINE void pnanovdb_grid_set_blind_metadata_offset(pnanovdb_buf_t buf, pnanovdb_grid_handle_t p, pnanovdb_uint64_t blind_metadata_offset)
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_leaf_indexmask_get_dev_index(pnanovdb_buf_t buf, pnanovdb_address_t dev_address)
PNANOVDB_FORCE_INLINE int pnanovdb_readaccessor_computedirty(PNANOVDB_INOUT(pnanovdb_readaccessor_t) acc, PNANOVDB_IN(pnanovdb_coord_t) ijk)
pnanovdb_uint32_t node_count_lower
PNANOVDB_FORCE_INLINE void pnanovdb_grid_set_world_bbox(pnanovdb_buf_t buf, pnanovdb_grid_handle_t p, pnanovdb_uint32_t index, double world_bbox)
PNANOVDB_FORCE_INLINE pnanovdb_vec3_t pnanovdb_grid_index_to_world_dirf(pnanovdb_buf_t buf, pnanovdb_grid_handle_t grid, PNANOVDB_IN(pnanovdb_vec3_t) src)
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_upper_get_stddev_address(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_upper_handle_t node)
PNANOVDB_FORCE_INLINE float pnanovdb_read_float(pnanovdb_buf_t buf, pnanovdb_address_t address)
PNANOVDB_FORCE_INLINE float pnanovdb_root_fpn_read_float(pnanovdb_buf_t buf, pnanovdb_address_t address, PNANOVDB_IN(pnanovdb_coord_t) ijk, pnanovdb_uint32_t level)
pnanovdb_uint32_t lower_off_min
#define PNANOVDB_GRID_OFF_GRID_SIZE
#define PNANOVDB_TREE_OFF_NODE_OFFSET_LEAF
#define PNANOVDB_LEAF_TABLE_NEG_OFF_BBOX_DIF_AND_FLAGS
#define PNANOVDB_GRID_OFF_GRID_TYPE
PNANOVDB_FORCE_INLINE pnanovdb_int64_t pnanovdb_grid_get_blind_metadata_offset(pnanovdb_buf_t buf, pnanovdb_grid_handle_t p)
struct pnanovdb_buf_t pnanovdb_buf_t
pnanovdb_uint32_t node_count_leaf
#define PNANOVDB_GRID_TYPE_END
#define PNANOVDB_TREE_OFF_TILE_COUNT_UPPER
PNANOVDB_FORCE_INLINE void pnanovdb_readaccessor_init(PNANOVDB_INOUT(pnanovdb_readaccessor_t) acc, pnanovdb_root_handle_t root)
pnanovdb_uint32_t root_off_ave
PNANOVDB_FORCE_INLINE pnanovdb_bool_t pnanovdb_leaf_indexmask_has_stats(pnanovdb_buf_t buf, pnanovdb_leaf_handle_t leaf)
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_root_get_dim_and_cache(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_root_handle_t root, PNANOVDB_IN(pnanovdb_coord_t) ijk, PNANOVDB_INOUT(pnanovdb_readaccessor_t) acc)
#define PNANOVDB_DEREF(X)
PNANOVDB_FORCE_INLINE float pnanovdb_uint32_as_float(pnanovdb_uint32_t v)
PNANOVDB_FORCE_INLINE pnanovdb_coord_t pnanovdb_leaf_get_bbox_min(pnanovdb_buf_t buf, pnanovdb_leaf_handle_t p)
#define PNANOVDB_ROOT_TILE_OFF_KEY
#define PNANOVDB_UPPER_OFF_VALUE_MASK
uint32_t pnanovdb_uint32_t
PNANOVDB_FORCE_INLINE float pnanovdb_int32_to_float(pnanovdb_int32_t v)
#define PNANOVDB_TREE_OFF_TILE_COUNT_LEAF
pnanovdb_uint32_t grid_name[256/4]
PNANOVDB_FORCE_INLINE void pnanovdb_grid_set_magic(pnanovdb_buf_t buf, pnanovdb_grid_handle_t p, pnanovdb_uint64_t magic)
#define PNANOVDB_LOWER_OFF_BBOX_MAX
PNANOVDB_FORCE_INLINE void pnanovdb_grid_set_version(pnanovdb_buf_t buf, pnanovdb_grid_handle_t p, pnanovdb_uint32_t version)
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_leaf_onindex_get_value_count(pnanovdb_buf_t buf, pnanovdb_leaf_handle_t leaf)
PNANOVDB_FORCE_INLINE float pnanovdb_map_get_taperf(pnanovdb_buf_t buf, pnanovdb_map_handle_t p, pnanovdb_uint32_t index)
PNANOVDB_FORCE_INLINE pnanovdb_int64_t pnanovdb_uint64_as_int64(pnanovdb_uint64_t v)
PNANOVDB_FORCE_INLINE pnanovdb_vec3_t pnanovdb_map_apply_jacobi(pnanovdb_buf_t buf, pnanovdb_map_handle_t map, PNANOVDB_IN(pnanovdb_vec3_t) src)
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_grid_get_grid_count(pnanovdb_buf_t buf, pnanovdb_grid_handle_t p)
#define PNANOVDB_TREE_OFF_NODE_COUNT_UPPER
#define PNANOVDB_GRID_OFF_GRID_COUNT
#define PNANOVDB_GRID_OFF_GRID_NAME
pnanovdb_uint32_t tile_count_lower
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_uint32_as_uint64(pnanovdb_uint32_t x, pnanovdb_uint32_t y)
PNANOVDB_FORCE_INLINE void pnanovdb_map_set_invmatf(pnanovdb_buf_t buf, pnanovdb_map_handle_t p, pnanovdb_uint32_t index, float invmatf)
PNANOVDB_FORCE_INLINE pnanovdb_coord_t pnanovdb_root_get_bbox_min(pnanovdb_buf_t buf, pnanovdb_root_handle_t p)
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_grid_get_grid_class(pnanovdb_buf_t buf, pnanovdb_grid_handle_t p)
PNANOVDB_FORCE_INLINE void pnanovdb_tree_set_voxel_count(pnanovdb_buf_t buf, pnanovdb_tree_handle_t p, pnanovdb_uint64_t voxel_count)
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_read_uint8(pnanovdb_buf_t buf, pnanovdb_address_t address)
#define PNANOVDB_ROOT_TILE_OFF_CHILD
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_root_tile_get_key(pnanovdb_buf_t buf, pnanovdb_root_tile_handle_t p)
pnanovdb_address_t address
#define PNANOVDB_GRID_OFF_WORLD_BBOX
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_lower_get_value_address(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_lower_handle_t lower, PNANOVDB_IN(pnanovdb_coord_t) ijk)
pnanovdb_uint64_t node_offset_upper
pnanovdb_coord_t bbox_min
pnanovdb_uint32_t table_size
pnanovdb_uint32_t leaf_off_max
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_leaf_indexmask_get_value_index(pnanovdb_buf_t buf, pnanovdb_address_t value_address, PNANOVDB_IN(pnanovdb_coord_t) ijk)
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_double_as_uint64(double v)
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_lower_get_value_address_and_level(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_lower_handle_t lower, PNANOVDB_IN(pnanovdb_coord_t) ijk, PNANOVDB_INOUT(pnanovdb_uint32_t) level)
PNANOVDB_FORCE_INLINE pnanovdb_vec3_t pnanovdb_map_apply_inverse(pnanovdb_buf_t buf, pnanovdb_map_handle_t map, PNANOVDB_IN(pnanovdb_vec3_t) src)
PNANOVDB_FORCE_INLINE pnanovdb_address_t pnanovdb_readaccessor_get_value_address_bit(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, PNANOVDB_INOUT(pnanovdb_readaccessor_t) acc, PNANOVDB_IN(pnanovdb_coord_t) ijk, PNANOVDB_INOUT(pnanovdb_uint32_t) bit_index)
pnanovdb_uint32_t root_tile_size
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_read_uint16(pnanovdb_buf_t buf, pnanovdb_address_t address)
PNANOVDB_FORCE_INLINE void pnanovdb_write_coord(pnanovdb_buf_t buf, pnanovdb_address_t address, PNANOVDB_IN(pnanovdb_coord_t) value)
PNANOVDB_FORCE_INLINE void pnanovdb_grid_set_grid_size(pnanovdb_buf_t buf, pnanovdb_grid_handle_t p, pnanovdb_uint64_t grid_size)
pnanovdb_uint64_t byte_offset
PNANOVDB_FORCE_INLINE void pnanovdb_grid_set_checksum(pnanovdb_buf_t buf, pnanovdb_grid_handle_t p, pnanovdb_uint64_t checksum)
PNANOVDB_FORCE_INLINE pnanovdb_root_tile_handle_t pnanovdb_root_get_tile(pnanovdb_grid_type_t grid_type, pnanovdb_root_handle_t root, pnanovdb_uint32_t n)
PNANOVDB_FORCE_INLINE pnanovdb_bool_t pnanovdb_readaccessor_iscached0(PNANOVDB_INOUT(pnanovdb_readaccessor_t) acc, int dirty)
pnanovdb_uint32_t value_stride_bits
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_tree_get_voxel_count(pnanovdb_buf_t buf, pnanovdb_tree_handle_t p)
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_upper_get_dim_and_cache(pnanovdb_grid_type_t grid_type, pnanovdb_buf_t buf, pnanovdb_upper_handle_t upper, PNANOVDB_IN(pnanovdb_coord_t) ijk, PNANOVDB_INOUT(pnanovdb_readaccessor_t) acc)
PNANOVDB_FORCE_INLINE pnanovdb_coord_t pnanovdb_coord_add(pnanovdb_coord_t a, pnanovdb_coord_t b)
PNANOVDB_FORCE_INLINE pnanovdb_uint32_t pnanovdb_int32_as_uint32(pnanovdb_int32_t v)
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_uint64_bit_mask(pnanovdb_uint32_t bit_idx)
PNANOVDB_FORCE_INLINE pnanovdb_vec3_t pnanovdb_grid_world_to_indexf(pnanovdb_buf_t buf, pnanovdb_grid_handle_t grid, PNANOVDB_IN(pnanovdb_vec3_t) src)
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_leaf_pointindex_get_last(pnanovdb_buf_t buf, pnanovdb_leaf_handle_t leaf, pnanovdb_uint32_t i)
PNANOVDB_FORCE_INLINE void pnanovdb_grid_set_voxel_size(pnanovdb_buf_t buf, pnanovdb_grid_handle_t p, pnanovdb_uint32_t index, double voxel_size)
PNANOVDB_FORCE_INLINE pnanovdb_uint64_t pnanovdb_leaf_indexmask_get_max_index(pnanovdb_buf_t buf, pnanovdb_address_t max_address)
#define PNANOVDB_MAP_OFF_MATF
PNANOVDB_FORCE_INLINE pnanovdb_vec3_t pnanovdb_vec3_max(const pnanovdb_vec3_t a, const pnanovdb_vec3_t b)