OpenVDB  9.0.1
Namespaces | Classes | Typedefs | Enumerations | Functions
nanovdb Namespace Reference

Namespaces

 io
 

Classes

class  AbsDiff
 Compression oracle based on absolute difference. More...
 
struct  BaseBBox
 
class  BaseStencil
 
struct  BBox
 
struct  BBox< CoordT, false >
 Partial template specialization for integer coordinate types. More...
 
struct  BBox< Vec3T, true >
 Partial template specialization for floating point coordinate types. More...
 
class  BoxStencil
 
struct  BufferTraits
 
struct  BufferTraits< CudaDeviceBuffer >
 
struct  BuildToValueMap
 Maps one type (e.g. the build types above) to other (actual) types. More...
 
struct  BuildToValueMap< Fp16 >
 
struct  BuildToValueMap< Fp4 >
 
struct  BuildToValueMap< Fp8 >
 
struct  BuildToValueMap< FpN >
 
struct  BuildToValueMap< Half >
 
struct  BuildToValueMap< ValueMask >
 
class  Camera
 A minimal perspective camera for ray generation. More...
 
struct  ConvertTrait
 
struct  ConvertTrait< Vec3< T > >
 
struct  ConvertTrait< Vec4< T > >
 
class  Coord
 Signed (i, j, k) 32-bit integer coordinate class, similar to openvdb::math::Coord. More...
 
class  CpuTimer
 
class  CRC32
 Class that computes the Cyclic Redundancy Check (CRC) More...
 
class  CudaDeviceBuffer
 Simple memory buffer using un-managed pinned host memory when compiled with NVCC. Obviously this class is making explicit used of CUDA so replace it with your own memory allocator if you are not using CUDA. More...
 
class  CurvatureStencil
 
class  DDA
 A Digital Differential Analyzer. Unlike HDDA (defined above) this DDA uses a fixed step-size defined by the template parameter Dim! More...
 
struct  Delta
 Delta for small floating-point offsets. More...
 
struct  Delta< double >
 
struct  Delta< float >
 
struct  DenseData
 
class  DenseGrid
 Simple dense grid class. More...
 
class  DenseGridHandle
 
class  DitherLUT
 
struct  enable_if
 C++11 implementation of std::enable_if. More...
 
struct  enable_if< true, T >
 
class  Extrema
 
class  Extrema< ValueT, 0 >
 Template specialization of Extrema on scalar value types, i.e. rank = 0. More...
 
class  Extrema< VecT, 1 >
 Template specialization of Extrema on vector value types, i.e. rank = 1. More...
 
struct  FloatTraits
 
struct  FloatTraits< bool, 1 >
 
struct  FloatTraits< T, 8 >
 
struct  FloatTraits< ValueMask, 1 >
 
class  Fp16
 Dummy type for a 16bit quantization of float point values. More...
 
class  Fp4
 Dummy type for a 4bit quantization of float point values. More...
 
class  Fp8
 Dummy type for a 8bit quantization of float point values. More...
 
class  FpN
 Dummy type for a variable bit quantization of floating point values. More...
 
class  GradStencil
 
class  Grid
 Highest level of the data structure. Contains a tree and a world->index transform (that currently only supports uniform scaling and translation). More...
 
struct  GridBlindMetaData
 
class  GridBuilder
 Allows for the construction of NanoVDB grids without any dependecy. More...
 
class  GridChecksum
 Class that encapsulates two CRC32 checksums, one for the Grid, Tree and Root node meta data and one for the remaining grid nodes. More...
 
struct  GridData
 Struct with all the member data of the Grid (useful during serialization of an openvdb grid) More...
 
class  GridHandle
 This class serves to manage a raw memory buffer of a NanoVDB Grid. More...
 
class  GridHandleBase
 
class  GridMetaData
 This is a convenient class that allows for access to grid meta-data that are independent of the value type of a grid. That is, this class can be used to get information about a grid without actually knowing its ValueType. More...
 
class  GridStats
 Allows for the construction of NanoVDB grids without any dependecy. More...
 
struct  GridTree
 defines a tree type from a grid type while perserving constness More...
 
struct  GridTree< const GridT >
 
class  GridValidator
 Allows for the construction of NanoVDB grids without any dependecy. More...
 
class  Half
 Dummy type for a 16 bit floating point values. More...
 
class  HDDA
 A Digital Differential Analyzer specialized for OpenVDB grids. More...
 
class  HostBuffer
 This is a buffer that contains a shared or private pool to either externally or internally managed host memory. More...
 
class  Image
 
struct  ImageData
 
class  ImageHandle
 
struct  InternalData
 Struct with all the member data of the InternalNode (useful during serialization of an openvdb InternalNode) More...
 
class  InternalNode
 Internal nodes of a VDB treedim(),. More...
 
struct  is_floating_point
 C++11 implementation of std::is_floating_point. More...
 
struct  is_same
 C++11 implementation of std::is_same. More...
 
struct  is_same< T, T >
 
struct  is_specialization
 Metafunction used to determine if the first template parameter is a specialization of the class template given in the second template parameter. More...
 
struct  is_specialization< TemplateType< Args... >, TemplateType >
 
struct  LeafData
 Stuct with all the member data of the LeafNode (useful during serialization of an openvdb LeafNode) More...
 
struct  LeafData< bool, CoordT, MaskT, LOG2DIM >
 
struct  LeafData< Fp16, CoordT, MaskT, LOG2DIM >
 
struct  LeafData< Fp4, CoordT, MaskT, LOG2DIM >
 Stuct with all the member data of the LeafNode (useful during serialization of an openvdb LeafNode) More...
 
struct  LeafData< Fp8, CoordT, MaskT, LOG2DIM >
 
struct  LeafData< FpN, CoordT, MaskT, LOG2DIM >
 
struct  LeafData< ValueMask, CoordT, MaskT, LOG2DIM >
 
struct  LeafFnBase
 Base-class for quantized float leaf nodes. More...
 
class  LeafManager
 LeafNanager maintains a linear array of leaf nodes. More...
 
class  LeafNode
 Leaf nodes of the VDB tree. (defaults to 8x8x8 = 512 voxels) More...
 
struct  Map
 Defines an affine transform and its inverse represented as a 3x3 matrix and a vec3 translation. More...
 
class  Mask
 Bit-mask to encode active states and facilitate sequential iterators and a fast codec for I/O compression. More...
 
struct  Maximum
 Maximum floating-point values. More...
 
struct  NanoNode
 Trait to map from LEVEL to node type. More...
 
struct  NanoNode< BuildT, 0 >
 
struct  NanoNode< BuildT, 1 >
 
struct  NanoNode< BuildT, 2 >
 
struct  NanoNode< BuildT, 3 >
 
class  NanoToOpenVDB
 This class will serialize an OpenVDB grid into a NanoVDB grid managed by a GridHandle. More...
 
class  NodeManager
 NodeNanager maintains separate linear arrays of the three nodes types. More...
 
struct  NodeTrait
 Struct to derive node type from its level in a given grid, tree or root while perserving constness. More...
 
struct  NodeTrait< const GridOrTreeOrRootT, 0 >
 
struct  NodeTrait< const GridOrTreeOrRootT, 1 >
 
struct  NodeTrait< const GridOrTreeOrRootT, 2 >
 
struct  NodeTrait< const GridOrTreeOrRootT, 3 >
 
struct  NodeTrait< GridOrTreeOrRootT, 0 >
 
struct  NodeTrait< GridOrTreeOrRootT, 1 >
 
struct  NodeTrait< GridOrTreeOrRootT, 2 >
 
struct  NodeTrait< GridOrTreeOrRootT, 3 >
 
struct  NoopStats
 No-op Stats class. More...
 
struct  OpenGridType
 Grid trait that defines OpenVDB grids with the exact same configuration as NanoVDB grids. More...
 
struct  OpenGridType< openvdb::PointDataIndex32 >
 Template specialization for the PointDataGrid. More...
 
struct  OpenGridType< openvdb::PointIndex32 >
 Template specialization for the PointIndexGrid. More...
 
struct  OpenToNanoType
 Converts OpenVDB types to NanoVDB types, e.g. openvdb::Vec3f to nanovdb::Vec3f Template specializations are defined below. More...
 
struct  OpenToNanoType< openvdb::Coord >
 Template specialization for openvdb::Coord. More...
 
struct  OpenToNanoType< openvdb::CoordBBox >
 Template specialization for openvdb::CoordBBox. More...
 
struct  OpenToNanoType< openvdb::math::BBox< T > >
 Template specialization for openvdb::math::BBox. More...
 
struct  OpenToNanoType< openvdb::math::Vec3< T > >
 Template specialization for openvdb::math::Vec3. More...
 
struct  OpenToNanoType< openvdb::math::Vec4< T > >
 Template specialization for openvdb::math::Vec4. More...
 
struct  OpenToNanoType< openvdb::ValueMask >
 Template specialization for openvdb::ValueMask. More...
 
class  OpenToNanoVDB
 This class will convert an OpenVDB grid into a NanoVDB grid managed by a GridHandle. More...
 
class  PointAccessor
 Class to access points at a specific voxel location. More...
 
class  PointTreeMarcher
 A Tree Marcher for Point Grids. More...
 
class  Range
 
class  Range< 1, T >
 
class  Range< 2, T >
 
class  Range< 3, T >
 
class  Ray
 
class  ReadAccessor
 
class  ReadAccessor< BuildT, 0, 1, 2 >
 Node caching at all (three) tree levels. More...
 
class  ReadAccessor< BuildT, LEVEL0, LEVEL1,-1 >
 
class  ReadAccessor< BuildT, LEVEL0,-1,-1 >
 Node caching at a single tree level. More...
 
class  ReadAccessor< BuildT,-1,-1,-1 >
 A read-only value accessor with three levels of node caching. This allows for inverse tree traversal during lookup, which is on average significantly faster than calling the equivalent method on the tree (i.e. top-down traversal). More...
 
