Loading...
Searching...
No Matches
CNanoVDB.h File Reference

Go to the source code of this file.

## Classes

struct | cnanovdb_mask3
struct | cnanovdb_mask4
struct | cnanovdb_mask5
struct | cnanovdb_map
struct | cnanovdb_Vec3F
struct | cnanovdb_coord
struct | cnanovdb_gridblindmetadata
struct | cnanovdb_griddata
struct | cnanovdb_treedata
struct | cnanovdb_readaccessor
union | cnanovdb_tileentryF
struct | cnanovdb_node0F
struct | cnanovdb_node1F
struct | cnanovdb_node2F
struct | cnanovdb_rootdata_tileF
struct | cnanovdb_rootdataF
union | cnanovdb_tileentryF3
struct | cnanovdb_node0F3
struct | cnanovdb_node1F3
struct | cnanovdb_node2F3
struct | cnanovdb_rootdata_tileF3
struct | cnanovdb_rootdataF3

## Macros

#define | CNANOVDB_DATA_ALIGNMENT 32
#define | CNANOVDB_ALIGNMENT_PADDING(x, n)
#define | USE_SINGLE_ROOT_KEY
#define | CNANOVDB_GLOBAL
#define | RESTRICT __restrict
#define | ROOT_LEVEL 3
#define | DEFINEMASK_int(LOG2DIM, SIZE)
#define | DEFINEMASK(LOG2DIM)
#define | INSTANTIATE(LOG2DIM)
#define | CREATE_TILEENTRY(VALUETYPE, SUFFIX)
#define | CREATE_LEAF_NODE_int(LEVEL, LOG2DIM, CHILDTOTAL, TOTAL, MASK, VALUETYPE, STATSTYPE, SUFFIX)
#define | CREATE_LEAF_NODE(LEVEL, LOG2DIM, TOTAL, VALUETYPE, STATSTYPE, SUFFIX)
#define | CREATE_INTERNAL_NODE_int(CHILDLEVEL, LEVEL, LOG2DIM, CHILDTOTAL, TOTAL, MASK, VALUETYPE, STATSTYPE, SUFFIX)
#define | CREATE_INTERNAL_NODE(CHILDLEVEL, LEVEL, LOG2DIM, TOTAL, VALUETYPE, STATSTYPE, SUFFIX)
#define | DEFINE_KEY(KEY)
#define | KEYSIZE sizeof(uint64_t)
#define | KEYSEARCH(SUFFIX)
#define | CREATE_ROOTDATA(VALUETYPE, STATSTYPE, SUFFIX)
#define | DEFINE_ISCACHED(LEVEL, MASK)
#define | CREATE_ACCESSOR(VALUETYPE, SUFFIX)
#define | CREATE_GRIDTYPE(VALUETYPE, STATSTYPE, SUFFIX)

## Enumerations

enum | cnanovdb_GridType { cnanovdb_GridType_Unknown = 0 , cnanovdb_GridType_Float = 1 , cnanovdb_GridType_Double = 2 , cnanovdb_GridType_Int16 = 3 , cnanovdb_GridType_Int32 = 4 , cnanovdb_GridType_Int64 = 5 , cnanovdb_GridType_Vec3f = 6 , cnanovdb_GridType_Vec3d = 7 , cnanovdb_GridType_Mask = 8 , cnanovdb_GridType_FP16 = 9 , cnanovdb_GridType_End = 10 }

## Functions

