|
OpenVDB 11.0.0
|
Creates any nanovdb Grid from any source grid (certain combinations are obviously not allowed) More...
#include <nanovdb/util/CreateNanoGrid.h>
Classes | |
| struct | BlindMetaData |
Public Types | |
| using | SrcNodeAccT = NodeAccessor< SrcGridT > |
| using | SrcBuildT = typename SrcNodeAccT::BuildType |
| using | SrcValueT = typename SrcNodeAccT::ValueType |
| using | SrcTreeT = typename SrcNodeAccT::TreeType |
| using | SrcRootT = typename SrcNodeAccT::RootType |
| template<int LEVEL> | |
| using | SrcNodeT = typename NodeTrait< SrcRootT, LEVEL >::type |
Public Member Functions | |
| 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. | |
| template<typename DstBuildT = typename MapToNano<SrcBuildT>::type, typename BufferT = HostBuffer> | |
| 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. | |
| template<typename DstBuildT = typename MapToNano<SrcBuildT>::type, typename OracleT = AbsDiff, typename BufferT = HostBuffer> | |
| 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. | |
| template<typename DstBuildT = typename MapToNano<SrcBuildT>::type, typename BufferT = HostBuffer> | |
| 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. | |
| template<typename DstBuildT > | |
| enable_if< BuildTraits< DstBuildT >::is_index >::type | copyValues (SrcValueT *buffer) |
| Copy values from the source grid into a provided buffer. | |
Creates any nanovdb Grid from any source grid (certain combinations are obviously not allowed)
| using SrcBuildT = typename SrcNodeAccT::BuildType |
| using SrcNodeAccT = NodeAccessor<SrcGridT> |
| using SrcNodeT = typename NodeTrait<SrcRootT, LEVEL>::type |
| using SrcRootT = typename SrcNodeAccT::RootType |
| using SrcTreeT = typename SrcNodeAccT::TreeType |
| using SrcValueT = typename SrcNodeAccT::ValueType |
| 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 |
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 |
|
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 |
|
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.