class  RelDiff
 Compression oracle based on relative difference. More...
 
class  Rgba8
 8-bit red, green, blue, alpha packed into 32 bit unsigned int More...
 
struct  RootData
 Struct with all the member data of the RootNode (useful during serialization of an openvdb RootNode) More...
 
class  RootNode
 Top-most node of the VDB tree structure. More...
 
class  SampleFromVoxels
 
class  SampleFromVoxels< TreeOrAccT, 0, false >
 Nearest neighbor, i.e. zero order, interpolator without caching. More...
 
class  SampleFromVoxels< TreeOrAccT, 0, true >
 Nearest neighbor, i.e. zero order, interpolator with caching. More...
 
class  SampleFromVoxels< TreeOrAccT, 1, false >
 Template specialization that does not use caching of stencil points. More...
 
class  SampleFromVoxels< TreeOrAccT, 1, true >
 Template specialization with caching of stencil values. More...
 
class  SampleFromVoxels< TreeOrAccT, 2, false >
 Template specialization that does not use caching of stencil points. More...
 
class  SampleFromVoxels< TreeOrAccT, 2, true >
 Template specialization with caching of stencil values. More...
 
class  SampleFromVoxels< TreeOrAccT, 3, false >
 
class  SampleFromVoxels< TreeOrAccT, 3, true >
 
class  Split
 
class  Stats
 
class  Stats< ValueT, 0 >
 This class computes statistics (minimum value, maximum value, mean, variance and standard deviation) of a population of floating-point values. More...
 
class  Stats< ValueT, 1 >
 This class computes statistics (minimum value, maximum value, mean, variance and standard deviation) of a population of floating-point values. More...
 
struct  TensorTraits
 
struct  TensorTraits< T, 0 >
 
struct  TensorTraits< T, 1 >
 
struct  Tolerance
 Tolerance for floating-point comparison. More...
 
struct  Tolerance< double >
 
struct  Tolerance< float >
 
class  Tree
 VDB Tree, which is a thin wrapper around a RootNode. More...
 
struct  TreeData
 
class  TreeMarcher
 A Tree Marcher for Generic Grids. More...
 
class  TricubicSampler
 Tri-cubic sampler, i.e. third order, interpolator. More...
 
class  TrilinearSampler
 Tri-linear sampler, i.e. first order, interpolator. More...
 
class  TriquadraticSampler
 Tri-quadratic sampler, i.e. second order, interpolator. More...
 
class  ValueMask
 Dummy type for a voxel with a binary mask value, e.g. the active state. More...
 
class  Vec3
 A simple vector class with three double components, similar to openvdb::math::Vec3. More...
 
class  Vec4
 A simple vector class with three double components, similar to openvdb::math::Vec4. More...
 
class  Version
 Bit-compacted representation of all three version numbers. More...
 
class  WenoStencil
 This is a special 19-point stencil that supports optimal fifth-order WENO upwinding, second-order central differencing, Laplacian, and zero-crossing test. More...
 

Typedefs

using PackedRGBA8 = Rgba8
 
using Vec3R = Vec3< double >
 
using Vec3d = Vec3< double >
 
using Vec3f = Vec3< float >
 
using Vec3i = Vec3< int >
 
using Vec4R = Vec4< double >
 
using Vec4d = Vec4< double >
 
using Vec4f = Vec4< float >
 
using Vec4i = Vec4< int >
 
using CoordBBox = BBox< Coord >
 
using BBoxR = BBox< Vec3R >
 
template<typename BuildT >
using DefaultReadAccessor = ReadAccessor< BuildT, 0, 1, 2 >
 
template<typename BuildT >
using NanoLeaf = LeafNode< BuildT, Coord, Mask, 3 >
 Template specializations to the default configuration used in OpenVDB: Root -> 32^3 -> 16^3 -> 8^3. More...
 
template<typename BuildT >
using NanoLower = InternalNode< NanoLeaf< BuildT >, 4 >
 
template<typename BuildT >
using NanoUpper = InternalNode< NanoLower< BuildT >, 5 >
 
template<typename BuildT >
using NanoRoot = RootNode< NanoUpper< BuildT >>
 
template<typename BuildT >
using NanoTree = Tree< NanoRoot< BuildT >>
 
template<typename BuildT >
using NanoGrid = Grid< NanoTree< BuildT >>
 
using FloatTree = NanoTree< float >
 
using DoubleTree = NanoTree< double >
 
using Int32Tree = NanoTree< int32_t >
 
using UInt32Tree = NanoTree< uint32_t >
 
using Int64Tree = NanoTree< int64_t >
 
using Vec3fTree = NanoTree< Vec3f >
 
using Vec3dTree = NanoTree< Vec3d >
 
using Vec4fTree = NanoTree< Vec4f >
 
using Vec4dTree = NanoTree< Vec4d >
 
using Vec3ITree = NanoTree< Vec3i >
 
using MaskTree = NanoTree< ValueMask >
 
using BoolTree = NanoTree< bool >
 
using FloatGrid = Grid< FloatTree >
 
using DoubleGrid = Grid< DoubleTree >
 
using Int32Grid = Grid< Int32Tree >
 
using UInt32Grid = Grid< UInt32Tree >
 
using Int64Grid = Grid< Int64Tree >
 
using Vec3fGrid = Grid< Vec3fTree >
 
using Vec3dGrid = Grid< Vec3dTree >
 
using Vec4fGrid = Grid< Vec4fTree >
 
using Vec4dGrid = Grid< Vec4dTree >
 
using Vec3IGrid = Grid< Vec3ITree >
 
using MaskGrid = Grid< MaskTree >
 
using BoolGrid = Grid< BoolTree >
 
using Range1D = Range< 1, size_t >
 
using Range2D = Range< 2, size_t >
 
using Range3D = Range< 3, size_t >
 

Enumerations

enum  GridType : uint32_t {
  Unknown = 0, Float = 1, Double = 2, Int16 = 3,
  Int32 = 4, Int64 = 5, Vec3f = 6, Vec3d = 7,
  Mask = 8, Half = 9, UInt32 = 10, Boolean = 11,
  RGBA8 = 12, Fp4 = 13, Fp8 = 14, Fp16 = 15,
  FpN = 16, Vec4f = 17, Vec4d = 18, End = 19
}
 List of types that are currently supported by NanoVDB. More...
 
enum  GridClass : uint32_t {
  Unknown = 0, LevelSet = 1, FogVolume = 2, Staggered = 3,
  PointIndex = 4, PointData = 5, Topology = 6, VoxelVolume = 7,
  End = 8
}
 Classes (defined in OpenVDB) that are currently supported by NanoVDB. More...
 
enum  GridFlags : uint32_t {
  HasLongGridName = 1 << 0, HasBBox = 1 << 1, HasMinMax = 1 << 2, HasAverage = 1 << 3,
  HasStdDeviation = 1 << 4, IsBreadthFirst = 1 << 5, End = 1 << 6
}
 Grid flags which indicate what extra information is present in the grid buffer. More...
 
enum  GridBlindDataClass : uint32_t {
  Unknown = 0, IndexArray = 1, AttributeArray = 2, GridName = 3,
  End = 4
}
 Blind-data Classes that are currently supported by NanoVDB. More...
 
enum  GridBlindDataSemantic : uint32_t {
  Unknown = 0, PointPosition = 1, PointColor = 2, PointNormal = 3,
  PointRadius = 4, PointVelocity = 5, PointId = 6, End = 7
}
 Blind-data Semantics that are currently understood by NanoVDB. More...
 
enum  ChecksumMode : uint32_t {
  Disable = 0, Partial = 1, Full = 2, Default = 1,
  End = 3
}
 List of different modes for computing for a checksum. More...
 
enum  StatsMode : uint32_t {
  Disable = 0, BBox = 1, MinMax = 2, All = 3,
  Default = 3, End = 4
}
 Grid flags which indicate what extra information is present in the grid buffer. More...
 

Functions

const char * toStr (GridType gridType)
 Retuns a c-string used to describe a GridType. More...
 
const char * toStr (GridClass gridClass)
 Retuns a c-string used to describe a GridClass. More...
 
const char * toStr (GridFlags gridFlags)
 Retuns a c-string used to describe a GridFlags. More...
 
template<typename T1 , typename T2 >
static int64_t PtrDiff (const T1 *p, const T2 *q)
 
template<typename DstT , typename SrcT >
static DstT * PtrAdd (SrcT *p, int64_t offset)
 
template<typename DstT , typename SrcT >
static const DstT * PtrAdd (const SrcT *p, int64_t offset)
 
bool isFloatingPoint (GridType gridType)
 return true if the GridType maps to a floating point value. More...
 
bool isValid (GridType gridType, GridClass gridClass)
 return true if the combination of GridType and GridClass is valid. More...
 
template<typename Type >
bool isApproxZero (const Type &x)
 
template<typename Type >
Type Min (Type a, Type b)
 
int32_t Min (int32_t a, int32_t b)
 
uint32_t Min (uint32_t a, uint32_t b)
 
float Min (float a, float b)
 
double Min (double a, double b)
 
template<typename Type >
Type Max (Type a, Type b)
 
int32_t Max (int32_t a, int32_t b)
 
uint32_t Max (uint32_t a, uint32_t b)
 
float Max (float a, float b)
 
double Max (double a, double b)
 
float Clamp (float x, float a, float b)
 
double Clamp (double x, double a, double b)
 
float Fract (float x)
 
double Fract (double x)
 
int32_t Floor (float x)
 
int32_t Floor (double x)
 
int32_t Ceil (float x)
 
int32_t Ceil (double x)
 
template<typename T >
Pow2 (T x)
 
template<typename T >
Pow3 (T x)
 
template<typename T >
Pow4 (T x)
 