static void | cnanovdb_mask3_clear (cnanovdb_mask3 *__restrict mask)
static bool | cnanovdb_mask3_isOn (const cnanovdb_mask3 *__restrict mask, uint32_t n)
static void | cnanovdb_mask4_clear (cnanovdb_mask4 *__restrict mask)
static bool | cnanovdb_mask4_isOn (const cnanovdb_mask4 *__restrict mask, uint32_t n)
static void | cnanovdb_mask5_clear (cnanovdb_mask5 *__restrict mask)
static bool | cnanovdb_mask5_isOn (const cnanovdb_mask5 *__restrict mask, uint32_t n)
static int | cnanovdb_coord_compare (const cnanovdb_coord *a, const cnanovdb_coord *b)
static uint64_t | cnanovdb_coord_to_key (const cnanovdb_coord *__restrict ijk)
static void | cnanovdb_map_apply (cnanovdb_Vec3F *dst, const cnanovdb_map *__restrict map, const cnanovdb_Vec3F *src)
static void | cnanovdb_map_applyInverse (cnanovdb_Vec3F *dst, const cnanovdb_map *__restrict map, const cnanovdb_Vec3F *src)
static void | cnanovdb_map_applyJacobi (cnanovdb_Vec3F *dst, const cnanovdb_map *__restrict map, const cnanovdb_Vec3F *src)
static void | cnanovdb_map_applyInverseJacobi (cnanovdb_Vec3F *dst, const cnanovdb_map *__restrict map, const cnanovdb_Vec3F *src)
static void | cnanovdb_map_applyIJT (cnanovdb_Vec3F *dst, const cnanovdb_map *__restrict map, const cnanovdb_Vec3F *src)
static void | cnanovdb_griddata_worldToIndex (cnanovdb_Vec3F *dst, const cnanovdb_griddata *__restrict grid, const cnanovdb_Vec3F *src)
static void | cnanovdb_griddata_indexToWorld (cnanovdb_Vec3F *dst, const cnanovdb_griddata *__restrict grid, const cnanovdb_Vec3F *src)
static void | cnanovdb_griddata_worldToIndexDir (cnanovdb_Vec3F *dst, const cnanovdb_griddata *__restrict grid, const cnanovdb_Vec3F *src)
static void | cnanovdb_griddata_indexToWorldDir (cnanovdb_Vec3F *dst, const cnanovdb_griddata *__restrict grid, const cnanovdb_Vec3F *src)
static void | cnanovdb_griddata_applyIJT (cnanovdb_Vec3F *dst, const cnanovdb_griddata *__restrict grid, const cnanovdb_Vec3F *src)
static const cnanovdb_treedata * | cnanovdb_griddata_tree (const cnanovdb_griddata *__restrict griddata)
static void | cnanovdb_readaccessor_insert (cnanovdb_readaccessor *__restrict acc, int childlevel, const void *__restrict node, const cnanovdb_coord *__restrict ijk)
void | cnanovdb_readaccessor_init (cnanovdb_readaccessor *__restrict acc, const void *__restrict rootdata)
bool | cnanovdb_readaccessor_isCached0 (cnanovdb_readaccessor *__restrict acc, int32_t dirty)
bool | cnanovdb_readaccessor_isCached1 (cnanovdb_readaccessor *__restrict acc, int32_t dirty)
bool | cnanovdb_readaccessor_isCached2 (cnanovdb_readaccessor *__restrict acc, int32_t dirty)
int32_t | cnanovdb_readaccessor_computeDirty (const cnanovdb_readaccessor *__restrict acc, const cnanovdb_coord *__restrict ijk)
static uint32_t | cnanovdb_node0F_CoordToOffset (const cnanovdb_coord *__restrict ijk)
static float | cnanovdb_node0F_getValue (const cnanovdb_node0F *__restrict node, const cnanovdb_coord *__restrict ijk)
static float | cnanovdb_node0F_getValueAndCache (const cnanovdb_node0F *__restrict node, const cnanovdb_coord *__restrict ijk, cnanovdb_readaccessor *__restrict acc)
static bool | cnanovdb_node0F_isActive (const cnanovdb_node0F *__restrict node, const cnanovdb_coord *__restrict ijk)
static bool | cnanovdb_node0F_isActiveAndCache (const cnanovdb_node0F *__restrict node, const cnanovdb_coord *__restrict ijk, cnanovdb_readaccessor *__restrict acc)
static const cnanovdb_node0F * | cnanovdb_tree_getNode0F (const cnanovdb_treedata *__restrict tree, uint64_t i)
static uint32_t | cnanovdb_node1F_CoordToOffset (const cnanovdb_coord *__restrict ijk)
static const cnanovdb_node0F * | cnanovdb_node1F_getChild (const cnanovdb_node1F *__restrict node, uint32_t n)
static float | cnanovdb_node1F_getValue (const cnanovdb_node1F *__restrict node, const cnanovdb_coord *__restrict ijk)
static float | cnanovdb_node1F_getValueAndCache (const cnanovdb_node1F *__restrict node, const cnanovdb_coord *__restrict ijk, cnanovdb_readaccessor *__restrict acc)
static bool | cnanovdb_node1F_isActive (const cnanovdb_node1F *__restrict node, const cnanovdb_coord *__restrict ijk)
static bool | cnanovdb_node1F_isActiveAndCache (const cnanovdb_node1F *__restrict node, const cnanovdb_coord *__restrict ijk, cnanovdb_readaccessor *__restrict acc)
static const cnanovdb_node1F * | cnanovdb_tree_getNode1F (const cnanovdb_treedata *__restrict tree, uint64_t i)
static uint32_t | cnanovdb_node2F_CoordToOffset (const cnanovdb_coord *__restrict ijk)
static const cnanovdb_node1F * | cnanovdb_node2F_getChild (const cnanovdb_node2F *__restrict node, uint32_t n)
static float | cnanovdb_node2F_getValue (const cnanovdb_node2F *__restrict node, const cnanovdb_coord *__restrict ijk)
static float | cnanovdb_node2F_getValueAndCache (const cnanovdb_node2F *__restrict node, const cnanovdb_coord *__restrict ijk, cnanovdb_readaccessor *__restrict acc)
static bool | cnanovdb_node2F_isActive (const cnanovdb_node2F *__restrict node, const cnanovdb_coord *__restrict ijk)
static bool | cnanovdb_node2F_isActiveAndCache (const cnanovdb_node2F *__restrict node, const cnanovdb_coord *__restrict ijk, cnanovdb_readaccessor *__restrict acc)
static const cnanovdb_node2F * | cnanovdb_tree_getNode2F (const cnanovdb_treedata *__restrict tree, uint64_t i)
static const cnanovdb_rootdataF * | cnanovdb_treedata_rootF (const cnanovdb_treedata *__restrict treedata)
static const cnanovdb_rootdata_tileF * | cnanovdb_rootdataF_getTile (const cnanovdb_rootdataF *__restrict rootdata, uint32_t n)
static const cnanovdb_node2F * | cnanovdb_rootdataF_getChild (const cnanovdb_rootdataF *__restrict rootdata, const cnanovdb_rootdata_tileF *__restrict tile)
static const cnanovdb_rootdata_tileF * | cnanovdb_rootdataF_findTile (const cnanovdb_rootdataF *__restrict rootdata, const cnanovdb_coord *__restrict ijk)
static float | cnanovdb_rootdataF_getValue (const cnanovdb_rootdataF *__restrict rootdata, const cnanovdb_coord *__restrict ijk)
static float | cnanovdb_rootdataF_getValueAndCache (const cnanovdb_rootdataF *__restrict rootdata, const cnanovdb_coord *__restrict ijk, cnanovdb_readaccessor *__restrict acc)
static bool | cnanovdb_rootdataF_isActive (const cnanovdb_rootdataF *__restrict rootdata, const cnanovdb_coord *__restrict ijk)
static bool | cnanovdb_rootdataF_isActiveAndCache (const cnanovdb_rootdataF *__restrict rootdata, const cnanovdb_coord *__restrict ijk, cnanovdb_readaccessor *__restrict acc)
float | cnanovdb_readaccessor_getValueF (cnanovdb_readaccessor *__restrict acc, const cnanovdb_coord *__restrict ijk)
bool | cnanovdb_readaccessor_isActiveF (cnanovdb_readaccessor *__restrict acc, const cnanovdb_coord *__restrict ijk)
static uint32_t | cnanovdb_node0F3_CoordToOffset (const cnanovdb_coord *__restrict ijk)
static cnanovdb_Vec3F | cnanovdb_node0F3_getValue (const cnanovdb_node0F3 *__restrict node, const cnanovdb_coord *__restrict ijk)
static cnanovdb_Vec3F | cnanovdb_node0F3_getValueAndCache (const cnanovdb_node0F3 *__restrict node, const cnanovdb_coord *__restrict ijk, cnanovdb_readaccessor *__restrict acc)
static bool | cnanovdb_node0F3_isActive (const cnanovdb_node0F3 *__restrict node, const cnanovdb_coord *__restrict ijk)
static bool | cnanovdb_node0F3_isActiveAndCache (const cnanovdb_node0F3 *__restrict node, const cnanovdb_coord *__restrict ijk, cnanovdb_readaccessor *__restrict acc)
static const cnanovdb_node0F3 * | cnanovdb_tree_getNode0F3 (const cnanovdb_treedata *__restrict tree, uint64_t i)
static uint32_t | cnanovdb_node1F3_CoordToOffset (const cnanovdb_coord *__restrict ijk)
static const cnanovdb_node0F3 * | cnanovdb_node1F3_getChild (const cnanovdb_node1F3 *__restrict node, uint32_t n)
static cnanovdb_Vec3F | cnanovdb_node1F3_getValue (const cnanovdb_node1F3 *__restrict node, const cnanovdb_coord *__restrict ijk)
static cnanovdb_Vec3F | cnanovdb_node1F3_getValueAndCache (const cnanovdb_node1F3 *__restrict node, const cnanovdb_coord *__restrict ijk, cnanovdb_readaccessor *__restrict acc)
static bool | cnanovdb_node1F3_isActive (const cnanovdb_node1F3 *__restrict node, const cnanovdb_coord *__restrict ijk)
static bool | cnanovdb_node1F3_isActiveAndCache (const cnanovdb_node1F3 *__restrict node, const cnanovdb_coord *__restrict ijk, cnanovdb_readaccessor *__restrict acc)
static const cnanovdb_node1F3 * | cnanovdb_tree_getNode1F3 (const cnanovdb_treedata *__restrict tree, uint64_t i)
static uint32_t | cnanovdb_node2F3_CoordToOffset (const cnanovdb_coord *__restrict ijk)
static const cnanovdb_node1F3 * | cnanovdb_node2F3_getChild (const cnanovdb_node2F3 *__restrict node, uint32_t n)
static cnanovdb_Vec3F | cnanovdb_node2F3_getValue (const cnanovdb_node2F3 *__restrict node, const cnanovdb_coord *__restrict ijk)
static cnanovdb_Vec3F | cnanovdb_node2F3_getValueAndCache (const cnanovdb_node2F3 *__restrict node, const cnanovdb_coord *__restrict ijk, cnanovdb_readaccessor *__restrict acc)
static bool | cnanovdb_node2F3_isActive (const cnanovdb_node2F3 *__restrict node, const cnanovdb_coord *__restrict ijk)
static bool | cnanovdb_node2F3_isActiveAndCache (const cnanovdb_node2F3 *__restrict node, const cnanovdb_coord *__restrict ijk, cnanovdb_readaccessor *__restrict acc)
static const cnanovdb_node2F3 * | cnanovdb_tree_getNode2F3 (const cnanovdb_treedata *__restrict tree, uint64_t i)
static const cnanovdb_rootdataF3 * | cnanovdb_treedata_rootF3 (const cnanovdb_treedata *__restrict treedata)
static const cnanovdb_rootdata_tileF3 * | cnanovdb_rootdataF3_getTile (const cnanovdb_rootdataF3 *__restrict rootdata, uint32_t n)
static const cnanovdb_node2F3 * | cnanovdb_rootdataF3_getChild (const cnanovdb_rootdataF3 *__restrict rootdata, const cnanovdb_rootdata_tileF3 *__restrict tile)
static const cnanovdb_rootdata_tileF3 * | cnanovdb_rootdataF3_findTile (const cnanovdb_rootdataF3 *__restrict rootdata, const cnanovdb_coord *__restrict ijk)
static cnanovdb_Vec3F | cnanovdb_rootdataF3_getValue (const cnanovdb_rootdataF3 *__restrict rootdata, const cnanovdb_coord *__restrict ijk)
static cnanovdb_Vec3F | cnanovdb_rootdataF3_getValueAndCache (const cnanovdb_rootdataF3 *__restrict rootdata, const cnanovdb_coord *__restrict ijk, cnanovdb_readaccessor *__restrict acc)
static bool | cnanovdb_rootdataF3_isActive (const cnanovdb_rootdataF3 *__restrict rootdata, const cnanovdb_coord *__restrict ijk)
static bool | cnanovdb_rootdataF3_isActiveAndCache (const cnanovdb_rootdataF3 *__restrict rootdata, const cnanovdb_coord *__restrict ijk, cnanovdb_readaccessor *__restrict acc)
cnanovdb_Vec3F | cnanovdb_readaccessor_getValueF3 (cnanovdb_readaccessor *__restrict acc, const cnanovdb_coord *__restrict ijk)
bool | cnanovdb_readaccessor_isActiveF3 (cnanovdb_readaccessor *__restrict acc, const cnanovdb_coord *__restrict ijk)
static int | cnanovdb_griddata_valid (const cnanovdb_griddata *__restrict grid)
static int | cnanovdb_griddata_validF (const cnanovdb_griddata *__restrict grid)
static int | cnanovdb_griddata_validF3 (const cnanovdb_griddata *__restrict grid)

