OpenVDB  10.0.1
Classes | Macros | Enumerations | Functions
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)   (-(x) & ((n)-1))
 
#define USE_SINGLE_ROOT_KEY
 
#define CNANOVDB_GLOBAL
 
#define RESTRICT   __restrict
 
#define ROOT_LEVEL   3
 
#define DEFINEMASK_int(LOG2DIM, SIZE)
 
#define DEFINEMASK(LOG2DIM)   DEFINEMASK_int(LOG2DIM, (1U << (3*LOG2DIM)))
 
#define INSTANTIATE(LOG2DIM)   DEFINEMASK(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)   CREATE_LEAF_NODE_int(LEVEL, LOG2DIM, (TOTAL-LOG2DIM), TOTAL, ((1u << TOTAL) - 1u), 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)   CREATE_INTERNAL_NODE_int(CHILDLEVEL, LEVEL, LOG2DIM, (TOTAL-LOG2DIM), TOTAL, ((1u << TOTAL) - 1u), VALUETYPE, STATSTYPE, SUFFIX)
 
#define DEFINE_KEY(KEY)   uint64_t 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_treedatacnanovdb_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_node0Fcnanovdb_tree_getNode0F (const cnanovdb_treedata *__restrict tree, uint64_t i)
 
static uint32_t cnanovdb_node1F_CoordToOffset (const cnanovdb_coord *__restrict ijk)
 
static const cnanovdb_node0Fcnanovdb_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_node1Fcnanovdb_tree_getNode1F (const cnanovdb_treedata *__restrict tree, uint64_t i)
 
static uint32_t cnanovdb_node2F_CoordToOffset (const cnanovdb_coord *__restrict ijk)
 
static const cnanovdb_node1Fcnanovdb_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_node2Fcnanovdb_tree_getNode2F (const cnanovdb_treedata *__restrict tree, uint64_t i)
 
static const cnanovdb_rootdataFcnanovdb_treedata_rootF (const cnanovdb_treedata *__restrict treedata)
 
static const cnanovdb_rootdata_tileFcnanovdb_rootdataF_getTile (const cnanovdb_rootdataF *__restrict rootdata, uint32_t n)
 
static const cnanovdb_node2Fcnanovdb_rootdataF_getChild (const cnanovdb_rootdataF *__restrict rootdata, const cnanovdb_rootdata_tileF *__restrict tile)
 
static const cnanovdb_rootdata_tileFcnanovdb_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_node0F3cnanovdb_tree_getNode0F3 (const cnanovdb_treedata *__restrict tree, uint64_t i)
 
static uint32_t cnanovdb_node1F3_CoordToOffset (const cnanovdb_coord *__restrict ijk)
 
static const cnanovdb_node0F3cnanovdb_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_node1F3cnanovdb_tree_getNode1F3 (const cnanovdb_treedata *__restrict tree, uint64_t i)
 
static uint32_t cnanovdb_node2F3_CoordToOffset (const cnanovdb_coord *__restrict ijk)
 
static const cnanovdb_node1F3cnanovdb_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_node2F3cnanovdb_tree_getNode2F3 (const cnanovdb_treedata *__restrict tree, uint64_t i)
 
static const cnanovdb_rootdataF3cnanovdb_treedata_rootF3 (const cnanovdb_treedata *__restrict treedata)
 
static const cnanovdb_rootdata_tileF3cnanovdb_rootdataF3_getTile (const cnanovdb_rootdataF3 *__restrict rootdata, uint32_t n)
 
static const cnanovdb_node2F3cnanovdb_rootdataF3_getChild (const cnanovdb_rootdataF3 *__restrict rootdata, const cnanovdb_rootdata_tileF3 *__restrict tile)
 
static const cnanovdb_rootdata_tileF3cnanovdb_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