template<typename T >
Abs (T x)
 
template<>
float Abs (float x)
 
template<>
double Abs (double x)
 
template<>
int Abs (int x)
 
template<typename CoordT , typename RealT , template< typename > class Vec3T>
CoordT Round (const Vec3T< RealT > &xyz)
 
template<typename CoordT , template< typename > class Vec3T>
CoordT Round (const Vec3T< float > &xyz)
 
template<typename CoordT , template< typename > class Vec3T>
CoordT Round (const Vec3T< double > &xyz)
 
template<typename CoordT , typename RealT , template< typename > class Vec3T>
CoordT RoundDown (const Vec3T< RealT > &xyz)
 
template<typename T >
Sign (const T &x)
 Return the sign of the given value as an integer (either -1, 0 or 1). More...
 
template<typename Vec3T >
int MinIndex (const Vec3T &v)
 
template<typename Vec3T >
int MaxIndex (const Vec3T &v)
 
template<uint64_t wordSize>
uint64_t AlignUp (uint64_t byteCount)
 round up byteSize to the nearest wordSize, e.g. to align to machine word: AlignUp<sizeof(size_t)(n) More...
 
template<typename T1 , typename T2 >
Vec3< T2 > operator* (T1 scalar, const Vec3< T2 > &vec)
 
template<typename T1 , typename T2 >
Vec3< T2 > operator/ (T1 scalar, const Vec3< T2 > &vec)
 
template<typename T1 , typename T2 >
Vec4< T2 > operator* (T1 scalar, const Vec4< T2 > &vec)
 
template<typename T1 , typename T2 >
Vec4< T2 > operator/ (T1 scalar, const Vec3< T2 > &vec)
 
template<typename BuildT >
GridType mapToGridType ()
 Maps from a templated value type to a GridType enum. More...
 
template<typename Vec3T >
Vec3T matMult (const float *mat, const Vec3T &xyz)
 
template<typename Vec3T >
Vec3T matMult (const double *mat, const Vec3T &xyz)
 
template<typename Vec3T >
Vec3T matMult (const float *mat, const float *vec, const Vec3T &xyz)
 
template<typename Vec3T >
Vec3T matMult (const double *mat, const double *vec, const Vec3T &xyz)
 
template<typename Vec3T >
Vec3T matMultT (const float *mat, const Vec3T &xyz)
 
template<typename Vec3T >
Vec3T matMultT (const double *mat, const Vec3T &xyz)
 
template<typename Vec3T >
Vec3T matMultT (const float *mat, const float *vec, const Vec3T &xyz)
 
template<typename Vec3T >
Vec3T matMultT (const double *mat, const double *vec, const Vec3T &xyz)
 
static uint32_t FindLowestOn (uint32_t v)
 Returns the index of the lowest, i.e. least significant, on bit in the specified 32 bit word. More...
 
static uint32_t FindHighestOn (uint32_t v)
 Returns the index of the highest, i.e. most significant, on bit in the specified 32 bit word. More...
 
static uint32_t FindLowestOn (uint64_t v)
 Returns the index of the lowest, i.e. least significant, on bit in the specified 64 bit word. More...
 
static uint32_t FindHighestOn (uint64_t v)
 Returns the index of the highest, i.e. most significant, on bit in the specified 64 bit word. More...
 
uint32_t CountOn (uint64_t v)
 
template<int LEVEL0 = -1, int LEVEL1 = -1, int LEVEL2 = -1, typename ValueT = float>
ReadAccessor< ValueT, LEVEL0, LEVEL1, LEVEL2 > createAccessor (const NanoGrid< ValueT > &grid)
 Free-standing function for convenient creation of a ReadAccessor with optional and customizable node caching. More...
 
template<int LEVEL0 = -1, int LEVEL1 = -1, int LEVEL2 = -1, typename ValueT = float>
ReadAccessor< ValueT, LEVEL0, LEVEL1, LEVEL2 > createAccessor (const NanoTree< ValueT > &tree)
 
template<int LEVEL0 = -1, int LEVEL1 = -1, int LEVEL2 = -1, typename ValueT = float>
ReadAccessor< ValueT, LEVEL0, LEVEL1, LEVEL2 > createAccessor (const NanoRoot< ValueT > &root)
 
template<typename RangeT , typename FuncT >
void forEach (RangeT range, const FuncT &func)
 simple wrapper for tbb::parallel_for with a naive std fallback More...
 
template<typename FuncT >
void forEach (size_t begin, size_t end, size_t grainSize, const FuncT &func)
 Simple wrapper for the function defined above. More...
 
template<template< typename... > class ContainerT, typename... T, typename FuncT >
void forEach (const ContainerT< T... > &c, const FuncT &func)
 Simple wrapper for the function defined above, which works with std::containers. More...
 
template<template< typename... > class ContainerT, typename... T, typename FuncT >
void forEach (const ContainerT< T... > &c, size_t grainSize, const FuncT &func)
 Simple wrapper for the function defined above, which works with std::containers. More...
 
std::ostream & operator<< (std::ostream &os, const AbsDiff &diff)
 
std::ostream & operator<< (std::ostream &os, const RelDiff &diff)
 
template<typename ValueT >
uint64_t checksum (const NanoGrid< ValueT > &grid, ChecksumMode mode=ChecksumMode::Default)
 Return the (2 x CRC32) checksum of the specified grid. More...
 
template<typename ValueT >
bool validateChecksum (const NanoGrid< ValueT > &grid, ChecksumMode mode=ChecksumMode::Default)
 Return true if the checksum of the grid matches the expected value already encoded into the grid's meta data. More...
 
template<typename ValueT >
void updateChecksum (NanoGrid< ValueT > &grid, ChecksumMode mode=ChecksumMode::Default)
 Updates the checksum of a grid. More...
 
std::uint_fast32_t crc32 (const void *data, size_t size)
 Return the CRC32 checksum of the raw data of size. More...
 
template<typename IterT >
std::uint_fast32_t crc32 (IterT begin, IterT end)
 Return the CRC32 checksum of the content pointed to be the iterator. More...
 
template<typename BuildT >
void gridStats (NanoGrid< BuildT > &grid, StatsMode mode=StatsMode::Default)
 Re-computes the min/max, stats and bbox information for an existing NanoVDB Grid. More...
 
template<typename ValueT >
bool isValid (const NanoGrid< ValueT > &grid, bool detailed=true, bool verbose=false)
 Return true if the specified grid passes several validation tests. More...
 
template<typename RayT , typename AccT >
__hostdev__ bool ZeroCrossing (RayT &ray, AccT &acc, Coord &ijk, typename AccT::ValueType &v, float &t)
 returns true if the ray intersects a zero-crossing at the voxel level of the grid in the accessor The empty-space ray-marching is performed at all levels of the tree using an HDDA. If an intersection is detected, then ijk is updated with the index coordinate of the closest voxel after the intersection point, v contains the grid values at ijk, and t is set to the time of the intersection along the ray. More...
 
template<typename RayT , typename NodeT >
__hostdev__ bool ZeroCrossingNode (RayT &ray, const NodeT &node, float v0, nanovdb::Coord &ijk, float &v, float &t)
 
template<typename RayT , typename AccT >
__hostdev__ bool firstActive (RayT &ray, AccT &acc, Coord &ijk, float &t)
 returns true if the ray intersects an active value at any level of the grid in the accessor. The empty-space ray-marching is performed at all levels of the tree using an HDDA. If an intersection is detected, then ijk is updated with the index coordinate of the first active voxel or tile, and t is set to the time of its intersection along the ray. More...
 
template<typename Func , typename... Rest>
int invoke (const Func &taskFunc1, Rest...taskFuncN)
 
template<typename ValueT >
openvdb::Grid< typename openvdb::tree::Tree4< typename ConvertTrait< ValueT >::Type >::Type >::Ptr nanoToOpenVDB (const NanoGrid< ValueT > &grid, int verbose=0)
 Forward declaration of free-standing function that de-serializes a typed NanoVDB grid into an OpenVDB Grid. More...
 
template<typename BufferT >
openvdb::GridBase::Ptr nanoToOpenVDB (const GridHandle< BufferT > &handle, int verbose=0)
 Forward declaration of free-standing function that de-serializes a NanoVDB GridHandle into an OpenVDB GridBase. More...
 
template<typename GridT >
NodeManager< GridT > createNodeMgr (GridT &grid)
 creates a NodeManager from a grid. Move semantics is used. More...
 
template<typename GridT >
LeafManager< GridT > createLeafMgr (GridT &grid)
 creates a LeafManager from a grid. Move semantics is used. More...
 
template<typename BufferT = HostBuffer>
GridHandle< BufferT > openToNanoVDB (const openvdb::GridBase::Ptr &base, StatsMode sMode=StatsMode::Default, ChecksumMode cMode=ChecksumMode::Default, int verbose=0)
 Forward declaration of free-standing function that converts an OpenVDB GridBase into a NanoVDB GridHandle. More...
 
template<typename BufferT = HostBuffer, typename OpenTreeT = openvdb::FloatTree, typename NanoBuildT = typename OpenToNanoType<typename OpenTreeT::BuildType>::Type>
GridHandle< BufferT > openToNanoVDB (const openvdb::Grid< OpenTreeT > &grid, StatsMode sMode=StatsMode::Default, ChecksumMode cMode=ChecksumMode::Default, int verbose=0)
 Forward declaration of free-standing function that converts a typed OpenVDB Grid into a NanoVDB GridHandle. More...
 
template<typename ValueT = float, typename VoxelT = ValueT, typename BufferT = HostBuffer>
GridHandle< BufferT > createLevelSetSphere (ValueT radius=100, const Vec3< ValueT > &center=Vec3< ValueT >(0), double voxelSize=1.0, double halfWidth=3.0, const Vec3d &origin=Vec3d(0), const std::string &name="sphere_ls", StatsMode sMode=StatsMode::Default, ChecksumMode cMode=ChecksumMode::Default, float tolerance=-1.0f, bool ditherOn=false, const BufferT &buffer=BufferT())
 Returns a handle to a narrow-band level set of a sphere. More...
 