## Macro Definition Documentation

## CNANOVDB_ALIGNMENT_PADDING

#define CNANOVDB_ALIGNMENT_PADDING | ( |  | x,
|  |  | n )

Value:
(-(x) & ((n)-1))

## CNANOVDB_DATA_ALIGNMENT

#define CNANOVDB_DATA_ALIGNMENT 32

## CNANOVDB_GLOBAL

#define CNANOVDB_GLOBAL

## CREATE_ACCESSOR

#define CREATE_ACCESSOR | ( |  | VALUETYPE,
|  |  | SUFFIX )

Value:
inline VALUETYPE \
cnanovdb_readaccessor_getValue##SUFFIX(cnanovdb_readaccessor *RESTRICT acc, const cnanovdb_coord *RESTRICT ijk) \
{ \
int32_t dirty = cnanovdb_readaccessor_computeDirty(acc, ijk); \
\
if (cnanovdb_readaccessor_isCached0(acc, dirty)) \
return cnanovdb_node0##SUFFIX##_getValue( ((CNANOVDB_GLOBAL cnanovdb_node0##SUFFIX *) acc->mNode[0]), ijk); \
if (cnanovdb_readaccessor_isCached1(acc, dirty)) \
return cnanovdb_node1##SUFFIX##_getValueAndCache( ((CNANOVDB_GLOBAL cnanovdb_node1##SUFFIX *) acc->mNode[1]), ijk, acc); \
if (cnanovdb_readaccessor_isCached2(acc, dirty)) \
return cnanovdb_node2##SUFFIX##_getValueAndCache( ((CNANOVDB_GLOBAL cnanovdb_node2##SUFFIX *) acc->mNode[2]), ijk, acc); \
\
return cnanovdb_rootdata##SUFFIX##_getValueAndCache( ((CNANOVDB_GLOBAL cnanovdb_rootdata##SUFFIX *)acc->mNode[3]), ijk, acc); \
} \
\
inline bool \
cnanovdb_readaccessor_isActive##SUFFIX(cnanovdb_readaccessor *RESTRICT acc, const cnanovdb_coord *RESTRICT ijk) \
{ \
int32_t dirty = cnanovdb_readaccessor_computeDirty(acc, ijk); \
\
if (cnanovdb_readaccessor_isCached0(acc, dirty)) \
return cnanovdb_node0##SUFFIX##_isActive( ((CNANOVDB_GLOBAL cnanovdb_node0##SUFFIX *) acc->mNode[0]), ijk); \
if (cnanovdb_readaccessor_isCached1(acc, dirty)) \
return cnanovdb_node1##SUFFIX##_isActiveAndCache( ((CNANOVDB_GLOBAL cnanovdb_node1##SUFFIX *) acc->mNode[1]), ijk, acc); \
if (cnanovdb_readaccessor_isCached2(acc, dirty)) \
return cnanovdb_node2##SUFFIX##_isActiveAndCache( ((CNANOVDB_GLOBAL cnanovdb_node2##SUFFIX *) acc->mNode[2]), ijk, acc); \
\
return cnanovdb_rootdata##SUFFIX##_isActiveAndCache( ((CNANOVDB_GLOBAL cnanovdb_rootdata##SUFFIX *)acc->mNode[3]), ijk, acc); \
} \
cnanovdb_readaccessor_computeDirty
int32_t cnanovdb_readaccessor_computeDirty(const cnanovdb_readaccessor *__restrict acc, const cnanovdb_coord *__restrict ijk)
Definition CNanoVDB.h:633
cnanovdb_readaccessor_isCached0
bool cnanovdb_readaccessor_isCached0(cnanovdb_readaccessor *__restrict acc, int32_t dirty)
Definition CNanoVDB.h:628
cnanovdb_readaccessor_isCached1
bool cnanovdb_readaccessor_isCached1(cnanovdb_readaccessor *__restrict acc, int32_t dirty)
Definition CNanoVDB.h:629
CNANOVDB_GLOBAL
#define CNANOVDB_GLOBAL
Definition CNanoVDB.h:32
RESTRICT
#define RESTRICT
Definition CNanoVDB.h:33
cnanovdb_readaccessor_isCached2
bool cnanovdb_readaccessor_isCached2(cnanovdb_readaccessor *__restrict acc, int32_t dirty)
Definition CNanoVDB.h:630
cnanovdb_coord
Definition CNanoVDB.h:96
cnanovdb_readaccessor
Definition CNanoVDB.h:286

