#include <nanovdb/util/CreateNanoGrid.h>
Public Types | |
using | SrcNodeAccT |
using | SrcBuildT |
using | SrcValueT |
using | SrcTreeT |
using | SrcRootT |
using | SrcNodeT |
Public Member Functions | |
BlindMetaData (const std::string &name, const std::string &type, GridBlindDataClass dataClass, size_t i, size_t valueCount, size_t valueSize) | |
BlindMetaData (const std::string &name, GridBlindDataSemantic dataSemantic, GridBlindDataClass dataClass, GridType dataType, size_t i, size_t valueCount, size_t valueSize) | |
~BlindMetaData () | |
bool | operator< (const BlindMetaData &other) const |
CreateNanoGrid (const SrcGridT &srcGrid) | |
Constructor from a source grid. | |
CreateNanoGrid (const SrcNodeAccT &srcNodeAcc) | |
Constructor from a source node accessor (defined above) | |
void | setVerbose (int mode=1) |
Set the level of verbosity. | |
void | enableDithering (bool on=true) |
Enable or disable dithering, i.e. randomization of the quantization error. | |
void | setStats (StatsMode mode=StatsMode::Default) |
Set the mode used for computing statistics of the destination grid. | |
void | setChecksum (ChecksumMode mode=ChecksumMode::Default) |
Set the mode used for computing checksums of the destination grid. | |
disable_if< is_same< DstBuildT, FpN >::value||BuildTraits< DstBuildT >::is_index, GridHandle< BufferT > >::type | getHandle (const BufferT &buffer=BufferT()) |
Converts the source grid into a nanovdb grid with the specified destination build type. | |
enable_if< is_same< DstBuildT, FpN >::value, GridHandle< BufferT > >::type | getHandle (const OracleT &oracle=OracleT(), const BufferT &buffer=BufferT()) |
Converts the source grid into a nanovdb grid with variable bit quantization. | |
enable_if< BuildTraits< DstBuildT >::is_index, GridHandle< BufferT > >::type | getHandle (uint32_t channels=0u, bool includeStats=true, bool includeTiles=true, const BufferT &buffer=BufferT()) |
Converts the source grid into a nanovdb grid with indices to external arrays of values. | |
uint64_t | addBlindData (const std::string &name, GridBlindDataSemantic dataSemantic, GridBlindDataClass dataClass, GridType dataType, size_t count, size_t size) |
Add blind data to the destination grid. | |
uint64_t | valueCount () const |
This method only has affect when getHandle was called with DstBuildT = ValueIndex or ValueOnIndex. | |
enable_if< BuildTraits< DstBuildT >::is_index >::type | copyValues (SrcValueT *buffer) |
Copy values from the source grid into a provided buffer. | |
Static Public Member Functions | |
static GridType | mapToType (const std::string &name) |
static GridBlindDataSemantic | mapToSemantics (const std::string &name) |
Public Attributes | |
GridBlindMetaData * | metaData |
const size_t | order |
const size_t | size |
using SrcBuildT |
using SrcNodeAccT |
using SrcNodeT |
using SrcRootT |
using SrcTreeT |
using SrcValueT |
|
inline |
|
inline |
|
inline |
|
inline |
Add blind data to the destination grid.
name | String name of the blind data |
dataSemantic | Semantics of the blind data |
dataClass | Class of the blind data |
dataType | Type of the blind data |
count | Element count of the blind data |
size | Size of each element of the blind data |
enable_if< BuildTraits< DstBuildT >::is_index >::type copyValues | ( | SrcValueT * | buffer | ) |
Copy values from the source grid into a provided buffer.
DstBuildT | Must be ValueIndex or ValueOnIndex, i.e. a index grid |
buffer | point in which to write values |
CreateNanoGrid | ( | const SrcGridT & | srcGrid | ) |
Constructor from a source grid.
srcGrid | Source grid of type SrcGridT |
CreateNanoGrid | ( | const SrcNodeAccT & | srcNodeAcc | ) |
Constructor from a source node accessor (defined above)
srcNodeAcc | Source node accessor of type SrcNodeAccT |
|
inline |
disable_if< is_same< DstBuildT, FpN >::value||BuildTraits< DstBuildT >::is_index, GridHandle< BufferT > >::type getHandle | ( | const BufferT & | buffer = BufferT() | ) |
Converts the source grid into a nanovdb grid with the specified destination build type.
DstBuildT | build type of the destination, output, grid |
BufferT | Type of the buffer used for allocating the destination grid |
buffer | instance of the buffer use for allocation |
enable_if< is_same< DstBuildT, FpN >::value, GridHandle< BufferT > >::type getHandle | ( | const OracleT & | oracle = OracleT(), |
const BufferT & | buffer = BufferT() ) |
Converts the source grid into a nanovdb grid with variable bit quantization.
DstBuildT | FpN, i.e. the destination grid uses variable bit quantization |
OracleT | Type of oracle used to determine the N in FpN |
BufferT | Type of the buffer used for allocating the destination grid |
oracle | Instance of the oracle used to determine the N in FpN |
buffer | instance of the buffer use for allocation |
enable_if< BuildTraits< DstBuildT >::is_index, GridHandle< BufferT > >::type getHandle | ( | uint32_t | channels = 0u, |
bool | includeStats = true, | ||
bool | includeTiles = true, | ||
const BufferT & | buffer = BufferT() ) |
Converts the source grid into a nanovdb grid with indices to external arrays of values.
DstBuildT | ValueIndex or ValueOnIndex, i.e. index all or just active values |
BufferT | Type of the buffer used for allocating the destination grid |
channels | Number of copies of values encoded as blind data in the destination grid |
includeStats | Specify if statics should be indexed |
includeTiles | Specify if tile values, i.e. non-leaf-node-values, should be indexed |
buffer | instance of the buffer use for allocation |
|
inlinestatic |
|
inlinestatic |
|
inline |
|
inline |
Set the mode used for computing checksums of the destination grid.
mode | specify the mode of checksum |
|
inline |
Set the mode used for computing statistics of the destination grid.
mode | specify the mode of statistics |
|
inline |
Set the level of verbosity.
mode | level of verbosity, mode=0 means quiet |
|
inline |
This method only has affect when getHandle was called with DstBuildT = ValueIndex or ValueOnIndex.
GridBlindMetaData* metaData |
const size_t order |
const size_t size |