template<typename ValueT = float, typename VoxelT = ValueT, typename BufferT = HostBuffer>
GridHandle< BufferT > createFogVolumeSphere (ValueT radius=100.0f, const Vec3< ValueT > &center=Vec3< ValueT >(0.0f), double voxelSize=1.0f, double halfWidth=3.0f, const Vec3d &origin=Vec3d(0.0), const std::string &name="sphere_fog", StatsMode sMode=StatsMode::Default, ChecksumMode cMode=ChecksumMode::Default, float tolerance=-1.0f, bool ditherOn=false, const BufferT &buffer=BufferT())
 Returns a handle to a sparse fog volume of a sphere such that the exterior is 0 and inactive, the interior is active with values varying smoothly from 0 at the surface of the sphere to 1 at the halfWidth and interior of the sphere. More...
 
template<typename ValueT = float, typename BufferT = HostBuffer>
GridHandle< BufferT > createPointSphere (int pointsPerVoxel=1, ValueT radius=100.0f, const Vec3< ValueT > &center=Vec3< ValueT >(0.0f), double voxelSize=1.0f, const Vec3d &origin=Vec3d(0.0), const std::string &name="sphere_points", ChecksumMode mode=ChecksumMode::Default, const BufferT &buffer=BufferT())
 Returns a handle to a PointDataGrid containing points scattered on the surface of a sphere. More...
 
template<typename ValueT = float, typename VoxelT = ValueT, typename BufferT = HostBuffer>
GridHandle< BufferT > createLevelSetTorus (ValueT majorRadius=100.0f, ValueT minorRadius=50.0f, const Vec3< ValueT > &center=Vec3< ValueT >(0.0f), double voxelSize=1.0, double halfWidth=3.0, const Vec3d &origin=Vec3d(0.0), const std::string &name="torus_ls", StatsMode sMode=StatsMode::Default, ChecksumMode cMode=ChecksumMode::Default, float tolerance=-1.0f, bool ditherOn=false, const BufferT &buffer=BufferT())
 Returns a handle to a narrow-band level set of a torus in the xz-plane. More...
 
template<typename ValueT = float, typename VoxelT = ValueT, typename BufferT = HostBuffer>
GridHandle< BufferT > createFogVolumeTorus (ValueT majorRadius=100.0f, ValueT minorRadius=50.0f, const Vec3< ValueT > &center=Vec3< ValueT >(0.0f), double voxelSize=1.0, double halfWidth=3.0, const Vec3d &origin=Vec3d(0), const std::string &name="torus_fog", StatsMode sMode=StatsMode::Default, ChecksumMode cMode=ChecksumMode::Default, float tolerance=-1.0f, bool ditherOn=false, const BufferT &buffer=BufferT())
 Returns a handle to a sparse fog volume of a torus in the xz-plane such that the exterior is 0 and inactive, the interior is active with values varying smoothly from 0 at the surface of the torus to 1 at the halfWidth and interior of the torus. More...
 
template<typename ValueT = float, typename BufferT = HostBuffer>
GridHandle< BufferT > createPointTorus (int pointsPerVoxel=1, ValueT majorRadius=100.0f, ValueT minorRadius=50.0f, const Vec3< ValueT > &center=Vec3< ValueT >(0.0f), double voxelSize=1.0, const Vec3d &origin=Vec3d(0.0f), const std::string &name="torus_points", ChecksumMode cMode=ChecksumMode::Default, const BufferT &buffer=BufferT())
 Returns a handle to a PointDataGrid containing points scattered on the surface of a torus. More...
 
template<typename ValueT = float, typename VoxelT = ValueT, typename BufferT = HostBuffer>
GridHandle< BufferT > createLevelSetBox (ValueT width=40.0f, ValueT height=60.0f, ValueT depth=100.0f, const Vec3< ValueT > &center=Vec3< ValueT >(0.0f), double voxelSize=1.0, double halfWidth=3.0, const Vec3d &origin=Vec3d(0.0), const std::string &name="box_ls", StatsMode sMode=StatsMode::Default, ChecksumMode cMode=ChecksumMode::Default, float tolerance=-1.0f, bool ditherOn=false, const BufferT &buffer=BufferT())
 Returns a handle to a narrow-band level set of a box. More...
 
template<typename ValueT = float, typename VoxelT = ValueT, typename BufferT = HostBuffer>
GridHandle< BufferT > createFogVolumeBox (ValueT width=40.0f, ValueT height=60.0f, ValueT depth=100.0f, const Vec3< ValueT > &center=Vec3< ValueT >(0.0f), double voxelSize=1.0, double halfWidth=3.0, const Vec3d &origin=Vec3d(0.0), const std::string &name="box_fog", StatsMode sMode=StatsMode::Default, ChecksumMode cMode=ChecksumMode::Default, float tolerance=-1.0f, bool ditherOn=false, const BufferT &buffer=BufferT())
 Returns a handle to a sparse fog volume of a box such that the exterior is 0 and inactive, the interior is active with values varying smoothly from 0 at the surface of the box to 1 at the halfWidth and interior of the box. More...
 
template<typename ValueT = float, typename VoxelT = ValueT, typename BufferT = HostBuffer>
GridHandle< BufferT > createLevelSetOctahedron (ValueT scale=100.0f, const Vec3< ValueT > &center=Vec3< ValueT >(0.0f), double voxelSize=1.0, double halfWidth=3.0, const Vec3d &origin=Vec3d(0.0), const std::string &name="octadedron_ls", StatsMode sMode=StatsMode::Default, ChecksumMode cMode=ChecksumMode::Default, float tolerance=-1.0f, bool ditherOn=false, const BufferT &buffer=BufferT())
 Returns a handle to a narrow-band level set of a octahedron. More...
 
template<typename ValueT = float, typename VoxelT = ValueT, typename BufferT = HostBuffer>
GridHandle< BufferT > createFogVolumeOctahedron (ValueT scale=100.0f, const Vec3< ValueT > &center=Vec3< ValueT >(0.0f), double voxelSize=1.0, double halfWidth=3.0, const Vec3d &origin=Vec3d(0.0), const std::string &name="octadedron_fog", StatsMode sMode=StatsMode::Default, ChecksumMode cMode=ChecksumMode::Default, float tolerance=-1.0f, bool ditherOn=false, const BufferT &buffer=BufferT())
 Returns a handle to a sparse fog volume of an octahedron such that the exterior is 0 and inactive, the interior is active with values varying smoothly from 0 at the surface of the octahedron to 1 at the halfWidth and interior of the octahedron. More...
 
template<typename ValueT = float, typename VoxelT = ValueT, typename BufferT = HostBuffer>
GridHandle< BufferT > createLevelSetBBox (ValueT width=40.0f, ValueT height=60.0f, ValueT depth=100.0f, ValueT thickness=10.0f, const Vec3< ValueT > &center=Vec3< ValueT >(0.0f), double voxelSize=1.0, double halfWidth=3.0, const Vec3d &origin=Vec3d(0.0), const std::string &name="bbox_ls", StatsMode sMode=StatsMode::Default, ChecksumMode cMode=ChecksumMode::Default, float tolerance=-1.0f, bool ditherOn=false, const BufferT &buffer=BufferT())
 Returns a handle to a narrow-band level set of a bounding-box (= wireframe of a box) More...
 
template<typename ValueT = float, typename BufferT = HostBuffer>
GridHandle< BufferT > createPointBox (int pointsPerVoxel=1, ValueT width=40.0f, ValueT height=60.0f, ValueT depth=100.0f, const Vec3< ValueT > &center=Vec3< ValueT >(0.0f), double voxelSize=1.0, const Vec3d &origin=Vec3d(0.0), const std::string &name="box_points", ChecksumMode mode=ChecksumMode::Default, const BufferT &buffer=BufferT())
 Returns a handle to a PointDataGrid containing points scattered on the surface of a box. More...
 
template<typename ValueT = float, typename BufferT = HostBuffer>
GridHandle< BufferT > createPointScatter (const NanoGrid< ValueT > &srcGrid, int pointsPerVoxel=1, const std::string &name="point_scatter", ChecksumMode mode=ChecksumMode::Default, const BufferT &buffer=BufferT())
 Given an input NanoVDB voxel grid this methods returns a GridHandle to another NanoVDB PointDataGrid with points scattered in the active leaf voxels of in input grid. More...
 
template<typename RangeT , typename T , typename FuncT , typename JoinT >
reduce (RangeT range, const T &identity, const FuncT &func, const JoinT &join)
 
template<typename T , typename FuncT , typename JoinT >
reduce (size_t begin, size_t end, size_t grainSize, const T &identity, const FuncT &func, const JoinT &join)
 Simple wrapper to the function defined above. More...
 
template<template< typename... > class ContainerT, typename... ArgT, typename T , typename FuncT , typename JoinT >
reduce (const ContainerT< ArgT... > &c, const T &identity, const FuncT &func, const JoinT &join)
 Simple wrapper that works with std::containers. More...
 
template<template< typename... > class ContainerT, typename... ArgT, typename T , typename FuncT , typename JoinT >
reduce (const ContainerT< ArgT... > &c, size_t grainSize, const T &identity, const FuncT &func, const JoinT &join)
 Simple wrapper that works with std::containers. More...
 
template<int Order, typename TreeOrAccT , bool UseCache = true>
SampleFromVoxels< TreeOrAccT, Order, UseCache > createSampler (const TreeOrAccT &acc)
 Factory free-function for a sampler of specific polynomial orders. More...
 