## CREATE_GRIDTYPE

#define CREATE_GRIDTYPE | ( |  | VALUETYPE,
|  |  | STATSTYPE,
|  |  | SUFFIX )

Value:
CREATE_TILEENTRY(VALUETYPE, SUFFIX) \
CREATE_LEAF_NODE(0, 3, 3, VALUETYPE, STATSTYPE, SUFFIX) \
CREATE_INTERNAL_NODE(0, 1, 4, 7, VALUETYPE, STATSTYPE, SUFFIX) \
CREATE_INTERNAL_NODE(1, 2, 5, 12, VALUETYPE, STATSTYPE, SUFFIX) \
CREATE_ROOTDATA(VALUETYPE, STATSTYPE, SUFFIX) \
CREATE_ACCESSOR(VALUETYPE, SUFFIX) \
CREATE_TILEENTRY
#define CREATE_TILEENTRY(VALUETYPE, SUFFIX)
Definition CNanoVDB.h:277

## CREATE_INTERNAL_NODE

#define CREATE_INTERNAL_NODE | ( |  | CHILDLEVEL,
|  |  | LEVEL,
|  |  | LOG2DIM,
|  |  | TOTAL,
|  |  | VALUETYPE,
|  |  | STATSTYPE,
|  |  | SUFFIX )

Value:
CREATE_INTERNAL_NODE_int(CHILDLEVEL, LEVEL, LOG2DIM, (TOTAL-LOG2DIM), TOTAL, ((1u << TOTAL) - 1u), VALUETYPE, STATSTYPE, SUFFIX)
CREATE_INTERNAL_NODE_int
#define CREATE_INTERNAL_NODE_int(CHILDLEVEL, LEVEL, LOG2DIM, CHILDTOTAL, TOTAL, MASK, VALUETYPE, STATSTYPE, SUFFIX)
Definition CNanoVDB.h:370

## CREATE_INTERNAL_NODE_int

#define CREATE_INTERNAL_NODE_int | ( |  | CHILDLEVEL,
|  |  | LEVEL,
|  |  | LOG2DIM,
|  |  | CHILDTOTAL,
|  |  | TOTAL,
|  |  | MASK,
|  |  | VALUETYPE,
|  |  | STATSTYPE,
|  |  | SUFFIX )

## CREATE_LEAF_NODE

#define CREATE_LEAF_NODE | ( |  | LEVEL,
|  |  | LOG2DIM,
|  |  | TOTAL,
|  |  | VALUETYPE,
|  |  | STATSTYPE,
|  |  | SUFFIX )

Value:
CREATE_LEAF_NODE_int(LEVEL, LOG2DIM, (TOTAL-LOG2DIM), TOTAL, ((1u << TOTAL) - 1u), VALUETYPE, STATSTYPE, SUFFIX)
CREATE_LEAF_NODE_int
#define CREATE_LEAF_NODE_int(LEVEL, LOG2DIM, CHILDTOTAL, TOTAL, MASK, VALUETYPE, STATSTYPE, SUFFIX)
Definition CNanoVDB.h:301