#define CNANOVDB_ALIGNMENT_PADDING (   x,
 
)    (-(x) & ((n)-1))
#define CNANOVDB_DATA_ALIGNMENT   32
#define CNANOVDB_GLOBAL
#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); \
\
return cnanovdb_node0##SUFFIX##_getValue( ((CNANOVDB_GLOBAL cnanovdb_node0##SUFFIX *) acc->mNode[0]), ijk); \
return cnanovdb_node1##SUFFIX##_getValueAndCache( ((CNANOVDB_GLOBAL cnanovdb_node1##SUFFIX *) acc->mNode[1]), ijk, acc); \
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); \
\
return cnanovdb_node0##SUFFIX##_isActive( ((CNANOVDB_GLOBAL cnanovdb_node0##SUFFIX *) acc->mNode[0]), ijk); \
return cnanovdb_node1##SUFFIX##_isActiveAndCache( ((CNANOVDB_GLOBAL cnanovdb_node1##SUFFIX *) acc->mNode[1]), ijk, acc); \
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); \
} \
bool cnanovdb_readaccessor_isCached2(cnanovdb_readaccessor *__restrict acc, int32_t dirty)
Definition: CNanoVDB.h:630
Definition: CNanoVDB.h:95
int32_t cnanovdb_readaccessor_computeDirty(const cnanovdb_readaccessor *__restrict acc, const cnanovdb_coord *__restrict ijk)
Definition: CNanoVDB.h:633
#define CNANOVDB_GLOBAL
Definition: CNanoVDB.h:32
#define RESTRICT
Definition: CNanoVDB.h:33
Definition: CNanoVDB.h:285
bool cnanovdb_readaccessor_isCached0(cnanovdb_readaccessor *__restrict acc, int32_t dirty)
Definition: CNanoVDB.h:628
bool cnanovdb_readaccessor_isCached1(cnanovdb_readaccessor *__restrict acc, int32_t dirty)
Definition: CNanoVDB.h:629
#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) \
#define CREATE_TILEENTRY(VALUETYPE, SUFFIX)
Definition: CNanoVDB.h:277
#define CREATE_ROOTDATA(VALUETYPE, STATSTYPE, SUFFIX)
Definition: CNanoVDB.h:505
#define CREATE_ACCESSOR(VALUETYPE, SUFFIX)
Definition: CNanoVDB.h:640
#define CREATE_LEAF_NODE(LEVEL, LOG2DIM, TOTAL, VALUETYPE, STATSTYPE, SUFFIX)
Definition: CNanoVDB.h:367
#define CREATE_INTERNAL_NODE(CHILDLEVEL, LEVEL, LOG2DIM, TOTAL, VALUETYPE, STATSTYPE, SUFFIX)
Definition: CNanoVDB.h:457
#define CREATE_INTERNAL_NODE (   CHILDLEVEL,
  LEVEL,
  LOG2DIM,
  TOTAL,
  VALUETYPE,
  STATSTYPE,
  SUFFIX 
)    CREATE_INTERNAL_NODE_int(CHILDLEVEL, LEVEL, LOG2DIM, (TOTAL-LOG2DIM), TOTAL, ((1u << TOTAL) - 1u), VALUETYPE, STATSTYPE, SUFFIX)
#define CREATE_INTERNAL_NODE_int (   CHILDLEVEL,
  LEVEL,
  LOG2DIM,
  CHILDTOTAL,
  TOTAL,
  MASK,
  VALUETYPE,
  STATSTYPE,
  SUFFIX 
)
#define CREATE_LEAF_NODE (   LEVEL,
  LOG2DIM,
  TOTAL,
  VALUETYPE,
  STATSTYPE,
  SUFFIX 
)    CREATE_LEAF_NODE_int(LEVEL, LOG2DIM, (TOTAL-LOG2DIM), TOTAL, ((1u << TOTAL) - 1u), VALUETYPE, STATSTYPE, SUFFIX)
#define CREATE_LEAF_NODE_int (   LEVEL,
  LOG2DIM,
  CHILDTOTAL,
  TOTAL,
  MASK,
  VALUETYPE,
  STATSTYPE,
  SUFFIX 
)
#define CREATE_ROOTDATA (   VALUETYPE,
  STATSTYPE,
  SUFFIX 
)
#define CREATE_TILEENTRY (   VALUETYPE,
  SUFFIX 
)
Value:
typedef union \
{ \
VALUETYPE value; \
uint64_t child; \
} cnanovdb_tileentry##SUFFIX; \
ChildT * child
Definition: GridBuilder.h:1289
ValueT value
Definition: GridBuilder.h:1290
#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 RESTRICT
Definition: CNanoVDB.h:33
Definition: CNanoVDB.h:285
#define DEFINE_KEY (   KEY)    uint64_t KEY;
#define DEFINEMASK (   LOG2DIM)    DEFINEMASK_int(LOG2DIM, (1U << (3*LOG2DIM)))
#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))); } \
#define CNANOVDB_GLOBAL
Definition: CNanoVDB.h:32
#define RESTRICT
Definition: CNanoVDB.h:33
#define INSTANTIATE (   LOG2DIM)    DEFINEMASK(LOG2DIM)
#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; \
} \
#define CNANOVDB_GLOBAL
Definition: CNanoVDB.h:32
static uint64_t cnanovdb_coord_to_key(const cnanovdb_coord *__restrict ijk)
Definition: CNanoVDB.h:120
#define KEYSIZE   sizeof(uint64_t)
#define RESTRICT   __restrict
#define ROOT_LEVEL   3
#define USE_SINGLE_ROOT_KEY

Enumeration Type Documentation

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

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