template<typename CoordT , typename RealT , template< typename > class Vec3T>
CoordT Floor (Vec3T< RealT > &xyz)
 Utility function that returns the Coord of the round-down of xyz and redefined (x,&nbsp y,&nbsp z) as the fractional part, ie xyz-in = return-value + xyz-out. More...
 
template<typename CoordT , template< typename > class Vec3T>
CoordT Floor (Vec3T< float > &xyz)
 Template specialization of Floor for Vec3<float> More...
 
template<typename CoordT , template< typename > class Vec3T>
CoordT Floor (Vec3T< double > &xyz)
 Template specialization of Floor for Vec3<float> More...
 
template<typename ValueType , typename RealT = ValueType>
ValueType WENO5 (const ValueType &v1, const ValueType &v2, const ValueType &v3, const ValueType &v4, const ValueType &v5, RealT scale2=1.0)
 Implementation of nominally fifth-order finite-difference WENO. More...
 
template<typename RealT >
RealT GodunovsNormSqrd (bool isOutside, RealT dP_xm, RealT dP_xp, RealT dP_ym, RealT dP_yp, RealT dP_zm, RealT dP_zp)
 
template<typename RealT >
RealT GodunovsNormSqrd (bool isOutside, const Vec3< RealT > &gradient_m, const Vec3< RealT > &gradient_p)
 
template<typename GridT , typename BufferT = HostBuffer>
DenseGridHandle< BufferT > convertToDense (const GridT &grid, const BufferT &allocator=BufferT())
 Converts a NanoVDB grid to a DenseGrid. More...
 
float Sqrt (float x)
 Return the square root of a floating-point value. More...
 
double Sqrt (double x)
 Return the square root of a floating-point value. More...
 

Typedef Documentation

using BBoxR = BBox<Vec3R>
using BoolTree = NanoTree<bool>
using CoordBBox = BBox<Coord>
using DefaultReadAccessor = ReadAccessor<BuildT, 0, 1, 2>
using DoubleTree = NanoTree<double>
using FloatTree = NanoTree<float>
using Int32Tree = NanoTree<int32_t>
using Int64Tree = NanoTree<int64_t>
using NanoGrid = Grid<NanoTree<BuildT>>
using NanoLeaf = LeafNode<BuildT, Coord, Mask, 3>

Template specializations to the default configuration used in OpenVDB: Root -> 32^3 -> 16^3 -> 8^3.

using NanoLower = InternalNode<NanoLeaf<BuildT>, 4>
using NanoRoot = RootNode<NanoUpper<BuildT>>
using NanoTree = Tree<NanoRoot<BuildT>>
using NanoUpper = InternalNode<NanoLower<BuildT>, 5>
using PackedRGBA8 = Rgba8
using Range1D = Range<1, size_t>
using Range2D = Range<2, size_t>
using Range3D = Range<3, size_t>
using UInt32Tree = NanoTree<uint32_t>
using Vec3d = Vec3<double>
using Vec3f = Vec3<float>
using Vec3i = Vec3<int>
using Vec3R = Vec3<double>
using Vec4d = Vec4<double>
using Vec4f = Vec4<float>
using Vec4i = Vec4<int>
using Vec4R = Vec4<double>

Enumeration Type Documentation

enum ChecksumMode : uint32_t
strong

List of different modes for computing for a checksum.

Enumerator
Disable 
Partial 
Full 
Default 
End 
enum GridBlindDataClass : uint32_t
strong

Blind-data Classes that are currently supported by NanoVDB.

Enumerator
Unknown 
IndexArray 
AttributeArray 
GridName 
End 
enum GridBlindDataSemantic : uint32_t
strong

Blind-data Semantics that are currently understood by NanoVDB.

Enumerator
Unknown 
PointPosition 
PointColor 
PointNormal 
PointRadius 
PointVelocity 
PointId 
End 
enum GridClass : uint32_t
strong

Classes (defined in OpenVDB) that are currently supported by NanoVDB.

Enumerator
Unknown 
LevelSet 
FogVolume 
Staggered 
PointIndex 
PointData 
Topology 
VoxelVolume 
End 
enum GridFlags : uint32_t
strong

Grid flags which indicate what extra information is present in the grid buffer.

Enumerator
HasLongGridName 
HasBBox 
HasMinMax 
HasAverage 
HasStdDeviation 
IsBreadthFirst 
End 
enum GridType : uint32_t
strong

List of types that are currently supported by NanoVDB.

Note
To expand on this list do: 1) Add the new type between Unknown and End in the enum below 2) Add the new type to OpenToNanoVDB::processGrid that maps OpenVDB types to GridType 3) Verify that the ConvertTrait in NanoToOpenVDB.h works correctly with the new type 4) Add the new type to mapToGridType (defined below) that maps NanoVDB types to GridType 5) Add the new type to toStr (defined below)
Enumerator
Unknown 
Float 
Double 
Int16 
Int32 
Int64 
Vec3f 
Vec3d 
Mask 
Half 
UInt32 
Boolean 
RGBA8 
Fp4 
Fp8 
Fp16 
FpN 
Vec4f 
Vec4d 
End 
enum StatsMode : uint32_t
strong

Grid flags which indicate what extra information is present in the grid buffer.

Enumerator
Disable 
BBox 
MinMax 
All 
Default 
End 

Function Documentation

T nanovdb::Abs ( x)
inline
float nanovdb::Abs ( float  x)
inline
double nanovdb::Abs ( double  x)
inline
int nanovdb::Abs ( int  x)
inline
uint64_t nanovdb::AlignUp ( uint64_t  byteCount)
inline

round up byteSize to the nearest wordSize, e.g. to align to machine word: AlignUp<sizeof(size_t)(n)

both wordSize and byteSize are in byte units

int32_t nanovdb::Ceil ( float  x)
inline
int32_t nanovdb::Ceil ( double  x)
inline
uint64_t checksum ( const NanoGrid< ValueT > &  grid,
ChecksumMode  mode = ChecksumMode::Default 
)

Return the (2 x CRC32) checksum of the specified grid.

Parameters
gridGrid from which the checksum is computed.
modeDefines the mode of computation for the checksum.
float nanovdb::Clamp ( float  x,
float  a,
float  b 
)
inline
double nanovdb::Clamp ( double  x,
double  a,
double  b 
)
inline
DenseGridHandle<BufferT> nanovdb::convertToDense ( const GridT &  grid,
const BufferT &  allocator = BufferT() 
)

Converts a NanoVDB grid to a DenseGrid.

uint32_t nanovdb::CountOn ( uint64_t  v)
inline
Returns
Number of bits that are on in the specified 64-bit word
std::uint_fast32_t crc32 ( const void *  data,
size_t  size 
)
inline

Return the CRC32 checksum of the raw data of size.

Parameters
dataThe beginning of the raw data.
sizeSize of the data to bytes!
std::uint_fast32_t crc32 ( IterT  begin,
IterT  end 
)
inline

Return the CRC32 checksum of the content pointed to be the iterator.

Parameters
beginBeginning of the iterator range
endEnd of the iterator range (exclusive)
Warning
The dereference of the iterator most be convertible to a uint8_t
ReadAccessor<ValueT, LEVEL0, LEVEL1, LEVEL2> nanovdb::createAccessor ( const NanoGrid< ValueT > &  grid)

Free-standing function for convenient creation of a ReadAccessor with optional and customizable node caching.

createAccessor<>(grid): No caching of nodes and hence it's thread-safe but slow createAccessor<0>(grid): Caching of leaf nodes only createAccessor<1>(grid): Caching of lower internal nodes only createAccessor<2>(grid): Caching of upper internal nodes only createAccessor<0,1>(grid): Caching of leaf and lower internal nodes createAccessor<0,2>(grid): Caching of leaf and upper internal nodes createAccessor<1,2>(grid): Caching of lower and upper internal nodes createAccessor<0,1,2>(grid): Caching of all nodes at all tree levels

ReadAccessor<ValueT, LEVEL0, LEVEL1, LEVEL2> nanovdb::createAccessor ( const NanoTree< ValueT > &  tree)
ReadAccessor<ValueT, LEVEL0, LEVEL1, LEVEL2> nanovdb::createAccessor ( const NanoRoot< ValueT > &  root)
GridHandle< BufferT > createFogVolumeBox ( ValueT  width = 40.0f,
ValueT  height = 60.0f,
ValueT  depth = 100.0f,
const Vec3< ValueT > &  center = Vec3<ValueT>(0.0f),
double  voxelSize = 1.0,
double  halfWidth = 3.0,
const Vec3d origin = Vec3d(0.0),
const std::string &  name = "box_fog",
StatsMode  sMode = StatsMode::Default,
ChecksumMode  cMode = ChecksumMode::Default,
float  tolerance = -1.0f,
bool  ditherOn = false,
const BufferT &  buffer = BufferT() 
)
inline

Returns a handle to a sparse fog volume of a box such that the exterior is 0 and inactive, the interior is active with values varying smoothly from 0 at the surface of the box to 1 at the halfWidth and interior of the box.

Parameters
widthWidth of box in world units
heightHeight of box in world units
depthDepth of box in world units
centerCenter of box in world units
voxelSizeSize of a voxel in world units
halfWidthHalf-width of narrow band in voxel units
originOrigin of grid in world units
nameName of the grid
sModeMode of computation for the statistics.
cModeMode of computation for the checksum.
toleranceGlobal error tolerance use when VoxelT = FpN
ditherOnIf true dithering will be applied when VoxelT = {Fp4,Fp8,Fp16,FpN}
bufferBuffer used for memory allocation by the handle

The ValueT template parameter must be float (default) or double. The VoxelT template parameter must be one of the following: float (default), double, Fp4, Fp8, Fp16 or FpN. The tolerance argument is only used when VoxelT is set to FpN.