## CREATE_LEAF_NODE_int

#define CREATE_LEAF_NODE_int | ( |  | LEVEL,
|  |  | LOG2DIM,
|  |  | CHILDTOTAL,
|  |  | TOTAL,
|  |  | MASK,
|  |  | VALUETYPE,
|  |  | STATSTYPE,
|  |  | SUFFIX )

## CREATE_ROOTDATA

#define CREATE_ROOTDATA | ( |  | VALUETYPE,
|  |  | STATSTYPE,
|  |  | SUFFIX )

## CREATE_TILEENTRY

#define CREATE_TILEENTRY | ( |  | VALUETYPE,
|  |  | SUFFIX )

Value:
typedef union \
{ \
VALUETYPE value; \
uint64_t child; \
} cnanovdb_tileentry##SUFFIX; \

## DEFINE_ISCACHED

#define DEFINE_ISCACHED | ( |  | LEVEL,
|  |  | MASK )

Value:
inline bool \
cnanovdb_readaccessor_isCached##LEVEL(cnanovdb_readaccessor *RESTRICT acc, int32_t dirty) \
{ \
if (!acc->mNode[LEVEL]) \
return false; \
if (dirty & ~MASK) \
{ \
acc->mNode[LEVEL] = 0; \
return false; \
} \
return true; \
} \

## DEFINE_KEY

#define DEFINE_KEY | ( |  | KEY | ) |

Value:
uint64_t KEY;

## DEFINEMASK

#define DEFINEMASK | ( |  | LOG2DIM | ) |

Value:
DEFINEMASK_int(LOG2DIM, (1U << (3*LOG2DIM)))
DEFINEMASK_int
#define DEFINEMASK_int(LOG2DIM, SIZE)
Definition CNanoVDB.h:55

## DEFINEMASK_int

#define DEFINEMASK_int | ( |  | LOG2DIM,
|  |  | SIZE )

Value:
typedef struct \
{ \
uint64_t mWords[SIZE >> 6]; \
} cnanovdb_mask##LOG2DIM; \
\
static void cnanovdb_mask##LOG2DIM##_clear(CNANOVDB_GLOBAL cnanovdb_mask##LOG2DIM *RESTRICT mask) \
{ for (uint32_t i = 0; i < (SIZE >> 6); i++) mask->mWords[i] = 0; } \
\
static bool cnanovdb_mask##LOG2DIM##_isOn(const CNANOVDB_GLOBAL cnanovdb_mask##LOG2DIM *RESTRICT mask, uint32_t n) \
{ return 0 != (mask->mWords[n >> 6] & (((uint64_t)(1)) << (n & 63))); } \

## INSTANTIATE

#define INSTANTIATE | ( |  | LOG2DIM | ) |

Value:
DEFINEMASK(LOG2DIM)
DEFINEMASK
#define DEFINEMASK(LOG2DIM)
Definition CNanoVDB.h:68

## KEYSEARCH

#define KEYSEARCH | ( |  | SUFFIX | ) |

Value:
uint64_t key; \
key = cnanovdb_coord_to_key(ijk); \
\
for (int i = low; i < high; i++) \
{ \
const CNANOVDB_GLOBAL cnanovdb_rootdata_tile##SUFFIX *tile = tiles + i; \
if (tile->key == key) \
return tile; \
} \
cnanovdb_coord_to_key
static uint64_t cnanovdb_coord_to_key(const cnanovdb_coord *__restrict ijk)
Definition CNanoVDB.h:120

## KEYSIZE

#define KEYSIZE sizeof(uint64_t)

## RESTRICT

#define RESTRICT __restrict

## ROOT_LEVEL

#define ROOT_LEVEL 3

## USE_SINGLE_ROOT_KEY

#define USE_SINGLE_ROOT_KEY

## Enumeration Type Documentation

## cnanovdb_GridType

enum cnanovdb_GridType

Enumerator
cnanovdb_GridType_Unknown |
cnanovdb_GridType_Float |
cnanovdb_GridType_Double |
cnanovdb_GridType_Int16 |
cnanovdb_GridType_Int32 |
cnanovdb_GridType_Int64 |
cnanovdb_GridType_Vec3f |
cnanovdb_GridType_Vec3d |
cnanovdb_GridType_Mask |
cnanovdb_GridType_FP16 |
cnanovdb_GridType_End |

## Function Documentation

## cnanovdb_coord_compare()

int cnanovdb_coord_compare | ( | const cnanovdb_coord * | a,
|  | const cnanovdb_coord * | b )

static

## cnanovdb_coord_to_key()

uint64_t cnanovdb_coord_to_key | ( | const cnanovdb_coord *__restrict | ijk | ) |

static

## cnanovdb_griddata_applyIJT()

void cnanovdb_griddata_applyIJT | ( | cnanovdb_Vec3F * | dst,
|  | const cnanovdb_griddata *__restrict | grid,
|  | const cnanovdb_Vec3F * | src )

static

## cnanovdb_griddata_indexToWorld()

void cnanovdb_griddata_indexToWorld | ( | cnanovdb_Vec3F * | dst,
|  | const cnanovdb_griddata *__restrict | grid,
|  | const cnanovdb_Vec3F * | src )

static

## cnanovdb_griddata_indexToWorldDir()

void cnanovdb_griddata_indexToWorldDir | ( | cnanovdb_Vec3F * | dst,
|  | const cnanovdb_griddata *__restrict | grid,
|  | const cnanovdb_Vec3F * | src )

static

## cnanovdb_griddata_tree()

const cnanovdb_treedata * cnanovdb_griddata_tree | ( | const cnanovdb_griddata *__restrict | griddata | ) |

static

## cnanovdb_griddata_valid()

int cnanovdb_griddata_valid | ( | const cnanovdb_griddata *__restrict | grid | ) |

static

## cnanovdb_griddata_validF()

int cnanovdb_griddata_validF | ( | const cnanovdb_griddata *__restrict | grid | ) |

static

## cnanovdb_griddata_validF3()

int cnanovdb_griddata_validF3 | ( | const cnanovdb_griddata *__restrict | grid | ) |

static

## cnanovdb_griddata_worldToIndex()

