OpenVDB  10.0.1
Classes | Public Member Functions | List of all members
OpenToNanoVDB< OpenBuildT, NanoBuildT, OracleT, BufferT > Class Template Reference

This class will convert an OpenVDB grid into a NanoVDB grid managed by a GridHandle. More...

#include <nanovdb/util/OpenToNanoVDB.h>

Classes

struct  BlindMetaData
 

Public Member Functions

 OpenToNanoVDB ()
 Default c-tor. More...
 
OracleT & oracle ()
 return a reference to the compression oracle More...
 
void setVerbose (int mode=1)
 
void enableDithering (bool on=true)
 
void setStats (StatsMode mode=StatsMode::Default)
 
void setChecksum (ChecksumMode mode=ChecksumMode::Default)
 
GridHandle< BufferT > operator() (const OpenGridT &grid, const BufferT &allocator=BufferT())
 Return a shared pointer to a NanoVDB grid handle constructed from the specified OpenVDB grid. More...
 
GridHandle< BufferT > operator() (const OpenGridT &grid, StatsMode sMode, ChecksumMode cMode, int verbose, const BufferT &allocator=BufferT())
 
template<typename OpenNodeT >
void processNodes (std::vector< NodePair< OpenNodeT >> &openNodes)
 

Detailed Description

template<typename OpenBuildT, typename NanoBuildT, typename OracleT = AbsDiff, typename BufferT = HostBuffer>
class nanovdb::OpenToNanoVDB< OpenBuildT, NanoBuildT, OracleT, BufferT >

This class will convert an OpenVDB grid into a NanoVDB grid managed by a GridHandle.

Note
Note that this converter assumes a 5,4,3 tree configuration of BOTH the OpenVDB and NanoVDB grids. This is a consequence of the fact that the OpenVDB tree is defined in OpenGridType and that all NanoVDB trees are by design always 5,4,3!

While NanoVDB allows root, internal and leaf nodes to reside anywhere in the memory buffer this conversion tool uses the following memory layout:

Grid | Tree Root... Node2... Node1... Leaf... BlindMetaData... BlindData... where "..." means size may vary and "|" means "no gap"

Constructor & Destructor Documentation

Default c-tor.

Member Function Documentation

void enableDithering ( bool  on = true)
inline
GridHandle< BufferT > operator() ( const OpenGridT &  grid,
const BufferT &  allocator = BufferT() 
)
inline

Return a shared pointer to a NanoVDB grid handle constructed from the specified OpenVDB grid.

GridHandle< BufferT > operator() ( const OpenGridT &  grid,
StatsMode  sMode,
ChecksumMode  cMode,
int  verbose,
const BufferT &  allocator = BufferT() 
)
inline
OracleT& oracle ( )
inline

return a reference to the compression oracle

Note
Note, the oracle is only used when NanoBuildT = nanovdb::FpN!
void processNodes ( std::vector< NodePair< OpenNodeT >> &  openNodes)
void setChecksum ( ChecksumMode  mode = ChecksumMode::Default)
inline
void setStats ( StatsMode  mode = StatsMode::Default)
inline
void setVerbose ( int  mode = 1)
inline