GridHandle< BufferT > createFogVolumeOctahedron ( ValueT  scale = 100.0f,
const Vec3< ValueT > &  center = Vec3<ValueT>(0.0f),
double  voxelSize = 1.0,
double  halfWidth = 3.0,
const Vec3d origin = Vec3d(0.0),
const std::string &  name = "octadedron_fog",
StatsMode  sMode = StatsMode::Default,
ChecksumMode  cMode = ChecksumMode::Default,
float  tolerance = -1.0f,
bool  ditherOn = false,
const BufferT &  buffer = BufferT() 
)
inline

Returns a handle to a sparse fog volume of an octahedron such that the exterior is 0 and inactive, the interior is active with values varying smoothly from 0 at the surface of the octahedron to 1 at the halfWidth and interior of the octahedron.

Parameters
scaleScale of octahedron in world units
centerCenter of box in world units
voxelSizeSize of a voxel in world units
halfWidthHalf-width of narrow band in voxel units
originOrigin of grid in world units
nameName of the grid
sModeMode of computation for the statistics.
cModeMode of computation for the checksum.
toleranceGlobal error tolerance use when VoxelT = FpN
ditherOnIf true dithering will be applied when VoxelT = {Fp4,Fp8,Fp16,FpN}
bufferBuffer used for memory allocation by the handle

The ValueT template parameter must be float (default) or double. The VoxelT template parameter must be one of the following: float (default), double, Fp4, Fp8, Fp16 or FpN. The tolerance argument is only used when VoxelT is set to FpN.

GridHandle< BufferT > createFogVolumeSphere ( ValueT  radius = 100.0f,
const Vec3< ValueT > &  center = Vec3<ValueT>(0.0f),
double  voxelSize = 1.0f,
double  halfWidth = 3.0f,
const Vec3d origin = Vec3d(0.0),
const std::string &  name = "sphere_fog",
StatsMode  sMode = StatsMode::Default,
ChecksumMode  cMode = ChecksumMode::Default,
float  tolerance = -1.0f,
bool  ditherOn = false,
const BufferT &  buffer = BufferT() 
)
inline

Returns a handle to a sparse fog volume of a sphere such that the exterior is 0 and inactive, the interior is active with values varying smoothly from 0 at the surface of the sphere to 1 at the halfWidth and interior of the sphere.

Parameters
radiusRadius of sphere in world units
centerCenter of sphere in world units
voxelSizeSize of a voxel in world units
halfWidthHalf-width of narrow band in voxel units
originOrigin of grid in world units
nameName of the grid
sModeMode of computation for the statistics.
cModeMode of computation for the checksum.
toleranceGlobal error tolerance use when VoxelT = FpN
ditherOnIf true dithering will be applied when VoxelT = {Fp4,Fp8,Fp16,FpN}
bufferBuffer used for memory allocation by the handle

The ValueT template parameter must be float (default) or double. The VoxelT template parameter must be one of the following: float (default), double, Fp4, Fp8, Fp16 or FpN. The tolerance argument is only used when VoxelT is set to FpN.

GridHandle< BufferT > createFogVolumeTorus ( ValueT  majorRadius = 100.0f,
ValueT  minorRadius = 50.0f,
const Vec3< ValueT > &  center = Vec3<ValueT>(0.0f),
double  voxelSize = 1.0,
double  halfWidth = 3.0,
const Vec3d origin = Vec3d(0),
const std::string &  name = "torus_fog",
StatsMode  sMode = StatsMode::Default,
ChecksumMode  cMode = ChecksumMode::Default,
float  tolerance = -1.0f,
bool  ditherOn = false,
const BufferT &  buffer = BufferT() 
)
inline

Returns a handle to a sparse fog volume of a torus in the xz-plane such that the exterior is 0 and inactive, the interior is active with values varying smoothly from 0 at the surface of the torus to 1 at the halfWidth and interior of the torus.

Parameters
majorRadiusMajor radius of torus in world units
minorRadiusMinor radius of torus in world units
centerCenter of torus in world units
voxelSizeSize of a voxel in world units
halfWidthHalf-width of narrow band in voxel units
originOrigin of grid in world units
nameName of the grid
sModeMode of computation for the statistics.
cModeMode of computation for the checksum.
toleranceGlobal error tolerance use when VoxelT = FpN
ditherOnIf true dithering will be applied when VoxelT = {Fp4,Fp8,Fp16,FpN}
bufferBuffer used for memory allocation by the handle

The ValueT template parameter must be float (default) or double. The VoxelT template parameter must be one of the following: float (default), double, Fp4, Fp8, Fp16 or FpN. The tolerance argument is only used when VoxelT is set to FpN.

LeafManager< GridT > createLeafMgr ( GridT &  grid)

creates a LeafManager from a grid. Move semantics is used.

GridHandle< BufferT > createLevelSetBBox ( ValueT  width = 40.0f,
ValueT  height = 60.0f,
ValueT  depth = 100.0f,
ValueT  thickness = 10.0f,
const Vec3< ValueT > &  center = Vec3<ValueT>(0.0f),
double  voxelSize = 1.0,
double  halfWidth = 3.0,
const Vec3d origin = Vec3d(0.0),
const std::string &  name = "bbox_ls",
StatsMode  sMode = StatsMode::Default,
ChecksumMode  cMode = ChecksumMode::Default,
float  tolerance = -1.0f,
bool  ditherOn = false,
const BufferT &  buffer = BufferT() 
)
inline

Returns a handle to a narrow-band level set of a bounding-box (= wireframe of a box)

Parameters
widthWidth of box in world units
heightHeight of box in world units
depthDepth of box in world units
thicknessThickness of the wire in world units
centerCenter of bbox in world units
voxelSizeSize of a voxel in world units
halfWidthHalf-width of narrow band in voxel units
originOrigin of grid in world units
nameName of the grid
sModeMode of computation for the statistics.
cModeMode of computation for the checksum.
toleranceGlobal error tolerance use when VoxelT = FpN
ditherOnIf true dithering will be applied when VoxelT = {Fp4,Fp8,Fp16,FpN}
bufferBuffer used for memory allocation by the handle

The ValueT template parameter must be float (default) or double. The VoxelT template parameter must be one of the following: float (default), double, Fp4, Fp8, Fp16 or FpN. The tolerance argument is only used when VoxelT is set to FpN.

GridHandle< BufferT > createLevelSetBox ( ValueT  width = 40.0f,
ValueT  height = 60.0f,
ValueT  depth = 100.0f,
const Vec3< ValueT > &  center = Vec3<ValueT>(0.0f),
double  voxelSize = 1.0,
double  halfWidth = 3.0,
const Vec3d origin = Vec3d(0.0),
const std::string &  name = "box_ls",
StatsMode  sMode = StatsMode::Default,
ChecksumMode  cMode = ChecksumMode::Default,
float  tolerance = -1.0f,
bool  ditherOn = false,
const BufferT &  buffer = BufferT() 
)
inline

Returns a handle to a narrow-band level set of a box.

Parameters
widthWidth of box in world units
heightHeight of box in world units
depthDepth of box in world units
centerCenter of box in world units
voxelSizeSize of a voxel in world units
halfWidthHalf-width of narrow band in voxel units
originOrigin of grid in world units
nameName of the grid
sModeMode of computation for the statistics.
cModeMode of computation for the checksum.
toleranceGlobal error tolerance use when VoxelT = FpN
ditherOnIf true dithering will be applied when VoxelT = {Fp4,Fp8,Fp16,FpN}
bufferBuffer used for memory allocation by the handle

The ValueT template parameter must be float (default) or double. The VoxelT template parameter must be one of the following: float (default), double, Fp4, Fp8, Fp16 or FpN. The tolerance argument is only used when VoxelT is set to FpN.

GridHandle< BufferT > createLevelSetOctahedron ( ValueT  scale = 100.0f,
const Vec3< ValueT > &  center = Vec3<ValueT>(0.0f),
double  voxelSize = 1.0,
double  halfWidth = 3.0,
const Vec3d origin = Vec3d(0.0),
const std::string &  name = "octadedron_ls",
StatsMode  sMode = StatsMode::Default,
ChecksumMode  cMode = ChecksumMode::Default,
float  tolerance = -1.0f,
bool  ditherOn = false,
const BufferT &  buffer = BufferT() 
)
inline

Returns a handle to a narrow-band level set of a octahedron.

Parameters
scaleScale of octahedron in world units
centerCenter of octahedron in world units
voxelSizeSize of a voxel in world units
halfWidthHalf-width of narrow band in voxel units
originOrigin of grid in world units
nameName of the grid
sModeMode of computation for the statistics.
cModeMode of computation for the checksum.
toleranceGlobal error tolerance use when VoxelT = FpN
ditherOnIf true dithering will be applied when VoxelT = {Fp4,Fp8,Fp16,FpN}
bufferBuffer used for memory allocation by the handle

The ValueT template parameter must be float (default) or double. The VoxelT template parameter must be one of the following: float (default), double, Fp4, Fp8, Fp16 or FpN. The tolerance argument is only used when VoxelT is set to FpN.

GridHandle< BufferT > createLevelSetSphere ( ValueT  radius = 100,
const Vec3< ValueT > &  center = Vec3<ValueT>(0),
double  voxelSize = 1.0,
double  halfWidth = 3.0,
const Vec3d origin = Vec3d(0),
const std::string &  name = "sphere_ls",
StatsMode  sMode = StatsMode::Default,
ChecksumMode  cMode = ChecksumMode::Default,
float  tolerance = -1.0f,
bool  ditherOn = false,
const BufferT &  buffer = BufferT() 
)
inline

Returns a handle to a narrow-band level set of a sphere.