void cnanovdb_griddata_worldToIndex | ( | cnanovdb_Vec3F * | dst,
|  | const cnanovdb_griddata *__restrict | grid,
|  | const cnanovdb_Vec3F * | src )

static

## cnanovdb_griddata_worldToIndexDir()

void cnanovdb_griddata_worldToIndexDir | ( | cnanovdb_Vec3F * | dst,
|  | const cnanovdb_griddata *__restrict | grid,
|  | const cnanovdb_Vec3F * | src )

static

## cnanovdb_map_apply()

void cnanovdb_map_apply | ( | cnanovdb_Vec3F * | dst,
|  | const cnanovdb_map *__restrict | map,
|  | const cnanovdb_Vec3F * | src )

static

## cnanovdb_map_applyIJT()

void cnanovdb_map_applyIJT | ( | cnanovdb_Vec3F * | dst,
|  | const cnanovdb_map *__restrict | map,
|  | const cnanovdb_Vec3F * | src )

static

## cnanovdb_map_applyInverse()

void cnanovdb_map_applyInverse | ( | cnanovdb_Vec3F * | dst,
|  | const cnanovdb_map *__restrict | map,
|  | const cnanovdb_Vec3F * | src )

static

## cnanovdb_map_applyInverseJacobi()

void cnanovdb_map_applyInverseJacobi | ( | cnanovdb_Vec3F * | dst,
|  | const cnanovdb_map *__restrict | map,
|  | const cnanovdb_Vec3F * | src )

static

## cnanovdb_map_applyJacobi()

void cnanovdb_map_applyJacobi | ( | cnanovdb_Vec3F * | dst,
|  | const cnanovdb_map *__restrict | map,
|  | const cnanovdb_Vec3F * | src )

static

## cnanovdb_mask3_clear()

void cnanovdb_mask3_clear | ( | cnanovdb_mask3 *__restrict | mask | ) |

static

## cnanovdb_mask3_isOn()

bool cnanovdb_mask3_isOn | ( | const cnanovdb_mask3 *__restrict | mask,
|  | uint32_t | n )

static

## cnanovdb_mask4_clear()

void cnanovdb_mask4_clear | ( | cnanovdb_mask4 *__restrict | mask | ) |

static

## cnanovdb_mask4_isOn()

bool cnanovdb_mask4_isOn | ( | const cnanovdb_mask4 *__restrict | mask,
|  | uint32_t | n )

static

## cnanovdb_mask5_clear()

void cnanovdb_mask5_clear | ( | cnanovdb_mask5 *__restrict | mask | ) |

static

## cnanovdb_mask5_isOn()

bool cnanovdb_mask5_isOn | ( | const cnanovdb_mask5 *__restrict | mask,
|  | uint32_t | n )

static

## cnanovdb_node0F3_CoordToOffset()

uint32_t cnanovdb_node0F3_CoordToOffset | ( | const cnanovdb_coord *__restrict | ijk | ) |

static

## cnanovdb_node0F3_getValue()

cnanovdb_Vec3F cnanovdb_node0F3_getValue | ( | const cnanovdb_node0F3 *__restrict | node,
|  | const cnanovdb_coord *__restrict | ijk )

static

## cnanovdb_node0F3_getValueAndCache()

cnanovdb_Vec3F cnanovdb_node0F3_getValueAndCache | ( | const cnanovdb_node0F3 *__restrict | node,
|  | const cnanovdb_coord *__restrict | ijk,
|  | cnanovdb_readaccessor *__restrict | acc )

static

## cnanovdb_node0F3_isActive()

bool cnanovdb_node0F3_isActive | ( | const cnanovdb_node0F3 *__restrict | node,
|  | const cnanovdb_coord *__restrict | ijk )

static

## cnanovdb_node0F3_isActiveAndCache()

bool cnanovdb_node0F3_isActiveAndCache | ( | const cnanovdb_node0F3 *__restrict | node,
|  | const cnanovdb_coord *__restrict | ijk,
|  | cnanovdb_readaccessor *__restrict | acc )

static

## cnanovdb_node0F_CoordToOffset()

uint32_t cnanovdb_node0F_CoordToOffset | ( | const cnanovdb_coord *__restrict | ijk | ) |

static

## cnanovdb_node0F_getValue()

float cnanovdb_node0F_getValue | ( | const cnanovdb_node0F *__restrict | node,
|  | const cnanovdb_coord *__restrict | ijk )

static

## cnanovdb_node0F_getValueAndCache()

float cnanovdb_node0F_getValueAndCache | ( | const cnanovdb_node0F *__restrict | node,
|  | const cnanovdb_coord *__restrict | ijk,
|  | cnanovdb_readaccessor *__restrict | acc )

static

## cnanovdb_node0F_isActive()

bool cnanovdb_node0F_isActive | ( | const cnanovdb_node0F *__restrict | node,
|  | const cnanovdb_coord *__restrict | ijk )

static

## cnanovdb_node0F_isActiveAndCache()

bool cnanovdb_node0F_isActiveAndCache | ( | const cnanovdb_node0F *__restrict | node,
|  | const cnanovdb_coord *__restrict | ijk,
|  | cnanovdb_readaccessor *__restrict | acc )

static

## cnanovdb_node1F3_CoordToOffset()

uint32_t cnanovdb_node1F3_CoordToOffset | ( | const cnanovdb_coord *__restrict | ijk | ) |

static

## cnanovdb_node1F3_getChild()

const cnanovdb_node0F3 * cnanovdb_node1F3_getChild | ( | const cnanovdb_node1F3 *__restrict | node,
|  | uint32_t | n )

static

## cnanovdb_node1F3_getValue()

cnanovdb_Vec3F cnanovdb_node1F3_getValue | ( | const cnanovdb_node1F3 *__restrict | node,
|  | const cnanovdb_coord *__restrict | ijk )

static

## cnanovdb_node1F3_getValueAndCache()

cnanovdb_Vec3F cnanovdb_node1F3_getValueAndCache | ( | const cnanovdb_node1F3 *__restrict | node,
|  | const cnanovdb_coord *__restrict | ijk,
|  | cnanovdb_readaccessor *__restrict | acc )

static

## cnanovdb_node1F3_isActive()

bool cnanovdb_node1F3_isActive | ( | const cnanovdb_node1F3 *__restrict | node,
|  | const cnanovdb_coord *__restrict | ijk )

