|
__hostdev__ const char * | toStr (char *dst, Codec codec) |
|
__hostdev__ Codec | toCodec (const char *str) |
|
template<typename StreamT > |
void | writeUncompressedGrid (StreamT &os, const GridData *gridData, bool raw=false) |
| This is a standalone alternative to io::writeGrid(...,Codec::NONE) defined in util/IO.h Unlike the latter this function has no dependencies at all, not even NanoVDB.h, so it also works if client code only includes PNanoVDB.h! More...
|
|
template<typename GridHandleT , template< typename... > class VecT> |
void | writeUncompressedGrids (const char *fileName, const VecT< GridHandleT > &handles, bool raw=false) |
| write multiple NanoVDB grids to a single file, without compression. More...
|
|
template<typename GridHandleT , typename StreamT , template< typename... > class VecT> |
VecT< GridHandleT > | readUncompressedGrids (StreamT &is, const typename GridHandleT::BufferType &pool=typename GridHandleT::BufferType()) |
| read all uncompressed grids from a stream and return their handles. More...
|
|
template<typename GridHandleT , template< typename... > class VecT> |
VecT< GridHandleT > | readUncompressedGrids (const char *fileName, const typename GridHandleT::BufferType &buffer=typename GridHandleT::BufferType()) |
| Read a multiple un-compressed NanoVDB grids from a file and return them as a vector. More...
|
|
void nanovdb::io::writeUncompressedGrid |
( |
StreamT & |
os, |
|
|
const GridData * |
gridData, |
|
|
bool |
raw = false |
|
) |
| |
This is a standalone alternative to io::writeGrid(...,Codec::NONE) defined in util/IO.h Unlike the latter this function has no dependencies at all, not even NanoVDB.h, so it also works if client code only includes PNanoVDB.h!
Writes a raw NanoVDB buffer, possibly with multiple grids, to a stream WITHOUT compression. It follows all the conventions in util/IO.h so the stream can be read by all existing client code of NanoVDB.
- Note
- This method will always write uncompressed grids to the stream, i.e. Blosc or ZIP compression is never applied! This is a fundamental limitation and feature of this standalone function.
- Exceptions
-
std::invalid_argument | if buffer does not point to a valid NanoVDB grid. |
- Warning
- This is pretty ugly code that involves lots of pointer and bit manipulations - not for the faint of heart :)