Parameters
radiusRadius of sphere in world units
centerCenter of sphere in world units
voxelSizeSize of a voxel in world units
halfWidthHalf-width of narrow band in voxel units
originOrigin of grid in world units
nameName of the grid
sModeMode of computation for the statistics.
cModeMode of computation for the checksum.
toleranceGlobal error tolerance use when VoxelT = FpN
ditherOnIf true dithering will be applied when VoxelT = {Fp4,Fp8,Fp16,FpN}
bufferBuffer used for memory allocation by the handle

The ValueT template parameter must be float (default) or double. The VoxelT template parameter must be one of the following: float (default), double, Fp4, Fp8, Fp16 or FpN. The tolerance argument is only used when VoxelT is set to FpN.

GridHandle< BufferT > createLevelSetTorus ( ValueT  majorRadius = 100.0f,
ValueT  minorRadius = 50.0f,
const Vec3< ValueT > &  center = Vec3<ValueT>(0.0f),
double  voxelSize = 1.0,
double  halfWidth = 3.0,
const Vec3d origin = Vec3d(0.0),
const std::string &  name = "torus_ls",
StatsMode  sMode = StatsMode::Default,
ChecksumMode  cMode = ChecksumMode::Default,
float  tolerance = -1.0f,
bool  ditherOn = false,
const BufferT &  buffer = BufferT() 
)
inline

Returns a handle to a narrow-band level set of a torus in the xz-plane.

Parameters
majorRadiusMajor radius of torus in world units
minorRadiusMinor radius of torus in world units
centerCenter of torus in world units
voxelSizeSize of a voxel in world units
halfWidthHalf-width of narrow band in voxel units
originOrigin of grid in world units
nameName of the grid
sModeMode of computation for the statistics.
cModeMode of computation for the checksum.
toleranceGlobal error tolerance use when VoxelT = FpN
ditherOnIf true dithering will be applied when VoxelT = {Fp4,Fp8,Fp16,FpN}
bufferBuffer used for memory allocation by the handle

The ValueT template parameter must be float (default) or double. The VoxelT template parameter must be one of the following: float (default), double, Fp4, Fp8, Fp16 or FpN. The tolerance argument is only used when VoxelT is set to FpN.

NodeManager< GridT > createNodeMgr ( GridT &  grid)

creates a NodeManager from a grid. Move semantics is used.

GridHandle< BufferT > createPointBox ( int  pointsPerVoxel = 1,
ValueT  width = 40.0f,
ValueT  height = 60.0f,
ValueT  depth = 100.0f,
const Vec3< ValueT > &  center = Vec3<ValueT>(0.0f),
double  voxelSize = 1.0,
const Vec3d origin = Vec3d(0.0),
const std::string &  name = "box_points",
ChecksumMode  mode = ChecksumMode::Default,
const BufferT &  buffer = BufferT() 
)
inline

Returns a handle to a PointDataGrid containing points scattered on the surface of a box.

Parameters
pointsPerVoxelNumber of point per voxel on on the surface
widthWidth of box in world units
heightHeight of box in world units
depthDepth of box in world units
centerCenter of box in world units
voxelSizeSize of a voxel in world units
originOrigin of grid in world units
nameName of the grid
modeMode of computation for the checksum.
bufferBuffer used for memory allocation by the handle
GridHandle< BufferT > createPointScatter ( const NanoGrid< ValueT > &  srcGrid,
int  pointsPerVoxel = 1,
const std::string &  name = "point_scatter",
ChecksumMode  mode = ChecksumMode::Default,
const BufferT &  buffer = BufferT() 
)
inline

Given an input NanoVDB voxel grid this methods returns a GridHandle to another NanoVDB PointDataGrid with points scattered in the active leaf voxels of in input grid.

Parameters
srcGridConst input grid used to determine the active voxels to scatter points into
pointsPerVoxelNumber of point per voxel on on the surface
nameName of the grid
modeMode of computation for the checksum.
bufferBuffer used for memory allocation by the handle
GridHandle< BufferT > createPointSphere ( int  pointsPerVoxel = 1,
ValueT  radius = 100.0f,
const Vec3< ValueT > &  center = Vec3<ValueT>(0.0f),
double  voxelSize = 1.0f,
const Vec3d origin = Vec3d(0.0),
const std::string &  name = "sphere_points",
ChecksumMode  mode = ChecksumMode::Default,
const BufferT &  buffer = BufferT() 
)
inline

Returns a handle to a PointDataGrid containing points scattered on the surface of a sphere.

Parameters
pointsPerVoxelNumber of point per voxel on on the surface
radiusRadius of sphere in world units
centerCenter of sphere in world units
voxelSizeSize of a voxel in world units
originOrigin of grid in world units
nameName of the grid
modeMode of computation for the checksum.
bufferBuffer used for memory allocation by the handle

The ValueT template parameter must be float (default) or double.

GridHandle< BufferT > createPointTorus ( int  pointsPerVoxel = 1,
ValueT  majorRadius = 100.0f,
ValueT  minorRadius = 50.0f,
const Vec3< ValueT > &  center = Vec3<ValueT>(0.0f),
double  voxelSize = 1.0,
const Vec3d origin = Vec3d(0.0f),
const std::string &  name = "torus_points",
ChecksumMode  cMode = ChecksumMode::Default,
const BufferT &  buffer = BufferT() 
)
inline

Returns a handle to a PointDataGrid containing points scattered on the surface of a torus.

Parameters
pointsPerVoxelNumber of point per voxel on on the surface
majorRadiusMajor radius of torus in world units
minorRadiusMinor radius of torus in world units
centerCenter of torus in world units
voxelSizeSize of a voxel in world units
originOrigin of grid in world units
nameName of the grid
cModeMode of computation for the checksum.
bufferBuffer used for memory allocation by the handle

The ValueT template parameter must be float (default) or double.

SampleFromVoxels<TreeOrAccT, Order, UseCache> nanovdb::createSampler ( const TreeOrAccT &  acc)

Factory free-function for a sampler of specific polynomial orders.

This allows for the compact syntax:

auto acc = grid.getAccessor();
auto smp = nanovdb::createSampler<1>( acc );
static uint32_t nanovdb::FindHighestOn ( uint32_t  v)
inlinestatic

Returns the index of the highest, i.e. most significant, on bit in the specified 32 bit word.

Warning
Assumes that at least one bit is set in the word, i.e. v != uint32_t(0)!
static uint32_t nanovdb::FindHighestOn ( uint64_t  v)
inlinestatic

Returns the index of the highest, i.e. most significant, on bit in the specified 64 bit word.

Warning
Assumes that at least one bit is set in the word, i.e. v != uint32_t(0)!
static uint32_t nanovdb::FindLowestOn ( uint32_t  v)
inlinestatic

Returns the index of the lowest, i.e. least significant, on bit in the specified 32 bit word.

Warning
Assumes that at least one bit is set in the word, i.e. v != uint32_t(0)!
static uint32_t nanovdb::FindLowestOn ( uint64_t  v)
inlinestatic

Returns the index of the lowest, i.e. least significant, on bit in the specified 64 bit word.

Warning
Assumes that at least one bit is set in the word, i.e. v != uint32_t(0)!
__hostdev__ bool nanovdb::firstActive ( RayT &  ray,
AccT &  acc,
Coord ijk,
float &  t 
)
inline

returns true if the ray intersects an active value at any level of the grid in the accessor. The empty-space ray-marching is performed at all levels of the tree using an HDDA. If an intersection is detected, then ijk is updated with the index coordinate of the first active voxel or tile, and t is set to the time of its intersection along the ray.

CoordT nanovdb::Floor ( Vec3T< RealT > &  xyz)
inline

Utility function that returns the Coord of the round-down of xyz and redefined (x,&nbsp y,&nbsp z) as the fractional part, ie xyz-in = return-value + xyz-out.

CoordT nanovdb::Floor ( Vec3T< float > &  xyz)
inline

Template specialization of Floor for Vec3<float>

CoordT nanovdb::Floor ( Vec3T< double > &  xyz)
inline

Template specialization of Floor for Vec3<float>

int32_t nanovdb::Floor ( float  x)
inline
int32_t nanovdb::Floor ( double  x)
inline
void nanovdb::forEach ( RangeT  range,
const FuncT &  func 
)
inline

simple wrapper for tbb::parallel_for with a naive std fallback

Parameters
rangeRange, CoordBBox, tbb::blocked_range, blocked_range2D, or blocked_range3D.
funcfunctor with the signature [](const RangeT&){...},
std::vector<int> array(100);
auto func = [&array](auto &r){for (auto i=r.begin(); i!=r.end(); ++i) array[i]=i;};
forEach(array, func);
void nanovdb::forEach ( size_t  begin,
size_t  end,
size_t  grainSize,
const FuncT &  func 
)
inline

Simple wrapper for the function defined above.

void nanovdb::forEach ( const ContainerT< T... > &  c,
const FuncT &  func 
)
inline

Simple wrapper for the function defined above, which works with std::containers.

void nanovdb::forEach ( const ContainerT< T... > &  c,
size_t  grainSize,
const FuncT &  func 
)
inline

Simple wrapper for the function defined above, which works with std::containers.

float nanovdb::Fract ( float  x)
inline
double nanovdb::Fract ( double  x)
inline
RealT nanovdb::GodunovsNormSqrd ( bool  isOutside,
RealT  dP_xm,
RealT  dP_xp,
RealT  dP_ym,
RealT  dP_yp,
RealT  dP_zm,
RealT  dP_zp 
)
inline
RealT nanovdb::GodunovsNormSqrd ( bool  isOutside,
const Vec3< RealT > &  gradient_m,
const Vec3< RealT > &  gradient_p 
)
inline
void gridStats ( NanoGrid< BuildT > &  grid,
StatsMode  mode = StatsMode::Default 
)

Re-computes the min/max, stats and bbox information for an existing NanoVDB Grid.