static

## cnanovdb_node1F3_isActiveAndCache()

bool cnanovdb_node1F3_isActiveAndCache | ( | const cnanovdb_node1F3 *__restrict | node,
|  | const cnanovdb_coord *__restrict | ijk,
|  | cnanovdb_readaccessor *__restrict | acc )

static

## cnanovdb_node1F_CoordToOffset()

uint32_t cnanovdb_node1F_CoordToOffset | ( | const cnanovdb_coord *__restrict | ijk | ) |

static

## cnanovdb_node1F_getChild()

const cnanovdb_node0F * cnanovdb_node1F_getChild | ( | const cnanovdb_node1F *__restrict | node,
|  | uint32_t | n )

static

## cnanovdb_node1F_getValue()

float cnanovdb_node1F_getValue | ( | const cnanovdb_node1F *__restrict | node,
|  | const cnanovdb_coord *__restrict | ijk )

static

## cnanovdb_node1F_getValueAndCache()

float cnanovdb_node1F_getValueAndCache | ( | const cnanovdb_node1F *__restrict | node,
|  | const cnanovdb_coord *__restrict | ijk,
|  | cnanovdb_readaccessor *__restrict | acc )

static

## cnanovdb_node1F_isActive()

bool cnanovdb_node1F_isActive | ( | const cnanovdb_node1F *__restrict | node,
|  | const cnanovdb_coord *__restrict | ijk )

static

## cnanovdb_node1F_isActiveAndCache()

bool cnanovdb_node1F_isActiveAndCache | ( | const cnanovdb_node1F *__restrict | node,
|  | const cnanovdb_coord *__restrict | ijk,
|  | cnanovdb_readaccessor *__restrict | acc )

static

## cnanovdb_node2F3_CoordToOffset()

uint32_t cnanovdb_node2F3_CoordToOffset | ( | const cnanovdb_coord *__restrict | ijk | ) |

static

## cnanovdb_node2F3_getChild()

const cnanovdb_node1F3 * cnanovdb_node2F3_getChild | ( | const cnanovdb_node2F3 *__restrict | node,
|  | uint32_t | n )

static

## cnanovdb_node2F3_getValue()

cnanovdb_Vec3F cnanovdb_node2F3_getValue | ( | const cnanovdb_node2F3 *__restrict | node,
|  | const cnanovdb_coord *__restrict | ijk )

static

## cnanovdb_node2F3_getValueAndCache()

cnanovdb_Vec3F cnanovdb_node2F3_getValueAndCache | ( | const cnanovdb_node2F3 *__restrict | node,
|  | const cnanovdb_coord *__restrict | ijk,
|  | cnanovdb_readaccessor *__restrict | acc )

static

## cnanovdb_node2F3_isActive()

bool cnanovdb_node2F3_isActive | ( | const cnanovdb_node2F3 *__restrict | node,
|  | const cnanovdb_coord *__restrict | ijk )

static

## cnanovdb_node2F3_isActiveAndCache()

bool cnanovdb_node2F3_isActiveAndCache | ( | const cnanovdb_node2F3 *__restrict | node,
|  | const cnanovdb_coord *__restrict | ijk,
|  | cnanovdb_readaccessor *__restrict | acc )

static

## cnanovdb_node2F_CoordToOffset()

uint32_t cnanovdb_node2F_CoordToOffset | ( | const cnanovdb_coord *__restrict | ijk | ) |

static

## cnanovdb_node2F_getChild()

const cnanovdb_node1F * cnanovdb_node2F_getChild | ( | const cnanovdb_node2F *__restrict | node,
|  | uint32_t | n )

static

## cnanovdb_node2F_getValue()

float cnanovdb_node2F_getValue | ( | const cnanovdb_node2F *__restrict | node,
|  | const cnanovdb_coord *__restrict | ijk )

static

## cnanovdb_node2F_getValueAndCache()

float cnanovdb_node2F_getValueAndCache | ( | const cnanovdb_node2F *__restrict | node,
|  | const cnanovdb_coord *__restrict | ijk,
|  | cnanovdb_readaccessor *__restrict | acc )

static

## cnanovdb_node2F_isActive()

bool cnanovdb_node2F_isActive | ( | const cnanovdb_node2F *__restrict | node,
|  | const cnanovdb_coord *__restrict | ijk )

static

## cnanovdb_node2F_isActiveAndCache()

bool cnanovdb_node2F_isActiveAndCache | ( | const cnanovdb_node2F *__restrict | node,
|  | const cnanovdb_coord *__restrict | ijk,
|  | cnanovdb_readaccessor *__restrict | acc )

static

## cnanovdb_readaccessor_computeDirty()

int32_t cnanovdb_readaccessor_computeDirty | ( | const cnanovdb_readaccessor *__restrict | acc,
|  | const cnanovdb_coord *__restrict | ijk )

inline

## cnanovdb_readaccessor_getValueF()

float cnanovdb_readaccessor_getValueF | ( | cnanovdb_readaccessor *__restrict | acc,
|  | const cnanovdb_coord *__restrict | ijk )

inline

## cnanovdb_readaccessor_getValueF3()

cnanovdb_Vec3F cnanovdb_readaccessor_getValueF3 | ( | cnanovdb_readaccessor *__restrict | acc,
|  | const cnanovdb_coord *__restrict | ijk )

inline

## cnanovdb_readaccessor_init()

void cnanovdb_readaccessor_init | ( | cnanovdb_readaccessor *__restrict | acc,
|  | const void *__restrict | rootdata )

inline

## cnanovdb_readaccessor_insert()

void cnanovdb_readaccessor_insert | ( | cnanovdb_readaccessor *__restrict | acc,
|  | int | childlevel,
|  | const void *__restrict | node,
|  | const cnanovdb_coord *__restrict | ijk )

static

## cnanovdb_readaccessor_isActiveF()

bool cnanovdb_readaccessor_isActiveF | ( | cnanovdb_readaccessor *__restrict | acc,
|  | const cnanovdb_coord *__restrict | ijk )

inline

## cnanovdb_readaccessor_isActiveF3()

bool cnanovdb_readaccessor_isActiveF3 | ( | cnanovdb_readaccessor *__restrict | acc,
|  | const cnanovdb_coord *__restrict | ijk )