Parameters
gridGrid whose stats to update
modeMode of computation for the statistics.
int nanovdb::invoke ( const Func &  taskFunc1,
Rest...  taskFuncN 
)
Returns
1 for serial, 2 for tbb multi-threading, and 3 for std multi-threading
bool nanovdb::isApproxZero ( const Type &  x)
inline
bool nanovdb::isFloatingPoint ( GridType  gridType)
inline

return true if the GridType maps to a floating point value.

bool isValid ( const NanoGrid< ValueT > &  grid,
bool  detailed = true,
bool  verbose = false 
)

Return true if the specified grid passes several validation tests.

Parameters
gridGrid to validate
detailedIf true the validation test is detailed and relatively slow.
verboseIf true information about the first failed test is printed to std::cerr
bool nanovdb::isValid ( GridType  gridType,
GridClass  gridClass 
)
inline

return true if the combination of GridType and GridClass is valid.

GridType nanovdb::mapToGridType ( )
inline

Maps from a templated value type to a GridType enum.

Vec3T nanovdb::matMult ( const float *  mat,
const Vec3T &  xyz 
)
inline
Vec3T nanovdb::matMult ( const double *  mat,
const Vec3T &  xyz 
)
inline
Vec3T nanovdb::matMult ( const float *  mat,
const float *  vec,
const Vec3T &  xyz 
)
inline
Vec3T nanovdb::matMult ( const double *  mat,
const double *  vec,
const Vec3T &  xyz 
)
inline
Vec3T nanovdb::matMultT ( const float *  mat,
const Vec3T &  xyz 
)
inline
Vec3T nanovdb::matMultT ( const double *  mat,
const Vec3T &  xyz 
)
inline
Vec3T nanovdb::matMultT ( const float *  mat,
const float *  vec,
const Vec3T &  xyz 
)
inline
Vec3T nanovdb::matMultT ( const double *  mat,
const double *  vec,
const Vec3T &  xyz 
)
inline
Type nanovdb::Max ( Type  a,
Type  b 
)
inline
int32_t nanovdb::Max ( int32_t  a,
int32_t  b 
)
inline
uint32_t nanovdb::Max ( uint32_t  a,
uint32_t  b 
)
inline
float nanovdb::Max ( float  a,
float  b 
)
inline
double nanovdb::Max ( double  a,
double  b 
)
inline
int nanovdb::MaxIndex ( const Vec3T &  v)
inline
Type nanovdb::Min ( Type  a,
Type  b 
)
inline
int32_t nanovdb::Min ( int32_t  a,
int32_t  b 
)
inline
uint32_t nanovdb::Min ( uint32_t  a,
uint32_t  b 
)
inline
float nanovdb::Min ( float  a,
float  b 
)
inline
double nanovdb::Min ( double  a,
double  b 
)
inline
int nanovdb::MinIndex ( const Vec3T &  v)
inline
openvdb::Grid< typename openvdb::tree::Tree4< typename ConvertTrait< ValueT >::Type >::Type >::Ptr nanoToOpenVDB ( const NanoGrid< ValueT > &  grid,
int  verbose = 0 
)

Forward declaration of free-standing function that de-serializes a typed NanoVDB grid into an OpenVDB Grid.

openvdb::GridBase::Ptr nanoToOpenVDB ( const GridHandle< BufferT > &  handle,
int  verbose = 0 
)

Forward declaration of free-standing function that de-serializes a NanoVDB GridHandle into an OpenVDB GridBase.

GridHandle< BufferT > openToNanoVDB ( const openvdb::GridBase::Ptr base,
StatsMode  sMode = StatsMode::Default,
ChecksumMode  cMode = ChecksumMode::Default,
int  verbose = 0 
)

Forward declaration of free-standing function that converts an OpenVDB GridBase into a NanoVDB GridHandle.

GridHandle< BufferT > openToNanoVDB ( const openvdb::Grid< OpenTreeT > &  grid,
StatsMode  sMode = StatsMode::Default,
ChecksumMode  cMode = ChecksumMode::Default,
int  verbose = 0 
)

Forward declaration of free-standing function that converts a typed OpenVDB Grid into a NanoVDB GridHandle.

Unlike the function above that takes a base openvdb grid, this method is strongly typed and allows for compression, e.g. openToNanoVDB<HostBuffer, openvdb::FloatTree, nanovdb::Fp16>

Vec3<T2> nanovdb::operator* ( T1  scalar,
const Vec3< T2 > &  vec 
)
inline
Vec4<T2> nanovdb::operator* ( T1  scalar,
const Vec4< T2 > &  vec 
)
inline
Vec3<T2> nanovdb::operator/ ( T1  scalar,
const Vec3< T2 > &  vec 
)
inline
Vec4<T2> nanovdb::operator/ ( T1  scalar,
const Vec3< T2 > &  vec 
)
inline
std::ostream& nanovdb::operator<< ( std::ostream &  os,
const AbsDiff diff 
)
inline
std::ostream& nanovdb::operator<< ( std::ostream &  os,
const RelDiff diff 
)
inline
T nanovdb::Pow2 ( x)
inline
T nanovdb::Pow3 ( x)
inline
T nanovdb::Pow4 ( x)
inline
static DstT* nanovdb::PtrAdd ( SrcT *  p,
int64_t  offset 
)
inlinestatic
static const DstT* nanovdb::PtrAdd ( const SrcT *  p,
int64_t  offset 
)
inlinestatic
static int64_t nanovdb::PtrDiff ( const T1 *  p,
const T2 *  q 
)
inlinestatic
T nanovdb::reduce ( RangeT  range,
const T &  identity,
const FuncT &  func,
const JoinT &  join 
)
inline
Returns
reduction
Parameters
rangeRangeT can be Range<dim,T>, CoordBBox, tbb::blocked_range, blocked_range2D, or blocked_range3D.
funcfunctor with signature T FuncT::operator()(const RangeT& range, const T& a) const
joinfunctor with the signature T JoinT::operator()(const T& a, const T& b) const
std::vector<int> array(100, 1);
auto func = [&array](auto &r, int a){for (auto i=r.begin(); i!=r.end(); ++i) a+=array[i]; return a;};
int sum = reduce(array, 0, func, [](int a, int b){return a + b;});
T nanovdb::reduce ( size_t  begin,
size_t  end,
size_t  grainSize,
const T &  identity,
const FuncT &  func,
const JoinT &  join 
)
inline

Simple wrapper to the function defined above.

T nanovdb::reduce ( const ContainerT< ArgT... > &  c,
const T &  identity,
const FuncT &  func,
const JoinT &  join 
)
inline

Simple wrapper that works with std::containers.

T nanovdb::reduce ( const ContainerT< ArgT... > &  c,
size_t  grainSize,
const T &  identity,
const FuncT &  func,
const JoinT &  join 
)
inline

Simple wrapper that works with std::containers.

CoordT nanovdb::Round ( const Vec3T< RealT > &  xyz)
inline
CoordT nanovdb::Round ( const Vec3T< float > &  xyz)
inline
CoordT nanovdb::Round ( const Vec3T< double > &  xyz)
inline
CoordT nanovdb::RoundDown ( const Vec3T< RealT > &  xyz)
inline
T nanovdb::Sign ( const T &  x)
inline

Return the sign of the given value as an integer (either -1, 0 or 1).

float nanovdb::Sqrt ( float  x)
inline

Return the square root of a floating-point value.

double nanovdb::Sqrt ( double  x)
inline

Return the square root of a floating-point value.

const char* nanovdb::toStr ( GridType  gridType)
inline

Retuns a c-string used to describe a GridType.

const char* nanovdb::toStr ( GridClass  gridClass)
inline

Retuns a c-string used to describe a GridClass.

const char* nanovdb::toStr ( GridFlags  gridFlags)
inline

Retuns a c-string used to describe a GridFlags.

void updateChecksum ( NanoGrid< ValueT > &  grid,
ChecksumMode  mode = ChecksumMode::Default 
)

Updates the checksum of a grid.

Parameters
gridGrid whose checksum will be updated.
modeDefines the mode of computation for the checksum.
bool validateChecksum ( const NanoGrid< ValueT > &  grid,
ChecksumMode  mode = ChecksumMode::Default 
)

Return true if the checksum of the grid matches the expected value already encoded into the grid's meta data.

Parameters
gridGrid whose checksum is validated.
modeDefines the mode of computation for the checksum.
ValueType nanovdb::WENO5 ( const ValueType &  v1,
const ValueType &  v2,
const ValueType &  v3,
const ValueType &  v4,
const ValueType &  v5,
RealT  scale2 = 1.0 
)
inline

Implementation of nominally fifth-order finite-difference WENO.

This function returns the numerical flux. See "High Order Finite Difference and Finite Volume WENO Schemes and Discontinuous Galerkin Methods for CFD" - Chi-Wang Shu ICASE Report No 2001-11 (page 6). Also see ICASE No 97-65 for a more complete reference (Shu, 1997). Given v1 = f(x-2dx), v2 = f(x-dx), v3 = f(x), v4 = f(x+dx) and v5 = f(x+2dx), return an interpolated value f(x+dx/2) with the special property that ( f(x+dx/2) - f(x-dx/2) ) / dx = df/dx (x) + error, where the error is fifth-order in smooth regions: O(dx) <= error <=O(dx^5)

__hostdev__ bool nanovdb::ZeroCrossing ( RayT &  ray,
AccT &  acc,
Coord ijk,
typename AccT::ValueType &  v,
float &  t 
)
inline

returns true if the ray intersects a zero-crossing at the voxel level of the grid in the accessor The empty-space ray-marching is performed at all levels of the tree using an HDDA. If an intersection is detected, then ijk is updated with the index coordinate of the closest voxel after the intersection point, v contains the grid values at ijk, and t is set to the time of the intersection along the ray.

__hostdev__ bool nanovdb::ZeroCrossingNode ( RayT &  ray,
const NodeT &  node,
float  v0,
nanovdb::Coord ijk,
float &  v,
float &  t 
)
inline