inline

## cnanovdb_readaccessor_isCached0()

bool cnanovdb_readaccessor_isCached0 | ( | cnanovdb_readaccessor *__restrict | acc,
|  | int32_t | dirty )

inline

## cnanovdb_readaccessor_isCached1()

bool cnanovdb_readaccessor_isCached1 | ( | cnanovdb_readaccessor *__restrict | acc,
|  | int32_t | dirty )

inline

## cnanovdb_readaccessor_isCached2()

bool cnanovdb_readaccessor_isCached2 | ( | cnanovdb_readaccessor *__restrict | acc,
|  | int32_t | dirty )

inline

## cnanovdb_rootdataF3_findTile()

const cnanovdb_rootdata_tileF3 * cnanovdb_rootdataF3_findTile | ( | const cnanovdb_rootdataF3 *__restrict | rootdata,
|  | const cnanovdb_coord *__restrict | ijk )

static

## cnanovdb_rootdataF3_getChild()

const cnanovdb_node2F3 * cnanovdb_rootdataF3_getChild | ( | const cnanovdb_rootdataF3 *__restrict | rootdata,
|  | const cnanovdb_rootdata_tileF3 *__restrict | tile )

static

## cnanovdb_rootdataF3_getTile()

const cnanovdb_rootdata_tileF3 * cnanovdb_rootdataF3_getTile | ( | const cnanovdb_rootdataF3 *__restrict | rootdata,
|  | uint32_t | n )

static

## cnanovdb_rootdataF3_getValue()

cnanovdb_Vec3F cnanovdb_rootdataF3_getValue | ( | const cnanovdb_rootdataF3 *__restrict | rootdata,
|  | const cnanovdb_coord *__restrict | ijk )

static

## cnanovdb_rootdataF3_getValueAndCache()

cnanovdb_Vec3F cnanovdb_rootdataF3_getValueAndCache | ( | const cnanovdb_rootdataF3 *__restrict | rootdata,
|  | const cnanovdb_coord *__restrict | ijk,
|  | cnanovdb_readaccessor *__restrict | acc )

static

## cnanovdb_rootdataF3_isActive()

bool cnanovdb_rootdataF3_isActive | ( | const cnanovdb_rootdataF3 *__restrict | rootdata,
|  | const cnanovdb_coord *__restrict | ijk )

static

## cnanovdb_rootdataF3_isActiveAndCache()

bool cnanovdb_rootdataF3_isActiveAndCache | ( | const cnanovdb_rootdataF3 *__restrict | rootdata,
|  | const cnanovdb_coord *__restrict | ijk,
|  | cnanovdb_readaccessor *__restrict | acc )

static

## cnanovdb_rootdataF_findTile()

const cnanovdb_rootdata_tileF * cnanovdb_rootdataF_findTile | ( | const cnanovdb_rootdataF *__restrict | rootdata,
|  | const cnanovdb_coord *__restrict | ijk )

static

## cnanovdb_rootdataF_getChild()

const cnanovdb_node2F * cnanovdb_rootdataF_getChild | ( | const cnanovdb_rootdataF *__restrict | rootdata,
|  | const cnanovdb_rootdata_tileF *__restrict | tile )

static

## cnanovdb_rootdataF_getTile()

const cnanovdb_rootdata_tileF * cnanovdb_rootdataF_getTile | ( | const cnanovdb_rootdataF *__restrict | rootdata,
|  | uint32_t | n )

static

## cnanovdb_rootdataF_getValue()

float cnanovdb_rootdataF_getValue | ( | const cnanovdb_rootdataF *__restrict | rootdata,
|  | const cnanovdb_coord *__restrict | ijk )

static

## cnanovdb_rootdataF_getValueAndCache()

float cnanovdb_rootdataF_getValueAndCache | ( | const cnanovdb_rootdataF *__restrict | rootdata,
|  | const cnanovdb_coord *__restrict | ijk,
|  | cnanovdb_readaccessor *__restrict | acc )

static

## cnanovdb_rootdataF_isActive()

bool cnanovdb_rootdataF_isActive | ( | const cnanovdb_rootdataF *__restrict | rootdata,
|  | const cnanovdb_coord *__restrict | ijk )

static

## cnanovdb_rootdataF_isActiveAndCache()

bool cnanovdb_rootdataF_isActiveAndCache | ( | const cnanovdb_rootdataF *__restrict | rootdata,
|  | const cnanovdb_coord *__restrict | ijk,
|  | cnanovdb_readaccessor *__restrict | acc )

static

## cnanovdb_tree_getNode0F()

const cnanovdb_node0F * cnanovdb_tree_getNode0F | ( | const cnanovdb_treedata *__restrict | tree,
|  | uint64_t | i )

static

## cnanovdb_tree_getNode0F3()

const cnanovdb_node0F3 * cnanovdb_tree_getNode0F3 | ( | const cnanovdb_treedata *__restrict | tree,
|  | uint64_t | i )

static

## cnanovdb_tree_getNode1F()

const cnanovdb_node1F * cnanovdb_tree_getNode1F | ( | const cnanovdb_treedata *__restrict | tree,
|  | uint64_t | i )

static

## cnanovdb_tree_getNode1F3()

const cnanovdb_node1F3 * cnanovdb_tree_getNode1F3 | ( | const cnanovdb_treedata *__restrict | tree,
|  | uint64_t | i )

static

## cnanovdb_tree_getNode2F()

const cnanovdb_node2F * cnanovdb_tree_getNode2F | ( | const cnanovdb_treedata *__restrict | tree,
|  | uint64_t | i )

static

## cnanovdb_tree_getNode2F3()

const cnanovdb_node2F3 * cnanovdb_tree_getNode2F3 | ( | const cnanovdb_treedata *__restrict | tree,
|  | uint64_t | i )

static

## cnanovdb_treedata_rootF()

const cnanovdb_rootdataF * cnanovdb_treedata_rootF | ( | const cnanovdb_treedata *__restrict | treedata | ) |

static

## cnanovdb_treedata_rootF3()

const cnanovdb_rootdataF3 * cnanovdb_treedata_rootF3 | ( | const cnanovdb_treedata *__restrict | treedata | ) |

static