HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nanovdb Namespace Reference

Namespaces

 build
 
 crc32
 
 io
 

Classes

class  OclDeviceBuffer
 
struct  BufferTraits< OclDeviceBuffer >
 
class  ValueIndex
 Dummy type for a voxel whose value equals an offset into an external value array. More...
 
class  ValueOnIndex
 Dummy type for a voxel whose value equals an offset into an external value array of active values. More...
 
class  ValueIndexMask
 Like ValueIndex but with a mutable mask. More...
 
class  ValueOnIndexMask
 Like ValueOnIndex but with a mutable mask. More...
 
class  ValueMask
 Dummy type for a voxel whose value equals its binary active state. More...
 
class  Half
 Dummy type for a 16 bit floating point values (placeholder for IEEE 754 Half) 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  Fp16
 Dummy type for a 16bit quantization of float point values. More...
 
class  FpN
 Dummy type for a variable bit quantization of floating point values. More...
 
class  Point
 Dummy type for indexing points into voxels. More...
 
struct  is_same
 C++11 implementation of std::is_same. More...
 
struct  is_same< T0, T1 >
 
struct  is_same< T, T >
 
struct  is_floating_point
 C++11 implementation of std::is_floating_point. More...
 
struct  BuildTraits
 Define static boolean tests for template build types. More...
 
struct  enable_if
 C++11 implementation of std::enable_if. More...
 
struct  enable_if< true, T >
 
struct  disable_if
 
struct  disable_if< true, T >
 
struct  is_const
 
struct  is_const< const T >
 
struct  is_pointer
 Trait used to identify template parameter that are pointers. More...
 
struct  is_pointer< T * >
 Template specialization of non-const pointers. More...
 
struct  is_pointer< const T * >
 Template specialization of const pointers. More...
 
struct  remove_const
 Trait use to const from type. Default implementation is just a pass-through. More...
 
struct  remove_const< const T >
 Template specialization of trait class use to remove const qualifier type from a type. More...
 
struct  remove_reference
 Trait use to remove reference, i.e. "&", qualifier from a type. Default implementation is just a pass-through. More...
 
struct  remove_reference< T & >
 Template specialization of trait class use to remove reference, i.e. "&", qualifier from a type. More...
 
struct  remove_pointer
 Trait use to remove pointer, i.e. "*", qualifier from a type. Default implementation is just a pass-through. More...
 
struct  remove_pointer< T * >
 Template specialization of trait class use to to remove pointer, i.e. "*", qualifier from a type. More...
 
struct  match_const
 Trait used to transfer the const-ness of a reference type to another type. More...
 
struct  match_const< T, const ReferenceT >
 Template specialization used to transfer the const-ness of a reference type to another type. More...
 
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  BuildToValueMap
 Maps one type (e.g. the build types above) to other (actual) types. More...
 
struct  BuildToValueMap< ValueIndex >
 
struct  BuildToValueMap< ValueOnIndex >
 
struct  BuildToValueMap< ValueIndexMask >
 
struct  BuildToValueMap< ValueOnIndexMask >
 
struct  BuildToValueMap< ValueMask >
 
struct  BuildToValueMap< Half >
 
struct  BuildToValueMap< Fp4 >
 
struct  BuildToValueMap< Fp8 >
 
struct  BuildToValueMap< Fp16 >
 
struct  BuildToValueMap< FpN >
 
struct  BuildToValueMap< Point >
 
class  Version
 Bit-compacted representation of all three version numbers. More...
 
struct  Tolerance
 Tolerance for floating-point comparison. More...
 
struct  Tolerance< float >
 
struct  Tolerance< double >
 
struct  Delta
 Delta for small floating-point offsets. More...
 
struct  Delta< float >
 
struct  Delta< double >
 
struct  Maximum
 Maximum floating-point values. More...
 
class  Vec3
 A simple vector class with three components, similar to openvdb::math::Vec3. More...
 
class  Coord
 Signed (i, j, k) 32-bit integer coordinate class, similar to openvdb::math::Coord. More...
 
class  Vec4
 A simple vector class with four components, similar to openvdb::math::Vec4. More...
 
class  Rgba8
 8-bit red, green, blue, alpha packed into 32 bit unsigned int More...
 
struct  TensorTraits
 
struct  TensorTraits< T, 0 >
 
struct  TensorTraits< T, 1 >
 
struct  FloatTraits
 
struct  FloatTraits< T, 8 >
 
struct  FloatTraits< bool, 1 >
 
struct  FloatTraits< ValueIndex, 1 >
 
struct  FloatTraits< ValueIndexMask, 1 >
 
struct  FloatTraits< ValueOnIndex, 1 >
 
struct  FloatTraits< ValueOnIndexMask, 1 >
 
struct  FloatTraits< ValueMask, 1 >
 
struct  FloatTraits< Point, 1 >
 
struct  BaseBBox
 
struct  BBox
 
struct  BBox< Vec3T, true >
 Partial template specialization for floating point coordinate types. More...
 
struct  BBox< CoordT, false >
 Partial template specialization for integer coordinate types. More...
 
struct  BitArray
 
struct  BitArray< 8 >
 
struct  BitArray< 16 >
 
struct  BitArray< 32 >
 
struct  BitArray< 64 >
 
class  BitFlags
 
class  Mask
 Bit-mask to encode active states and facilitate sequential iterators and a fast codec for I/O compression. More...
 
struct  Map
 Defines an affine transform and its inverse represented as a 3x3 matrix and a vec3 translation. More...
 
struct  NodeTrait
 Struct to derive node type from its level in a given grid, tree or root while preserving constness. More...
 
struct  NodeTrait< GridOrTreeOrRootT, 0 >
 
struct  NodeTrait< const GridOrTreeOrRootT, 0 >
 
struct  NodeTrait< GridOrTreeOrRootT, 1 >
 
struct  NodeTrait< const GridOrTreeOrRootT, 1 >
 
struct  NodeTrait< GridOrTreeOrRootT, 2 >
 
struct  NodeTrait< const GridOrTreeOrRootT, 2 >
 
struct  NodeTrait< GridOrTreeOrRootT, 3 >
 
struct  NodeTrait< const GridOrTreeOrRootT, 3 >
 
struct  GetValue
 Implements Tree::getValue(Coord), i.e. return the value associated with a specific coordinate ijk. More...
 
struct  SetValue
 
struct  SetVoxel
 
struct  GetState
 Implements Tree::isActive(Coord) More...
 
struct  GetDim
 Implements Tree::getDim(Coord) More...
 
struct  GetLeaf
 Return the pointer to the leaf node that contains Coord. Implements Tree::probeLeaf(Coord) More...
 
struct  ProbeValue
 Implements Tree::probeLeaf(Coord) More...
 
struct  GetNodeInfo
 Implements Tree::getNodeInfo(Coord) More...
 
class  ReadAccessor
 
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  GridTree
 defines a tree type from a grid type while preserving constness More...
 
struct  GridTree< const GridT >
 
class  Tree
 VDB Tree, which is a thin wrapper around a RootNode. More...
 
class  RootNode
 Top-most node of the VDB tree structure. More...
 
class  InternalNode
 Internal nodes of a VDB treedim(),. More...
 
class  LeafNode
 Leaf nodes of the VDB tree. (defaults to 8x8x8 = 512 voxels) 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  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  ReadAccessor< BuildT, LEVEL0,-1,-1 >
 Node caching at a single tree level. More...
 
class  ReadAccessor< BuildT, LEVEL0, LEVEL1,-1 >
 
class  ReadAccessor< BuildT, 0, 1, 2 >
 Node caching at all (three) tree levels. More...
 
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  PointAccessor
 Class to access points at a specific voxel location. More...
 
class  PointAccessor< AttT, Point >
 
class  ChannelAccessor
 Class to access values in channels at a specific voxel location. More...
 
struct  GetLower
 Return point to the lower internal node where Coord maps to one of its values, i.e. terminates. More...
 
struct  GetUpper
 Return point to the upper internal node where Coord maps to one of its values, i.e. terminates. More...
 
class  CpuTimer
 
class  CreateNanoGrid
 Creates any nanovdb Grid from any source grid (certain combinations are obviously not allowed) More...
 
struct  MapToNano
 Trait that maps any type to the corresponding nanovdb type. More...
 
class  AbsDiff
 Compression oracle based on absolute difference. More...
 
class  RelDiff
 Compression oracle based on relative difference. More...
 
class  NodeAccessor
 The NodeAccessor provides a uniform API for accessing nodes got NanoVDB, OpenVDB and build Grids. More...
 
class  NodeAccessor< NanoGrid< BuildT > >
 Template specialization for nanovdb::Grid which is special since its NodeManage uses a handle in order to support node access on the GPU! 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...
 
struct  BufferTraits< CudaDeviceBuffer >
 
class  GpuTimer
 
class  DitherLUT
 
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  GridHandleMetaData
 
class  GridHandle
 This class serves to manage a buffer containing one or more NanoVDB Grids. More...
 
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...
 
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  NoopStats
 No-op Stats class. More...
 
class  GridStats
 Allows for the construction of NanoVDB grids without any dependency. More...
 
class  GridValidator
 Allows for the construction of NanoVDB grids without any dependecy. More...
 
class  HDDA
 A Digital Differential Analyzer specialized for OpenVDB grids. More...
 
class  DDA
 A Digital Differential Analyzer. Unlike HDDA (defined above) this DDA uses a fixed step-size defined by the template parameter Dim! More...
 
class  TreeMarcher
 A Tree Marcher for Generic Grids. More...
 
class  PointTreeMarcher
 A Tree Marcher for Point Grids. More...
 
struct  BufferTraits
 
class  HostBuffer
 This is a buffer that contains a shared or private pool to either externally or internally managed host memory. More...
 
class  NanoToOpenVDB
 This class will serialize an OpenVDB grid into a NanoVDB grid managed by a GridHandle. More...
 
class  NodeManager
 NodeManager allows for sequential access to nodes. More...
 
class  NodeManagerHandle
 NodeManagerHandle manages the memory of a NodeManager. More...
 
struct  NodeManagerData
 
class  Split
 
class  Range
 
class  Range< 1, T >
 
class  Range< 2, T >
 
class  Range< 3, T >
 
class  Ray
 
class  SampleFromVoxels
 
class  SampleFromVoxels< TreeOrAccT, 0, true >
 Nearest neighbor, i.e. zero order, interpolator with caching. More...
 
class  SampleFromVoxels< TreeOrAccT, 0, false >
 Nearest neighbor, i.e. zero order, interpolator without caching. More...
 
class  TrilinearSampler
 Tri-linear sampler, i.e. first order, interpolator. 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  TriquadraticSampler
 Tri-quadratic sampler, i.e. second order, interpolator. 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  TricubicSampler
 Tri-cubic sampler, i.e. third order, interpolator. More...
 
class  SampleFromVoxels< TreeOrAccT, 3, true >
 
class  SampleFromVoxels< TreeOrAccT, 3, false >
 
class  BaseStencil
 
class  BoxStencil
 
class  GradStencil
 
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...
 
class  CurvatureStencil
 

Typedefs

using Vec3d = Vec3< double >
 
using Vec3f = Vec3< float >
 
using Vec3i = Vec3< int32_t >
 
using Vec3u = Vec3< uint32_t >
 
using Vec3u8 = Vec3< uint8_t >
 
using Vec3u16 = Vec3< uint16_t >
 
using Vec4R = Vec4< double >
 
using Vec4d = Vec4< double >
 
using Vec4f = Vec4< float >
 
using Vec4i = Vec4< int >
 
using PackedRGBA8 = Rgba8
 
using CoordBBox = BBox< Coord >
 
using BBoxR = BBox< Vec3d >
 
template<typename BuildT >
using DefaultReadAccessor = ReadAccessor< BuildT, 0, 1, 2 >
 
using BaseT = LeafFnBase< CoordT, MaskT, LOG2DIM >
 
using BuildType = Fp4
 
using ArrayType = uint8_t
 
using ValueType = bool
 
using FloatType = bool
 
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 Fp4Tree = NanoTree< Fp4 >
 
using Fp8Tree = NanoTree< Fp8 >
 
using Fp16Tree = NanoTree< Fp16 >
 
using FpNTree = NanoTree< FpN >
 
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 IndexTree = NanoTree< ValueIndex >
 
using OnIndexTree = NanoTree< ValueOnIndex >
 
using IndexMaskTree = NanoTree< ValueIndexMask >
 
using OnIndexMaskTree = NanoTree< ValueOnIndexMask >
 
using FloatGrid = Grid< FloatTree >
 
using Fp4Grid = Grid< Fp4Tree >
 
using Fp8Grid = Grid< Fp8Tree >
 
using Fp16Grid = Grid< Fp16Tree >
 
using FpNGrid = Grid< FpNTree >
 
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 PointGrid = Grid< Point >
 
using IndexGrid = Grid< IndexTree >
 
using OnIndexGrid = Grid< OnIndexTree >
 
using IndexMaskGrid = Grid< IndexMaskTree >
 
using OnIndexMaskGrid = Grid< OnIndexMaskTree >
 
using Range1D = Range< 1, size_t >
 
using Range2D = Range< 2, size_t >
 
using Range3D = Range< 3, size_t >
 

Enumerations

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

Functions

const char * toStr (GridType gridType)
 Maps a GridType to a c-string. 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...
 
__hostdev__ bool isFloatingPoint (GridType gridType)
 return true if the GridType maps to a floating point type More...
 
__hostdev__ bool isFloatingPointVector (GridType gridType)
 return true if the GridType maps to a floating point vec3. More...
 
__hostdev__ bool isInteger (GridType gridType)
 Return true if the GridType maps to a POD integer type. More...
 
__hostdev__ bool isIndex (GridType gridType)
 Return true if the GridType maps to a special index type (not a POD integer type). More...
 
__hostdev__ bool isValid (GridType gridType, GridClass gridClass)
 return true if the combination of GridType and GridClass is valid. More...
 
__hostdev__ bool isValid (const GridBlindDataClass &blindClass, const GridBlindDataSemantic &blindSemantics, const GridType &blindType)
 return true if the combination of GridBlindDataClass, GridBlindDataSemantic and GridType is valid. More...
 
template<typename Type >
__hostdev__ bool isApproxZero (const Type &x)
 
template<typename Type >
__hostdev__ Type Min (Type a, Type b)
 
__hostdev__ int32_t Min (int32_t a, int32_t b)
 
__hostdev__ uint32_t Min (uint32_t a, uint32_t b)
 
__hostdev__ float Min (float a, float b)
 
__hostdev__ double Min (double a, double b)
 
template<typename Type >
__hostdev__ Type Max (Type a, Type b)
 
__hostdev__ int32_t Max (int32_t a, int32_t b)
 
__hostdev__ uint32_t Max (uint32_t a, uint32_t b)
 
__hostdev__ float Max (float a, float b)
 
__hostdev__ double Max (double a, double b)
 
__hostdev__ float Clamp (float x, float a, float b)
 
__hostdev__ double Clamp (double x, double a, double b)
 
__hostdev__ float Fract (float x)
 
__hostdev__ double Fract (double x)
 
__hostdev__ int32_t Floor (float x)
 
__hostdev__ int32_t Floor (double x)
 
__hostdev__ int32_t Ceil (float x)
 
__hostdev__ int32_t Ceil (double x)
 
template<typename T >
__hostdev__Pow2 (T x)
 
template<typename T >
__hostdev__Pow3 (T x)
 
template<typename T >
__hostdev__Pow4 (T x)
 
template<typename T >
__hostdev__Abs (T x)
 
template<>
__hostdev__ float Abs (float x)
 
template<>
__hostdev__ double Abs (double x)
 
template<>
__hostdev__ int Abs (int x)
 
template<typename CoordT , typename RealT , template< typename > class Vec3T>
__hostdev__ CoordT Round (const Vec3T< RealT > &xyz)
 
template<typename CoordT , template< typename > class Vec3T>
__hostdev__ CoordT Round (const Vec3T< float > &xyz)
 
template<typename CoordT , template< typename > class Vec3T>
__hostdev__ CoordT Round (const Vec3T< double > &xyz)
 
template<typename CoordT , typename RealT , template< typename > class Vec3T>
__hostdev__ CoordT RoundDown (const Vec3T< RealT > &xyz)
 
template<typename T >
__hostdev__Sign (const T &x)
 Return the sign of the given value as an integer (either -1, 0 or 1). More...
 
template<typename Vec3T >
__hostdev__ int MinIndex (const Vec3T &v)
 
template<typename Vec3T >
__hostdev__ int MaxIndex (const Vec3T &v)
 
template<uint64_t wordSize>
__hostdev__ 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 >
__hostdev__ Vec3< T2 > operator* (T1 scalar, const Vec3< T2 > &vec)
 
template<typename T1 , typename T2 >
__hostdev__ Vec3< T2 > operator/ (T1 scalar, const Vec3< T2 > &vec)
 
template<typename T1 , typename T2 >
__hostdev__ Vec4< T2 > operator* (T1 scalar, const Vec4< T2 > &vec)
 
template<typename T1 , typename T2 >
__hostdev__ Vec4< T2 > operator/ (T1 scalar, const Vec4< T2 > &vec)
 
template<typename BuildT >
__hostdev__ GridType mapToGridType ()
 Maps from a templated build type to a GridType enum. More...
 
template<typename BuildT >
__hostdev__ GridClass mapToGridClass (GridClass defaultClass=GridClass::Unknown)
 Maps from a templated build type to a GridClass enum. More...
 
template<typename Vec3T >
__hostdev__ Vec3T matMult (const float *mat, const Vec3T &xyz)
 Multiply a 3x3 matrix and a 3d vector using 32bit floating point arithmetics. More...
 
template<typename Vec3T >
__hostdev__ Vec3T matMult (const double *mat, const Vec3T &xyz)
 Multiply a 3x3 matrix and a 3d vector using 64bit floating point arithmetics. More...
 
template<typename Vec3T >
__hostdev__ Vec3T matMult (const float *mat, const float *vec, const Vec3T &xyz)
 Multiply a 3x3 matrix to a 3d vector and add another 3d vector using 32bit floating point arithmetics. More...
 
template<typename Vec3T >
__hostdev__ Vec3T matMult (const double *mat, const double *vec, const Vec3T &xyz)
 Multiply a 3x3 matrix to a 3d vector and add another 3d vector using 64bit floating point arithmetics. More...
 
template<typename Vec3T >
__hostdev__ Vec3T matMultT (const float *mat, const Vec3T &xyz)
 Multiply the transposed of a 3x3 matrix and a 3d vector using 32bit floating point arithmetics. More...
 
template<typename Vec3T >
__hostdev__ Vec3T matMultT (const double *mat, const Vec3T &xyz)
 Multiply the transposed of a 3x3 matrix and a 3d vector using 64bit floating point arithmetics. More...
 
template<typename Vec3T >
__hostdev__ Vec3T matMultT (const float *mat, const float *vec, const Vec3T &xyz)
 
template<typename Vec3T >
__hostdev__ Vec3T matMultT (const double *mat, const double *vec, const Vec3T &xyz)
 
NANOVDB_HOSTDEV_DISABLE_WARNING
__hostdev__ uint32_t 
CountOn (uint64_t v)
 
struct NANOVDB_ALIGN (NANOVDB_DATA_ALIGNMENT) GridData
 Struct with all the member data of the Grid (useful during serialization of an openvdb grid) More...
 
__hostdev__ float getValue (uint32_t i) const
 
 LeafData ()=delete
 This class cannot be constructed or deleted. More...
 
 LeafData (const LeafData &)=delete
 
LeafDataoperator= (const LeafData &)=delete
 
 ~LeafData ()=delete
 
__hostdev__ bool getMin () const
 
__hostdev__ bool getMax () const
 
__hostdev__ bool getAvg () const
 
__hostdev__ bool getDev () const
 
__hostdev__ void setValue (uint32_t offset, bool v)
 
__hostdev__ void setOn (uint32_t offset)
 
__hostdev__ void setMin (const bool &)
 
__hostdev__ void setMax (const bool &)
 
__hostdev__ void setAvg (const bool &)
 
__hostdev__ void setDev (const bool &)
 
template<typename T >
__hostdev__ void setOrigin (const T &ijk)
 
__hostdev__ uint64_t lastOffset () const
 
__hostdev__ bool isMaskOn (uint32_t offset) const
 
__hostdev__ void setMask (uint32_t offset, bool v)
 
__hostdev__ uint64_t offset () const
 
__hostdev__ uint64_t pointCount () const
 
__hostdev__ uint64_t first (uint32_t i) const
 
__hostdev__ uint64_t last (uint32_t i) const
 
__hostdev__ void setValueOnly (uint32_t offset, uint16_t value)
 
__hostdev__ void setValue (uint32_t offset, uint16_t value)
 
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 SrcGridT , typename DstBuildT = typename MapToNano<typename SrcGridT::BuildType>::type, typename BufferT = HostBuffer>
disable_if< BuildTraits
< DstBuildT >::is_index||BuildTraits
< DstBuildT >::is_Fp,
GridHandle< BufferT > >::type 
createNanoGrid (const SrcGridT &srcGrid, StatsMode sMode=StatsMode::Default, ChecksumMode cMode=ChecksumMode::Default, int verbose=0, const BufferT &buffer=BufferT())
 Freestanding function that creates a NanoGrid<T> from any source grid. More...
 
template<typename SrcGridT , typename DstBuildT = typename MapToNano<typename SrcGridT::BuildType>::type, typename BufferT = HostBuffer>
enable_if< BuildTraits
< DstBuildT >::is_index,
GridHandle< BufferT > >::type 
createNanoGrid (const SrcGridT &srcGrid, uint32_t channels=0u, bool includeStats=true, bool includeTiles=true, int verbose=0, const BufferT &buffer=BufferT())
 Freestanding function that creates a NanoGrid<ValueIndex> or NanoGrid<ValueOnIndex> from any source grid. More...
 
template<typename SrcGridT , typename DstBuildT = typename MapToNano<typename SrcGridT::BuildType>::type, typename OracleT = AbsDiff, typename BufferT = HostBuffer>
enable_if< is_same< FpN,
DstBuildT >::value, GridHandle
< BufferT > >::type 
createNanoGrid (const SrcGridT &srcGrid, StatsMode sMode=StatsMode::Default, ChecksumMode cMode=ChecksumMode::Default, bool ditherOn=false, int verbose=0, const OracleT &oracle=OracleT(), const BufferT &buffer=BufferT())
 Freestanding function to create a NanoGrid<FpN> from any source grid. More...
 
template<typename SrcGridT , typename DstBuildT = typename MapToNano<typename SrcGridT::BuildType>::type, typename BufferT = HostBuffer>
enable_if< BuildTraits
< DstBuildT >::is_FpX,
GridHandle< BufferT > >::type 
createNanoGrid (const SrcGridT &srcGrid, StatsMode sMode=StatsMode::Default, ChecksumMode cMode=ChecksumMode::Default, bool ditherOn=false, int verbose=0, const BufferT &buffer=BufferT())
 Freestanding function to create a NanoGrid<FpX> from any source grid, X=4,8,16. More...
 
std::ostream & operator<< (std::ostream &os, const AbsDiff &diff)
 
std::ostream & operator<< (std::ostream &os, const RelDiff &diff)
 
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...
 
template<typename BuildT >
uint64_t checksum (const NanoGrid< BuildT > &grid, ChecksumMode mode=ChecksumMode::Default)
 Return the (2 x CRC32) checksum of the specified grid. More...
 
template<typename BuildT >
bool validateChecksum (const NanoGrid< BuildT > &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 BuildT >
void updateChecksum (NanoGrid< BuildT > &grid, ChecksumMode mode=ChecksumMode::Default)
 Updates the checksum of a grid. More...
 
template<typename ValueT >
uint64_t checksum (const NanoGrid< ValueT > &grid, ChecksumMode mode)
 
template<typename ValueT >
bool validateChecksum (const NanoGrid< ValueT > &grid, ChecksumMode mode)
 
template<typename ValueT >
void updateChecksum (NanoGrid< ValueT > &grid, ChecksumMode mode)
 
bool updateChecksum (GridData &gridData, ChecksumMode mode)
 
bool updateChecksum (GridData *data)
 Preserve the existing mode of the checksum and update it if it's not disabled. More...
 
bool updateGridCount (GridData *data, uint32_t gridIndex, uint32_t gridCount)
 Updates the ground index and count, as well as the partial checksum if needed. More...
 
template<typename BufferT , template< class, class...> class VectorT = std::vector>
VectorT< GridHandle< BufferT > > splitGrids (const GridHandle< BufferT > &handle, const BufferT *other=nullptr)
 Split all grids in a single GridHandle into a vector of multiple GridHandles each with a single grid. More...
 
template<typename BufferT , template< class, class...> class VectorT>
GridHandle< BufferT > mergeGrids (const VectorT< GridHandle< BufferT >> &handles, const BufferT *pool=nullptr)
 Combines (or merges) multiple GridHandles into a single GridHandle containing all grids. 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 BuildT >
Extrema< typename NanoGrid
< BuildT >::ValueType
getExtrema (const NanoGrid< BuildT > &grid, const CoordBBox &bbox)
 return the extrema of all the values in a grid that intersects the specified bounding box. 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 T >
std::ostream & operator<< (std::ostream &os, const BBox< Vec3< T >> &b)
 
std::ostream & operator<< (std::ostream &os, const CoordBBox &b)
 
std::ostream & operator<< (std::ostream &os, const Coord &ijk)
 
template<typename T >
std::ostream & operator<< (std::ostream &os, const Vec3< T > &v)
 
template<typename T >
std::ostream & operator<< (std::ostream &os, const Vec4< T > &v)
 
template<typename NanoBuildT >
openvdb::Grid< typename
openvdb::tree::Tree4< typename
ConvertTrait< NanoBuildT >
::Type >::Type >::Ptr 
nanoToOpenVDB (const NanoGrid< NanoBuildT > &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, uint32_t n=0)
 Forward declaration of free-standing function that de-serializes a NanoVDB GridHandle into an OpenVDB GridBase. More...
 
template<typename BuildT , typename BufferT = HostBuffer>
NodeManagerHandle< BufferT > createNodeManager (const NanoGrid< BuildT > &grid, const BufferT &buffer=BufferT())
 brief Construct a NodeManager and return its handle More...
 
template<typename T , typename OpT = std::plus<T>>
prefixSum (std::vector< T > &vec, bool threaded=true, OpT op=OpT())
 Computes inclusive prefix sum of a vector. More...
 
template<typename T , typename Op >
void inclusiveScan (T *array, size_t size, const T &identity, bool threaded, Op op)
 An inclusive scan includes in[i] when computing out[i]. More...
 
template<typename BuildT = float, typename BufferT = HostBuffer>
enable_if< is_same< float,
BuildT >::value||is_same
< double, BuildT >::value,
GridHandle< BufferT > >::type 
createLevelSetSphere (double radius=100.0, const Vec3d &center=Vec3d(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, const BufferT &buffer=BufferT())
 Returns a handle to a narrow-band level set of a sphere. More...
 
template<typename BuildT , typename BufferT = HostBuffer>
enable_if< is_same< Fp4,
BuildT >::value||is_same< Fp8,
BuildT >::value||is_same< Fp16,
BuildT >::value, GridHandle
< BufferT > >::type 
createLevelSetSphere (double radius=100.0, const Vec3d &center=Vec3d(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, bool ditherOn=false, const BufferT &buffer=BufferT())
 
template<typename BuildT , typename BufferT = HostBuffer>
enable_if< is_same< FpN,
BuildT >::value, GridHandle
< BufferT > >::type 
createLevelSetSphere (double radius=100.0, const Vec3d &center=Vec3d(0), double voxelSize=1.0, double halfWidth=3.0, const Vec3d &origin=Vec3d(0), const std::string &name="sphere_ls_FpN", StatsMode sMode=StatsMode::Default, ChecksumMode cMode=ChecksumMode::Default, float tolerance=-1.0f, bool ditherOn=false, const BufferT &buffer=BufferT())
 
template<typename BuildT = float, typename BufferT = HostBuffer>
disable_if< is_same< FpN,
BuildT >::value, GridHandle
< BufferT > >::type 
createFogVolumeSphere (double radius=100.0, const Vec3d &center=Vec3d(0.0), double voxelSize=1.0, double halfWidth=3.0, const Vec3d &origin=Vec3d(0.0), const std::string &name="sphere_fog", StatsMode sMode=StatsMode::Default, ChecksumMode cMode=ChecksumMode::Default, 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 BuildT , typename BufferT = HostBuffer>
enable_if< is_same< FpN,
BuildT >::value, GridHandle
< BufferT > >::type 
createFogVolumeSphere (double radius=100.0, const Vec3d &center=Vec3d(0.0), double voxelSize=1.0, double halfWidth=3.0, 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())
 
template<typename BuildT = float, typename BufferT = HostBuffer>
disable_if< is_same< FpN,
BuildT >::value, GridHandle
< BufferT > >::type 
createPointSphere (int pointsPerVoxel=1, double radius=100.0, const Vec3d &center=Vec3d(0.0), double voxelSize=1.0, 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 BuildT = float, typename BufferT = HostBuffer>
disable_if< is_same< FpN,
BuildT >::value, GridHandle
< BufferT > >::type 
createLevelSetTorus (double majorRadius=100.0, double minorRadius=50.0, const Vec3d &center=Vec3d(0.0), 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, const BufferT &buffer=BufferT())
 Returns a handle to a narrow-band level set of a torus in the xz-plane. More...
 
template<typename BuildT , typename BufferT = HostBuffer>
enable_if< is_same< FpN,
BuildT >::value, GridHandle
< BufferT > >::type 
createLevelSetTorus (double majorRadius=100.0, double minorRadius=50.0, const Vec3d &center=Vec3d(0.0), 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())
 
template<typename BuildT = float, typename BufferT = HostBuffer>
disable_if< is_same< FpN,
BuildT >::value, GridHandle
< BufferT > >::type 
createFogVolumeTorus (double majorRadius=100.0, double minorRadius=50.0, const Vec3d &center=Vec3d(0.0), double voxelSize=1.0, double halfWidth=3.0, const Vec3d &origin=Vec3d(0.0), const std::string &name="torus_fog", StatsMode sMode=StatsMode::Default, ChecksumMode cMode=ChecksumMode::Default, 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 BuildT , typename BufferT = HostBuffer>
enable_if< is_same< FpN,
BuildT >::value, GridHandle
< BufferT > >::type 
createFogVolumeTorus (double majorRadius=100.0, double minorRadius=50.0, const Vec3d &center=Vec3d(0.0), double voxelSize=1.0, double halfWidth=3.0, const Vec3d &origin=Vec3d(0.0), const std::string &name="torus_fog_FpN", StatsMode sMode=StatsMode::Default, ChecksumMode cMode=ChecksumMode::Default, float tolerance=-1.0f, bool ditherOn=false, const BufferT &buffer=BufferT())
 
template<typename BuildT = float, typename BufferT = HostBuffer>
disable_if< is_same< FpN,
BuildT >::value, GridHandle
< BufferT > >::type 
createPointTorus (int pointsPerVoxel=1, double majorRadius=100.0, double minorRadius=50.0, const Vec3d &center=Vec3d(0.0), 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 BuildT = float, typename BufferT = HostBuffer>
disable_if< is_same< FpN,
BuildT >::value, GridHandle
< BufferT > >::type 
createLevelSetBox (double width=40.0, double height=60.0, double depth=100.0, const Vec3d &center=Vec3d(0.0), 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, const BufferT &buffer=BufferT())
 Returns a handle to a narrow-band level set of a box. More...
 
template<typename BuildT , typename BufferT = HostBuffer>
enable_if< is_same< FpN,
BuildT >::value, GridHandle
< BufferT > >::type 
createLevelSetBox (double width=40.0, double height=60.0, double depth=100.0, const Vec3d &center=Vec3d(0.0), double voxelSize=1.0, double halfWidth=3.0, const Vec3d &origin=Vec3d(0.0), const std::string &name="box_ls_FpN", StatsMode sMode=StatsMode::Default, ChecksumMode cMode=ChecksumMode::Default, float tolerance=-1.0f, bool ditherOn=false, const BufferT &buffer=BufferT())
 
template<typename BuildT = float, typename BufferT = HostBuffer>
disable_if< is_same< FpN,
BuildT >::value, GridHandle
< BufferT > >::type 
createFogVolumeBox (double width=40.0, double height=60.0, double depth=100.0, const Vec3d &center=Vec3d(0.0), 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, 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 BuildT , typename BufferT = HostBuffer>
enable_if< is_same< FpN,
BuildT >::value, GridHandle
< BufferT > >::type 
createFogVolumeBox (double width=40.0, double height=60.0, double depth=100.0, const Vec3d &center=Vec3d(0.0), double voxelSize=1.0, double halfWidth=3.0, const Vec3d &origin=Vec3d(0.0), const std::string &name="box_fog_FpN", StatsMode sMode=StatsMode::Default, ChecksumMode cMode=ChecksumMode::Default, float tolerance=-1.0f, bool ditherOn=false, const BufferT &buffer=BufferT())
 
template<typename BuildT = float, typename BufferT = HostBuffer>
disable_if< is_same< FpN,
BuildT >::value, GridHandle
< BufferT > >::type 
createLevelSetOctahedron (double scale=100.0, const Vec3d &center=Vec3d(0.0), 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, const BufferT &buffer=BufferT())
 Returns a handle to a narrow-band level set of a octahedron. More...
 
template<typename BuildT , typename BufferT = HostBuffer>
enable_if< is_same< FpN,
BuildT >::value, GridHandle
< BufferT > >::type 
createLevelSetOctahedron (double scale=100.0, const Vec3d &center=Vec3d(0.0), double voxelSize=1.0, double halfWidth=3.0, const Vec3d &origin=Vec3d(0.0), const std::string &name="octadedron_ls_FpN", StatsMode sMode=StatsMode::Default, ChecksumMode cMode=ChecksumMode::Default, float tolerance=-1.0f, bool ditherOn=false, const BufferT &buffer=BufferT())
 
template<typename BuildT = float, typename BufferT = HostBuffer>
disable_if< is_same< FpN,
BuildT >::value, GridHandle
< BufferT > >::type 
createFogVolumeOctahedron (double scale=100.0, const Vec3d &center=Vec3d(0.0), 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, 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 BuildT , typename BufferT = HostBuffer>
enable_if< is_same< FpN,
BuildT >::value, GridHandle
< BufferT > >::type 
createFogVolumeOctahedron (double scale=100.0, const Vec3d &center=Vec3d(0.0), double voxelSize=1.0, double halfWidth=3.0, const Vec3d &origin=Vec3d(0.0), const std::string &name="octadedron_fog_FpN", StatsMode sMode=StatsMode::Default, ChecksumMode cMode=ChecksumMode::Default, float tolerance=-1.0f, bool ditherOn=false, const BufferT &buffer=BufferT())
 
template<typename BuildT = float, typename BufferT = HostBuffer>
disable_if< is_same< FpN,
BuildT >::value, GridHandle
< BufferT > >::type 
createLevelSetBBox (double width=40.0, double height=60.0, double depth=100.0, double thickness=10.0, const Vec3d &center=Vec3d(0.0), 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, const BufferT &buffer=BufferT())
 Returns a handle to a narrow-band level set of a bounding-box (= wireframe of a box) More...
 
template<typename BuildT , typename BufferT = HostBuffer>
enable_if< is_same< FpN,
BuildT >::value, GridHandle
< BufferT > >::type 
createLevelSetBBox (double width=40.0, double height=60.0, double depth=100.0, double thickness=10.0, const Vec3d &center=Vec3d(0.0), double voxelSize=1.0, double halfWidth=3.0, const Vec3d &origin=Vec3d(0.0), const std::string &name="bbox_ls_FpN", StatsMode sMode=StatsMode::Default, ChecksumMode cMode=ChecksumMode::Default, float tolerance=-1.0f, bool ditherOn=false, const BufferT &buffer=BufferT())
 
template<typename BuildT = float, typename BufferT = HostBuffer>
disable_if< is_same< FpN,
BuildT >::value, GridHandle
< BufferT > >::type 
createPointBox (int pointsPerVoxel=1, double width=40.0, double height=60.0, double depth=100.0, const Vec3d &center=Vec3d(0.0), 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 SrcBuildT = float, typename BufferT = HostBuffer>
GridHandle< BufferT > createPointScatter (const NanoGrid< SrcBuildT > &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. Note, the coordinates of the points are encoded as blind data in world-space. 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>
__hostdev__ 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>
__hostdev__ CoordT Floor (Vec3T< RealT > &xyz)
 Utility function that returns the Coord of the round-down of xyz and redefined as the fractional part, ie xyz-in = return-value + xyz-out. More...
 
template<typename CoordT , template< typename > class Vec3T>
__hostdev__ CoordT Floor (Vec3T< float > &xyz)
 Template specialization of Floor for Vec3<float> More...
 
template<typename CoordT , template< typename > class Vec3T>
__hostdev__ CoordT Floor (Vec3T< double > &xyz)
 Template specialization of Floor for Vec3<float> More...
 
template<typename ValueType , typename RealT = ValueType>
__hostdev__ 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 >
__hostdev__ 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 >
__hostdev__ RealT GodunovsNormSqrd (bool isOutside, const Vec3< RealT > &gradient_m, const Vec3< RealT > &gradient_p)
 
template<typename T >
__hostdev__ constexpr T pi ()
 Pi constant taken from Boost to match old behaviour. More...
 
template<>
__hostdev__ constexpr float pi ()
 Pi constant taken from Boost to match old behaviour. More...
 
template<>
__hostdev__ constexpr double pi ()
 Pi constant taken from Boost to match old behaviour. More...
 
template<>
__hostdev__ constexpr long double pi ()
 Pi constant taken from Boost to match old behaviour. More...
 
__hostdev__ float Sqrt (float x)
 Return the square root of a floating-point value. More...
 
__hostdev__ double Sqrt (double x)
 Return the square root of a floating-point value. More...
 

Variables

uint8_t mCode [1u<< (3 *LOG2DIM-1)]
 
CoordT mBBoxMin
 
uint8_t mBBoxDif [3]
 
uint8_t mFlags
 
MaskT< LOG2DIM > mValueMask
 
MaskT< LOG2DIM > mValues
 
uint64_t mPadding [2]
 
MaskT< LOG2DIM > mMask
 
uint64_t mOffset
 
uint64_t mPointCount
 

Typedef Documentation

typedef uint16_t nanovdb::ArrayType

Definition at line 5566 of file NanoVDB.h.

using nanovdb::BaseT = typedef LeafFnBase<CoordT, MaskT, LOG2DIM>

Definition at line 5564 of file NanoVDB.h.

using nanovdb::BBoxR = typedef BBox<Vec3d>

Definition at line 2517 of file NanoVDB.h.

using nanovdb::BoolGrid = typedef Grid<BoolTree>

Definition at line 6504 of file NanoVDB.h.

using nanovdb::BoolTree = typedef NanoTree<bool>

Definition at line 6483 of file NanoVDB.h.

Definition at line 5565 of file NanoVDB.h.

using nanovdb::CoordBBox = typedef BBox<Coord>

Definition at line 2516 of file NanoVDB.h.

template<typename BuildT >
using nanovdb::DefaultReadAccessor = typedef ReadAccessor<BuildT, 0, 1, 2>

Definition at line 3678 of file NanoVDB.h.

Definition at line 6494 of file NanoVDB.h.

using nanovdb::DoubleTree = typedef NanoTree<double>

Definition at line 6473 of file NanoVDB.h.

using nanovdb::FloatGrid = typedef Grid<FloatTree>

Definition at line 6489 of file NanoVDB.h.

using nanovdb::FloatTree = typedef NanoTree<float>

Definition at line 6468 of file NanoVDB.h.

Definition at line 5731 of file NanoVDB.h.

using nanovdb::Fp16Grid = typedef Grid<Fp16Tree>

Definition at line 6492 of file NanoVDB.h.

using nanovdb::Fp16Tree = typedef NanoTree<Fp16>

Definition at line 6471 of file NanoVDB.h.

using nanovdb::Fp4Grid = typedef Grid<Fp4Tree>

Definition at line 6490 of file NanoVDB.h.

using nanovdb::Fp4Tree = typedef NanoTree<Fp4>

Definition at line 6469 of file NanoVDB.h.

using nanovdb::Fp8Grid = typedef Grid<Fp8Tree>

Definition at line 6491 of file NanoVDB.h.

using nanovdb::Fp8Tree = typedef NanoTree<Fp8>

Definition at line 6470 of file NanoVDB.h.

using nanovdb::FpNGrid = typedef Grid<FpNTree>

Definition at line 6493 of file NanoVDB.h.

using nanovdb::FpNTree = typedef NanoTree<FpN>

Definition at line 6472 of file NanoVDB.h.

using nanovdb::IndexGrid = typedef Grid<IndexTree>

Definition at line 6506 of file NanoVDB.h.

Definition at line 6508 of file NanoVDB.h.

Definition at line 6486 of file NanoVDB.h.

Definition at line 6484 of file NanoVDB.h.

using nanovdb::Int32Grid = typedef Grid<Int32Tree>

Definition at line 6495 of file NanoVDB.h.

using nanovdb::Int32Tree = typedef NanoTree<int32_t>

Definition at line 6474 of file NanoVDB.h.

using nanovdb::Int64Grid = typedef Grid<Int64Tree>

Definition at line 6497 of file NanoVDB.h.

using nanovdb::Int64Tree = typedef NanoTree<int64_t>

Definition at line 6476 of file NanoVDB.h.

using nanovdb::MaskGrid = typedef Grid<MaskTree>

Definition at line 6503 of file NanoVDB.h.

Definition at line 6482 of file NanoVDB.h.

template<typename BuildT >
using nanovdb::NanoGrid = typedef Grid<NanoTree<BuildT>>

Definition at line 6436 of file NanoVDB.h.

template<typename BuildT >
using nanovdb::NanoLeaf = typedef LeafNode<BuildT, Coord, Mask, 3>

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

Definition at line 6426 of file NanoVDB.h.

template<typename BuildT >
using nanovdb::NanoLower = typedef InternalNode<NanoLeaf<BuildT>, 4>

Definition at line 6428 of file NanoVDB.h.

template<typename BuildT >
using nanovdb::NanoRoot = typedef RootNode<NanoUpper<BuildT>>

Definition at line 6432 of file NanoVDB.h.

template<typename BuildT >
using nanovdb::NanoTree = typedef Tree<NanoRoot<BuildT>>

Definition at line 6434 of file NanoVDB.h.

template<typename BuildT >
using nanovdb::NanoUpper = typedef InternalNode<NanoLower<BuildT>, 5>

Definition at line 6430 of file NanoVDB.h.

Definition at line 6507 of file NanoVDB.h.

Definition at line 6509 of file NanoVDB.h.

Definition at line 6487 of file NanoVDB.h.

Definition at line 6485 of file NanoVDB.h.

using nanovdb::PackedRGBA8 = typedef Rgba8

Definition at line 1942 of file NanoVDB.h.

using nanovdb::PointGrid = typedef Grid<Point>

Definition at line 6505 of file NanoVDB.h.

using nanovdb::Range1D = typedef Range<1, size_t>

Definition at line 30 of file Range.h.

using nanovdb::Range2D = typedef Range<2, size_t>

Definition at line 31 of file Range.h.

using nanovdb::Range3D = typedef Range<3, size_t>

Definition at line 32 of file Range.h.

Definition at line 6496 of file NanoVDB.h.

using nanovdb::UInt32Tree = typedef NanoTree<uint32_t>

Definition at line 6475 of file NanoVDB.h.

typedef uint64_t nanovdb::ValueType
Examples:
SIM/GAS_NetVDBSliceExchange.C.

Definition at line 5729 of file NanoVDB.h.

using nanovdb::Vec3d = typedef Vec3<double>

Definition at line 1685 of file NanoVDB.h.

using nanovdb::Vec3dGrid = typedef Grid<Vec3dTree>

Definition at line 6499 of file NanoVDB.h.

using nanovdb::Vec3dTree = typedef NanoTree<Vec3d>

Definition at line 6478 of file NanoVDB.h.

using nanovdb::Vec3f = typedef Vec3<float>

Definition at line 1686 of file NanoVDB.h.

using nanovdb::Vec3fGrid = typedef Grid<Vec3fTree>

Definition at line 6498 of file NanoVDB.h.

using nanovdb::Vec3fTree = typedef NanoTree<Vec3f>

Definition at line 6477 of file NanoVDB.h.

using nanovdb::Vec3i = typedef Vec3<int32_t>

Definition at line 1687 of file NanoVDB.h.

using nanovdb::Vec3IGrid = typedef Grid<Vec3ITree>

Definition at line 6502 of file NanoVDB.h.

using nanovdb::Vec3ITree = typedef NanoTree<Vec3i>

Definition at line 6481 of file NanoVDB.h.

using nanovdb::Vec3u = typedef Vec3<uint32_t>

Definition at line 1688 of file NanoVDB.h.

using nanovdb::Vec3u16 = typedef Vec3<uint16_t>

Definition at line 1690 of file NanoVDB.h.

using nanovdb::Vec3u8 = typedef Vec3<uint8_t>

Definition at line 1689 of file NanoVDB.h.

using nanovdb::Vec4d = typedef Vec4<double>

Definition at line 1832 of file NanoVDB.h.

using nanovdb::Vec4dGrid = typedef Grid<Vec4dTree>

Definition at line 6501 of file NanoVDB.h.

using nanovdb::Vec4dTree = typedef NanoTree<Vec4d>

Definition at line 6480 of file NanoVDB.h.

using nanovdb::Vec4f = typedef Vec4<float>

Definition at line 1833 of file NanoVDB.h.

using nanovdb::Vec4fGrid = typedef Grid<Vec4fTree>

Definition at line 6500 of file NanoVDB.h.

using nanovdb::Vec4fTree = typedef NanoTree<Vec4f>

Definition at line 6479 of file NanoVDB.h.

using nanovdb::Vec4i = typedef Vec4<int>

Definition at line 1834 of file NanoVDB.h.

using nanovdb::Vec4R = typedef Vec4<double>

Definition at line 1831 of file NanoVDB.h.

Enumeration Type Documentation

enum nanovdb::ChecksumMode : uint32_t
strong

List of different modes for computing for a checksum.

Enumerator
Disable 
Partial 
Full 
Default 
End 

Definition at line 38 of file GridChecksum.h.

enum nanovdb::GridBlindDataClass : uint32_t
strong

Blind-data Classes that are currently supported by NanoVDB.

Enumerator
Unknown 
IndexArray 
AttributeArray 
GridName 
ChannelArray 
End 

Definition at line 393 of file NanoVDB.h.

enum nanovdb::GridBlindDataSemantic : uint32_t
strong

Blind-data Semantics that are currently understood by NanoVDB.

Enumerator
Unknown 
PointPosition 
PointColor 
PointNormal 
PointRadius 
PointVelocity 
PointId 
WorldCoords 
GridCoords 
VoxelCoords 
End 

Definition at line 401 of file NanoVDB.h.

enum nanovdb::GridClass : uint32_t
strong

Classes (superset of OpenVDB) that are currently supported by NanoVDB.

Enumerator
Unknown 
LevelSet 
FogVolume 
Staggered 
PointIndex 
PointData 
Topology 
VoxelVolume 
IndexGrid 
TensorGrid 
End 

Definition at line 339 of file NanoVDB.h.

enum nanovdb::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 

Definition at line 364 of file NanoVDB.h.

enum nanovdb::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 
Index 
OnIndex 
IndexMask 
OnIndexMask 
PointIndex 
Vec3u8 
Vec3u16 
End 
Examples:
SIM/GAS_NetVDBSliceExchange.C.

Definition at line 294 of file NanoVDB.h.

enum nanovdb::StatsMode : uint32_t
strong

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

Enumerator
Disable 
BBox 
MinMax 
All 
Default 
End 

Definition at line 38 of file GridStats.h.

Function Documentation

template<typename T >
__hostdev__ T nanovdb::Abs ( x)
inline

Definition at line 1166 of file NanoVDB.h.

template<>
__hostdev__ float nanovdb::Abs ( float  x)
inline

Definition at line 1172 of file NanoVDB.h.

template<>
__hostdev__ double nanovdb::Abs ( double  x)
inline

Definition at line 1178 of file NanoVDB.h.

template<>
__hostdev__ int nanovdb::Abs ( int  x)
inline

Definition at line 1184 of file NanoVDB.h.

template<uint64_t wordSize>
__hostdev__ 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

Definition at line 1269 of file NanoVDB.h.

__hostdev__ int32_t nanovdb::Ceil ( float  x)
inline

Definition at line 1139 of file NanoVDB.h.

__hostdev__ int32_t nanovdb::Ceil ( double  x)
inline

Definition at line 1143 of file NanoVDB.h.

template<typename BuildT >
uint64_t nanovdb::checksum ( const NanoGrid< BuildT > &  grid,
ChecksumMode  mode = ChecksumMode::Default 
)

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

Template Parameters
BuildTTemplate parameter used to build NanoVDB grid.
Parameters
gridGrid from which the checksum is computed.
modeDefines the mode of computation for the checksum.
Returns
Return the (2 x CRC32) checksum of the specified grid
template<typename ValueT >
uint64_t nanovdb::checksum ( const NanoGrid< ValueT > &  grid,
ChecksumMode  mode 
)

Definition at line 327 of file GridChecksum.h.

__hostdev__ float nanovdb::Clamp ( float  x,
float  a,
float  b 
)
inline

Definition at line 1112 of file NanoVDB.h.

__hostdev__ double nanovdb::Clamp ( double  x,
double  a,
double  b 
)
inline

Definition at line 1116 of file NanoVDB.h.

NANOVDB_HOSTDEV_DISABLE_WARNING __hostdev__ uint32_t nanovdb::CountOn ( uint64_t  v)
inline
Returns
Number of bits that are on in the specified 64-bit word

Definition at line 2643 of file NanoVDB.h.

template<int LEVEL0 = -1, int LEVEL1 = -1, int LEVEL2 = -1, typename ValueT = float>
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

Definition at line 7474 of file NanoVDB.h.

template<int LEVEL0 = -1, int LEVEL1 = -1, int LEVEL2 = -1, typename ValueT = float>
ReadAccessor<ValueT, LEVEL0, LEVEL1, LEVEL2> nanovdb::createAccessor ( const NanoTree< ValueT > &  tree)

Definition at line 7480 of file NanoVDB.h.

template<int LEVEL0 = -1, int LEVEL1 = -1, int LEVEL2 = -1, typename ValueT = float>
ReadAccessor<ValueT, LEVEL0, LEVEL1, LEVEL2> nanovdb::createAccessor ( const NanoRoot< ValueT > &  root)

Definition at line 7486 of file NanoVDB.h.

template<typename BuildT = float, typename BufferT = HostBuffer>
disable_if< is_same< FpN, BuildT >::value, GridHandle< BufferT > >::type nanovdb::createFogVolumeBox ( double  width = 40.0,
double  height = 60.0,
double  depth = 100.0,
const Vec3d &  center = Vec3d(0.0),
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,
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.

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 BuildT template parameter must be one of the following: float (default), double, Fp4, Fp8, Fp16 or FpN. The tolerance argument is only used when BuildT is set to FpN.

Definition at line 1522 of file Primitives.h.

template<typename BuildT , typename BufferT = HostBuffer>
enable_if< is_same< FpN, BuildT >::value, GridHandle< BufferT > >::type nanovdb::createFogVolumeBox ( double  width = 40.0,
double  height = 60.0,
double  depth = 100.0,
const Vec3d &  center = Vec3d(0.0),
double  voxelSize = 1.0,
double  halfWidth = 3.0,
const Vec3d &  origin = Vec3d(0.0),
const std::string name = "box_fog_FpN",
StatsMode  sMode = StatsMode::Default,
ChecksumMode  cMode = ChecksumMode::Default,
float  tolerance = -1.0f,
bool  ditherOn = false,
const BufferT &  buffer = BufferT() 
)

Definition at line 1552 of file Primitives.h.

template<typename BuildT = float, typename BufferT = HostBuffer>
disable_if< is_same< FpN, BuildT >::value, GridHandle< BufferT > >::type nanovdb::createFogVolumeOctahedron ( double  scale = 100.0,
const Vec3d &  center = Vec3d(0.0),
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,
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.

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 BuildT template parameter must be one of the following: float (default), double, Fp4, Fp8, Fp16 or FpN. The tolerance argument is only used when BuildT is set to FpN.

Definition at line 1586 of file Primitives.h.

template<typename BuildT , typename BufferT = HostBuffer>
enable_if< is_same< FpN, BuildT >::value, GridHandle< BufferT > >::type nanovdb::createFogVolumeOctahedron ( double  scale = 100.0,
const Vec3d &  center = Vec3d(0.0),
double  voxelSize = 1.0,
double  halfWidth = 3.0,
const Vec3d &  origin = Vec3d(0.0),
const std::string name = "octadedron_fog_FpN",
StatsMode  sMode = StatsMode::Default,
ChecksumMode  cMode = ChecksumMode::Default,
float  tolerance = -1.0f,
bool  ditherOn = false,
const BufferT &  buffer = BufferT() 
)

Definition at line 1614 of file Primitives.h.

template<typename BuildT = float, typename BufferT = HostBuffer>
disable_if< is_same< FpN, BuildT >::value, GridHandle< BufferT > >::type nanovdb::createFogVolumeSphere ( double  radius = 100.0,
const Vec3d &  center = Vec3d(0.0),
double  voxelSize = 1.0,
double  halfWidth = 3.0,
const Vec3d &  origin = Vec3d(0.0),
const std::string name = "sphere_fog",
StatsMode  sMode = StatsMode::Default,
ChecksumMode  cMode = ChecksumMode::Default,
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.

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 BuildT = {Fp4,Fp8,Fp16,FpN}
bufferBuffer used for memory allocation by the handle

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

Definition at line 1109 of file Primitives.h.

template<typename BuildT , typename BufferT = HostBuffer>
enable_if< is_same< FpN, BuildT >::value, GridHandle< BufferT > >::type nanovdb::createFogVolumeSphere ( double  radius = 100.0,
const Vec3d &  center = Vec3d(0.0),
double  voxelSize = 1.0,
double  halfWidth = 3.0,
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() 
)

Definition at line 1137 of file Primitives.h.

template<typename BuildT = float, typename BufferT = HostBuffer>
disable_if< is_same< FpN, BuildT >::value, GridHandle< BufferT > >::type nanovdb::createFogVolumeTorus ( double  majorRadius = 100.0,
double  minorRadius = 50.0,
const Vec3d &  center = Vec3d(0.0),
double  voxelSize = 1.0,
double  halfWidth = 3.0,
const Vec3d &  origin = Vec3d(0.0),
const std::string name = "torus_fog",
StatsMode  sMode = StatsMode::Default,
ChecksumMode  cMode = ChecksumMode::Default,
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.

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 BuildT template parameter must be one of the following: float (default), double, Fp4, Fp8, Fp16 or FpN. The tolerance argument is only used when BuildT is set to FpN.

Definition at line 1252 of file Primitives.h.

template<typename BuildT , typename BufferT = HostBuffer>
enable_if< is_same< FpN, BuildT >::value, GridHandle< BufferT > >::type nanovdb::createFogVolumeTorus ( double  majorRadius = 100.0,
double  minorRadius = 50.0,
const Vec3d &  center = Vec3d(0.0),
double  voxelSize = 1.0,
double  halfWidth = 3.0,
const Vec3d &  origin = Vec3d(0.0),
const std::string name = "torus_fog_FpN",
StatsMode  sMode = StatsMode::Default,
ChecksumMode  cMode = ChecksumMode::Default,
float  tolerance = -1.0f,
bool  ditherOn = false,
const BufferT &  buffer = BufferT() 
)

Definition at line 1281 of file Primitives.h.

template<typename BuildT = float, typename BufferT = HostBuffer>
disable_if< is_same< FpN, BuildT >::value, GridHandle< BufferT > >::type nanovdb::createLevelSetBBox ( double  width = 40.0,
double  height = 60.0,
double  depth = 100.0,
double  thickness = 10.0,
const Vec3d &  center = Vec3d(0.0),
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,
const BufferT &  buffer = BufferT() 
)

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 BuildT template parameter must be one of the following: float (default), double, Fp4, Fp8, Fp16 or FpN. The tolerance argument is only used when BuildT is set to FpN.

Definition at line 1458 of file Primitives.h.

template<typename BuildT , typename BufferT = HostBuffer>
enable_if< is_same< FpN, BuildT >::value, GridHandle< BufferT > >::type nanovdb::createLevelSetBBox ( double  width = 40.0,
double  height = 60.0,
double  depth = 100.0,
double  thickness = 10.0,
const Vec3d &  center = Vec3d(0.0),
double  voxelSize = 1.0,
double  halfWidth = 3.0,
const Vec3d &  origin = Vec3d(0.0),
const std::string name = "bbox_ls_FpN",
StatsMode  sMode = StatsMode::Default,
ChecksumMode  cMode = ChecksumMode::Default,
float  tolerance = -1.0f,
bool  ditherOn = false,
const BufferT &  buffer = BufferT() 
)

Definition at line 1488 of file Primitives.h.

template<typename BuildT = float, typename BufferT = HostBuffer>
disable_if< is_same< FpN, BuildT >::value, GridHandle< BufferT > >::type nanovdb::createLevelSetBox ( double  width = 40.0,
double  height = 60.0,
double  depth = 100.0,
const Vec3d &  center = Vec3d(0.0),
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,
const BufferT &  buffer = BufferT() 
)

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 BuildT template parameter must be one of the following: float (default), double, Fp4, Fp8, Fp16 or FpN. The tolerance argument is only used when BuildT is set to FpN.

Definition at line 1338 of file Primitives.h.

template<typename BuildT , typename BufferT = HostBuffer>
enable_if< is_same< FpN, BuildT >::value, GridHandle< BufferT > >::type nanovdb::createLevelSetBox ( double  width = 40.0,
double  height = 60.0,
double  depth = 100.0,
const Vec3d &  center = Vec3d(0.0),
double  voxelSize = 1.0,
double  halfWidth = 3.0,
const Vec3d &  origin = Vec3d(0.0),
const std::string name = "box_ls_FpN",
StatsMode  sMode = StatsMode::Default,
ChecksumMode  cMode = ChecksumMode::Default,
float  tolerance = -1.0f,
bool  ditherOn = false,
const BufferT &  buffer = BufferT() 
)

Definition at line 1367 of file Primitives.h.

template<typename BuildT = float, typename BufferT = HostBuffer>
disable_if< is_same< FpN, BuildT >::value, GridHandle< BufferT > >::type nanovdb::createLevelSetOctahedron ( double  scale = 100.0,
const Vec3d &  center = Vec3d(0.0),
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,
const BufferT &  buffer = BufferT() 
)

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 BuildT template parameter must be one of the following: float (default), double, Fp4, Fp8, Fp16 or FpN. The tolerance argument is only used when BuildT is set to FpN.

Definition at line 1400 of file Primitives.h.

template<typename BuildT , typename BufferT = HostBuffer>
enable_if< is_same< FpN, BuildT >::value, GridHandle< BufferT > >::type nanovdb::createLevelSetOctahedron ( double  scale = 100.0,
const Vec3d &  center = Vec3d(0.0),
double  voxelSize = 1.0,
double  halfWidth = 3.0,
const Vec3d &  origin = Vec3d(0.0),
const std::string name = "octadedron_ls_FpN",
StatsMode  sMode = StatsMode::Default,
ChecksumMode  cMode = ChecksumMode::Default,
float  tolerance = -1.0f,
bool  ditherOn = false,
const BufferT &  buffer = BufferT() 
)

Definition at line 1427 of file Primitives.h.

template<typename BuildT = float, typename BufferT = HostBuffer>
enable_if< is_same< float, BuildT >::value||is_same< double, BuildT >::value, GridHandle< BufferT > >::type nanovdb::createLevelSetSphere ( double  radius = 100.0,
const Vec3d &  center = Vec3d(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,
const BufferT &  buffer = BufferT() 
)

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 BuildT template parameter must be one of the following: float (default), double, Fp4, Fp8, Fp16 or FpN. The tolerance argument is only used when BuildT is set to FpN.

Definition at line 1020 of file Primitives.h.

template<typename BuildT , typename BufferT = HostBuffer>
enable_if< is_same< Fp4, BuildT >::value||is_same< Fp8, BuildT >::value||is_same< Fp16, BuildT >::value, GridHandle< BufferT > >::type nanovdb::createLevelSetSphere ( double  radius = 100.0,
const Vec3d &  center = Vec3d(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,
bool  ditherOn = false,
const BufferT &  buffer = BufferT() 
)

Definition at line 1049 of file Primitives.h.

template<typename BuildT , typename BufferT = HostBuffer>
enable_if< is_same< FpN, BuildT >::value, GridHandle< BufferT > >::type nanovdb::createLevelSetSphere ( double  radius = 100.0,
const Vec3d &  center = Vec3d(0),
double  voxelSize = 1.0,
double  halfWidth = 3.0,
const Vec3d &  origin = Vec3d(0),
const std::string name = "sphere_ls_FpN",
StatsMode  sMode = StatsMode::Default,
ChecksumMode  cMode = ChecksumMode::Default,
float  tolerance = -1.0f,
bool  ditherOn = false,
const BufferT &  buffer = BufferT() 
)

Definition at line 1078 of file Primitives.h.

template<typename BuildT = float, typename BufferT = HostBuffer>
disable_if< is_same< FpN, BuildT >::value, GridHandle< BufferT > >::type nanovdb::createLevelSetTorus ( double  majorRadius = 100.0,
double  minorRadius = 50.0,
const Vec3d &  center = Vec3d(0.0),
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,
const BufferT &  buffer = BufferT() 
)

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 BuildT template parameter must be one of the following: float (default), double, Fp4, Fp8, Fp16 or FpN. The tolerance argument is only used when BuildT is set to FpN.

Definition at line 1192 of file Primitives.h.

template<typename BuildT , typename BufferT = HostBuffer>
enable_if< is_same< FpN, BuildT >::value, GridHandle< BufferT > >::type nanovdb::createLevelSetTorus ( double  majorRadius = 100.0,
double  minorRadius = 50.0,
const Vec3d &  center = Vec3d(0.0),
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() 
)

Definition at line 1220 of file Primitives.h.

template<typename SrcGridT , typename DstBuildT = typename MapToNano<typename SrcGridT::BuildType>::type, typename BufferT = HostBuffer>
disable_if< BuildTraits< DstBuildT >::is_index||BuildTraits< DstBuildT >::is_Fp, GridHandle< BufferT > >::type nanovdb::createNanoGrid ( const SrcGridT &  srcGrid,
StatsMode  sMode = StatsMode::Default,
ChecksumMode  cMode = ChecksumMode::Default,
int  verbose = 0,
const BufferT &  buffer = BufferT() 
)

Freestanding function that creates a NanoGrid<T> from any source grid.

Template Parameters
SrcGridTType of in input (source) grid, e.g. openvdb::Grid or nanovdb::Grid
DstBuildTType of values in the output (destination) nanovdb Grid, e.g. float or nanovdb::Fp16
BufferTType of the buffer used ti allocate the destination grid
Parameters
srcGridInput (source) grid to be converted
sModeMode for computing statistics of the destination grid
cModeMode for computing checksums of the destination grid
verboseMode of verbosity
bufferInstance of a buffer used for allocation
Returns
Handle to the destination NanoGrid

Definition at line 1946 of file CreateNanoGrid.h.

template<typename SrcGridT , typename DstBuildT = typename MapToNano<typename SrcGridT::BuildType>::type, typename BufferT = HostBuffer>
enable_if< BuildTraits< DstBuildT >::is_index, GridHandle< BufferT > >::type nanovdb::createNanoGrid ( const SrcGridT &  srcGrid,
uint32_t  channels = 0u,
bool  includeStats = true,
bool  includeTiles = true,
int  verbose = 0,
const BufferT &  buffer = BufferT() 
)

Freestanding function that creates a NanoGrid<ValueIndex> or NanoGrid<ValueOnIndex> from any source grid.

Template Parameters
SrcGridTType of in input (source) grid, e.g. openvdb::Grid or nanovdb::Grid
DstBuildTIf ValueIndex all (active and inactive) values are indexed and if it is ValueOnIndex only active values are indexed.
BufferTBufferT Type of the buffer used ti allocate the destination grid
Parameters
channelsIf non-zero the values (active or all) in srcGrid are encoded as blind data in the output index grid. channels indicates the number of copies of these blind data
includeStatsIf true all tree nodes will includes indices for stats, i.e. min/max/avg/std-div
includeTilesIf false on values in leaf nodes are indexed
verboseMode of verbosity
bufferInstance of a buffer used for allocation
Returns
Handle to the destination NanoGrid<T> where T = ValueIndex or ValueOnIndex

Definition at line 1963 of file CreateNanoGrid.h.

template<typename SrcGridT , typename DstBuildT = typename MapToNano<typename SrcGridT::BuildType>::type, typename OracleT = AbsDiff, typename BufferT = HostBuffer>
enable_if< is_same< FpN, DstBuildT >::value, GridHandle< BufferT > >::type nanovdb::createNanoGrid ( const SrcGridT &  srcGrid,
StatsMode  sMode = StatsMode::Default,
ChecksumMode  cMode = ChecksumMode::Default,
bool  ditherOn = false,
int  verbose = 0,
const OracleT &  oracle = OracleT(),
const BufferT &  buffer = BufferT() 
)

Freestanding function to create a NanoGrid<FpN> from any source grid.

Template Parameters
SrcGridTType of in input (source) grid, e.g. openvdb::Grid or nanovdb::Grid
DstBuildT= FpN, i.e. variable bit-width of the output grid
OracleTType of the oracle used to determine the local bit-width, i.e. N in FpN
BufferTType of the buffer used to allocate the destination grid
Parameters
srcGridInput (source) grid to be converted
ditherOnswitch to enable or disable dithering of quantization error
sModeMode for computing statistics of the destination grid
cModeMode for computing checksums of the destination grid
verboseMode of verbosity
oracleInstance of a oracle used to determine the local bit-width, i.e. N in FpN
bufferInstance of a buffer used for allocation
Returns
Handle to the destination NanoGrid

Definition at line 1979 of file CreateNanoGrid.h.

template<typename SrcGridT , typename DstBuildT = typename MapToNano<typename SrcGridT::BuildType>::type, typename BufferT = HostBuffer>
enable_if< BuildTraits< DstBuildT >::is_FpX, GridHandle< BufferT > >::type nanovdb::createNanoGrid ( const SrcGridT &  srcGrid,
StatsMode  sMode = StatsMode::Default,
ChecksumMode  cMode = ChecksumMode::Default,
bool  ditherOn = false,
int  verbose = 0,
const BufferT &  buffer = BufferT() 
)

Freestanding function to create a NanoGrid<FpX> from any source grid, X=4,8,16.

Template Parameters
SrcGridTType of in input (source) grid, e.g. openvdb::Grid or nanovdb::Grid
DstBuildT= Fp4, Fp8 or Fp16, i.e. quantization bit-width of the output grid
BufferTType of the buffer used to allocate the destination grid
Parameters
srcGridInput (source) grid to be converted
ditherOnswitch to enable or disable dithering of quantization error
sModeMode for computing statistics of the destination grid
cModeMode for computing checksums of the destination grid
verboseMode of verbosity
bufferInstance of a buffer used for allocation
Returns
Handle to the destination NanoGrid

Definition at line 1999 of file CreateNanoGrid.h.

template<typename BuildT , typename BufferT = HostBuffer>
NodeManagerHandle< BufferT > nanovdb::createNodeManager ( const NanoGrid< BuildT > &  grid,
const BufferT &  buffer = BufferT() 
)

brief Construct a NodeManager and return its handle

Parameters
gridgrid whose nodes will be accessed sequentially
bufferbuffer from which to allocate the output handle
Note
This is the only way to create a NodeManager since it's using managed memory pointed to by a NodeManagerHandle.

Definition at line 284 of file NodeManager.h.

template<typename BuildT = float, typename BufferT = HostBuffer>
disable_if< is_same< FpN, BuildT >::value, GridHandle< BufferT > >::type nanovdb::createPointBox ( int  pointsPerVoxel = 1,
double  width = 40.0,
double  height = 60.0,
double  depth = 100.0,
const Vec3d &  center = Vec3d(0.0),
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.

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

Definition at line 1646 of file Primitives.h.

template<typename SrcBuildT = float, typename BufferT = HostBuffer>
GridHandle< BufferT > nanovdb::createPointScatter ( const NanoGrid< SrcBuildT > &  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. Note, the coordinates of the points are encoded as blind data in world-space.

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

Definition at line 1671 of file Primitives.h.

template<typename BuildT = float, typename BufferT = HostBuffer>
disable_if< is_same< FpN, BuildT >::value, GridHandle< BufferT > >::type nanovdb::createPointSphere ( int  pointsPerVoxel = 1,
double  radius = 100.0,
const Vec3d &  center = Vec3d(0.0),
double  voxelSize = 1.0,
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.

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 BuildT template parameter must be float (default) or double.

Definition at line 1169 of file Primitives.h.

template<typename BuildT = float, typename BufferT = HostBuffer>
disable_if< is_same< FpN, BuildT >::value, GridHandle< BufferT > >::type nanovdb::createPointTorus ( int  pointsPerVoxel = 1,
double  majorRadius = 100.0,
double  minorRadius = 50.0,
const Vec3d &  center = Vec3d(0.0),
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.

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 BuildT template parameter must be float (default) or double.

Definition at line 1314 of file Primitives.h.

template<int Order, typename TreeOrAccT , bool UseCache = true>
__hostdev__ 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 );

Definition at line 46 of file SampleFromVoxels.h.

__hostdev__ uint64_t nanovdb::first ( uint32_t  i) const

Definition at line 5975 of file NanoVDB.h.

template<typename RayT , typename AccT >
__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.

Definition at line 374 of file HDDA.h.

template<typename CoordT , typename RealT , template< typename > class Vec3T>
__hostdev__ CoordT nanovdb::Floor ( Vec3T< RealT > &  xyz)
inline

Utility function that returns the Coord of the round-down of xyz and redefined as the fractional part, ie xyz-in = return-value + xyz-out.

template<typename CoordT , template< typename > class Vec3T>
__hostdev__ CoordT nanovdb::Floor ( Vec3T< float > &  xyz)
inline

Template specialization of Floor for Vec3<float>

Definition at line 58 of file SampleFromVoxels.h.

template<typename CoordT , template< typename > class Vec3T>
__hostdev__ CoordT nanovdb::Floor ( Vec3T< double > &  xyz)
inline

Template specialization of Floor for Vec3<float>

Definition at line 69 of file SampleFromVoxels.h.

__hostdev__ int32_t nanovdb::Floor ( float  x)
inline

Definition at line 1130 of file NanoVDB.h.

__hostdev__ int32_t nanovdb::Floor ( double  x)
inline

Definition at line 1134 of file NanoVDB.h.

template<typename RangeT , typename FuncT >
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);

Definition at line 40 of file ForEach.h.

template<typename FuncT >
void nanovdb::forEach ( size_t  begin,
size_t  end,
size_t  grainSize,
const FuncT &  func 
)
inline

Simple wrapper for the function defined above.

Definition at line 67 of file ForEach.h.

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

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

Definition at line 74 of file ForEach.h.

template<template< typename...> class ContainerT, typename... T, typename FuncT >
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.

Definition at line 81 of file ForEach.h.

__hostdev__ float nanovdb::Fract ( float  x)
inline

Definition at line 1121 of file NanoVDB.h.

__hostdev__ double nanovdb::Fract ( double  x)
inline

Definition at line 1125 of file NanoVDB.h.

__hostdev__ FloatType nanovdb::getAvg ( ) const

Definition at line 5748 of file NanoVDB.h.

__hostdev__ FloatType nanovdb::getDev ( ) const

Definition at line 5749 of file NanoVDB.h.

template<typename BuildT >
Extrema<typename NanoGrid<BuildT>::ValueType> nanovdb::getExtrema ( const NanoGrid< BuildT > &  grid,
const CoordBBox &  bbox 
)

return the extrema of all the values in a grid that intersects the specified bounding box.

Definition at line 778 of file GridStats.h.

__hostdev__ ValueType nanovdb::getMax ( ) const

Definition at line 5747 of file NanoVDB.h.

__hostdev__ ValueType nanovdb::getMin ( ) const

Definition at line 5746 of file NanoVDB.h.

__hostdev__ uint64_t nanovdb::getValue ( uint32_t  i) const

Definition at line 5578 of file NanoVDB.h.

template<typename RealT >
__hostdev__ RealT nanovdb::GodunovsNormSqrd ( bool  isOutside,
RealT  dP_xm,
RealT  dP_xp,
RealT  dP_ym,
RealT  dP_yp,
RealT  dP_zm,
RealT  dP_zp 
)
inline

Definition at line 62 of file Stencils.h.

template<typename RealT >
__hostdev__ RealT nanovdb::GodunovsNormSqrd ( bool  isOutside,
const Vec3< RealT > &  gradient_m,
const Vec3< RealT > &  gradient_p 
)
inline

Definition at line 82 of file Stencils.h.

template<typename BuildT >
void nanovdb::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.

Definition at line 722 of file GridStats.h.

template<typename T , typename Op >
void nanovdb::inclusiveScan ( T *  array,
size_t  size,
const T &  identity,
bool  threaded,
Op  op 
)

An inclusive scan includes in[i] when computing out[i].

Note
Inclusive prefix operation: for (i=1; i<N; ++i) vec[i] = Op(vec[i],vec[i-1])

Definition at line 44 of file PrefixSum.h.

template<typename Func , typename... Rest>
int nanovdb::invoke ( const Func &  taskFunc1,
Rest...  taskFuncN 
)
Returns
1 for serial, 2 for tbb multi-threading, and 3 for std multi-threading

Definition at line 64 of file Invoke.h.

template<typename Type >
__hostdev__ bool nanovdb::isApproxZero ( const Type &  x)
inline

Definition at line 1064 of file NanoVDB.h.

__hostdev__ bool nanovdb::isFloatingPoint ( GridType  gridType)
inline

return true if the GridType maps to a floating point type

Definition at line 794 of file NanoVDB.h.

__hostdev__ bool nanovdb::isFloatingPointVector ( GridType  gridType)
inline

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

Definition at line 808 of file NanoVDB.h.

__hostdev__ bool nanovdb::isIndex ( GridType  gridType)
inline

Return true if the GridType maps to a special index type (not a POD integer type).

These types are used to index from a voxel into an external array of values, e.g. sidecar or blind data.

Definition at line 832 of file NanoVDB.h.

__hostdev__ bool nanovdb::isInteger ( GridType  gridType)
inline

Return true if the GridType maps to a POD integer type.

These types are used to associate a voxel with a POD integer type

Definition at line 820 of file NanoVDB.h.

__hostdev__ bool nanovdb::isMaskOn ( uint32_t  offset) const

Definition at line 5926 of file NanoVDB.h.

template<typename ValueT >
bool nanovdb::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

Definition at line 176 of file GridValidator.h.

__hostdev__ bool nanovdb::isValid ( GridType  gridType,
GridClass  gridClass 
)
inline

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

Definition at line 860 of file NanoVDB.h.

__hostdev__ bool nanovdb::isValid ( const GridBlindDataClass &  blindClass,
const GridBlindDataSemantic &  blindSemantics,
const GridType &  blindType 
)
inline

return true if the combination of GridBlindDataClass, GridBlindDataSemantic and GridType is valid.

Definition at line 883 of file NanoVDB.h.

__hostdev__ uint64_t nanovdb::last ( uint32_t  i) const

Definition at line 5976 of file NanoVDB.h.

__hostdev__ uint64_t nanovdb::lastOffset ( ) const

Definition at line 5867 of file NanoVDB.h.

nanovdb::LeafData ( )
delete

This class cannot be constructed or deleted.

nanovdb::LeafData ( const LeafData &  )
delete
template<typename BuildT >
__hostdev__ GridClass nanovdb::mapToGridClass ( GridClass  defaultClass = GridClass::Unknown)
inline

Maps from a templated build type to a GridClass enum.

Definition at line 2091 of file NanoVDB.h.

template<typename BuildT >
__hostdev__ GridType nanovdb::mapToGridType ( )
inline

Maps from a templated build type to a GridType enum.

Definition at line 2031 of file NanoVDB.h.

template<typename Vec3T >
__hostdev__ Vec3T nanovdb::matMult ( const float mat,
const Vec3T &  xyz 
)
inline

Multiply a 3x3 matrix and a 3d vector using 32bit floating point arithmetics.

Note
This corresponds to a linear mapping, e.g. scaling, rotation etc.
Template Parameters
Vec3TTemplate type of the input and output 3d vectors
Parameters
matpointer to an array of floats with the 3x3 matrix
xyzinput vector to be multiplied by the matrix
Returns
result of matrix-vector multiplication, i.e. mat x xyz

Definition at line 2114 of file NanoVDB.h.

template<typename Vec3T >
__hostdev__ Vec3T nanovdb::matMult ( const double *  mat,
const Vec3T &  xyz 
)
inline

Multiply a 3x3 matrix and a 3d vector using 64bit floating point arithmetics.

Note
This corresponds to a linear mapping, e.g. scaling, rotation etc.
Template Parameters
Vec3TTemplate type of the input and output 3d vectors
Parameters
matpointer to an array of floats with the 3x3 matrix
xyzinput vector to be multiplied by the matrix
Returns
result of matrix-vector multiplication, i.e. mat x xyz

Definition at line 2128 of file NanoVDB.h.

template<typename Vec3T >
__hostdev__ Vec3T nanovdb::matMult ( const float mat,
const float vec,
const Vec3T &  xyz 
)
inline

Multiply a 3x3 matrix to a 3d vector and add another 3d vector using 32bit floating point arithmetics.

Note
This corresponds to an affine transformation, i.e a linear mapping followed by a translation. e.g. scale/rotation and translation
Template Parameters
Vec3TTemplate type of the input and output 3d vectors
Parameters
matpointer to an array of floats with the 3x3 matrix
vec3d vector to be added AFTER the matrix multiplication
xyzinput vector to be multiplied by the matrix and a translated by vec
Returns
result of affine transformation, i.e. (mat x xyz) + vec

Definition at line 2143 of file NanoVDB.h.

template<typename Vec3T >
__hostdev__ Vec3T nanovdb::matMult ( const double *  mat,
const double *  vec,
const Vec3T &  xyz 
)
inline

Multiply a 3x3 matrix to a 3d vector and add another 3d vector using 64bit floating point arithmetics.

Note
This corresponds to an affine transformation, i.e a linear mapping followed by a translation. e.g. scale/rotation and translation
Template Parameters
Vec3TTemplate type of the input and output 3d vectors
Parameters
matpointer to an array of floats with the 3x3 matrix
vec3d vector to be added AFTER the matrix multiplication
xyzinput vector to be multiplied by the matrix and a translated by vec
Returns
result of affine transformation, i.e. (mat x xyz) + vec

Definition at line 2158 of file NanoVDB.h.

template<typename Vec3T >
__hostdev__ Vec3T nanovdb::matMultT ( const float mat,
const Vec3T &  xyz 
)
inline

Multiply the transposed of a 3x3 matrix and a 3d vector using 32bit floating point arithmetics.

Note
This corresponds to an inverse linear mapping, e.g. inverse scaling, inverse rotation etc.
Template Parameters
Vec3TTemplate type of the input and output 3d vectors
Parameters
matpointer to an array of floats with the 3x3 matrix
xyzinput vector to be multiplied by the transposed matrix
Returns
result of matrix-vector multiplication, i.e. mat^T x xyz

Definition at line 2172 of file NanoVDB.h.

template<typename Vec3T >
__hostdev__ Vec3T nanovdb::matMultT ( const double *  mat,
const Vec3T &  xyz 
)
inline

Multiply the transposed of a 3x3 matrix and a 3d vector using 64bit floating point arithmetics.

Note
This corresponds to an inverse linear mapping, e.g. inverse scaling, inverse rotation etc.
Template Parameters
Vec3TTemplate type of the input and output 3d vectors
Parameters
matpointer to an array of floats with the 3x3 matrix
xyzinput vector to be multiplied by the transposed matrix
Returns
result of matrix-vector multiplication, i.e. mat^T x xyz

Definition at line 2186 of file NanoVDB.h.

template<typename Vec3T >
__hostdev__ Vec3T nanovdb::matMultT ( const float mat,
const float vec,
const Vec3T &  xyz 
)
inline

Definition at line 2194 of file NanoVDB.h.

template<typename Vec3T >
__hostdev__ Vec3T nanovdb::matMultT ( const double *  mat,
const double *  vec,
const Vec3T &  xyz 
)
inline

Definition at line 2202 of file NanoVDB.h.

template<typename Type >
__hostdev__ Type nanovdb::Max ( Type  a,
Type  b 
)
inline

Definition at line 1091 of file NanoVDB.h.

__hostdev__ int32_t nanovdb::Max ( int32_t  a,
int32_t  b 
)
inline

Definition at line 1096 of file NanoVDB.h.

__hostdev__ uint32_t nanovdb::Max ( uint32_t  a,
uint32_t  b 
)
inline

Definition at line 1100 of file NanoVDB.h.

__hostdev__ float nanovdb::Max ( float  a,
float  b 
)
inline

Definition at line 1104 of file NanoVDB.h.

__hostdev__ double nanovdb::Max ( double  a,
double  b 
)
inline

Definition at line 1108 of file NanoVDB.h.

template<typename Vec3T >
__hostdev__ int nanovdb::MaxIndex ( const Vec3T &  v)
inline

Definition at line 1249 of file NanoVDB.h.

template<typename BufferT , template< class, class...> class VectorT>
GridHandle<BufferT> nanovdb::mergeGrids ( const VectorT< GridHandle< BufferT >> &  handles,
const BufferT *  pool = nullptr 
)
inline

Combines (or merges) multiple GridHandles into a single GridHandle containing all grids.

Template Parameters
BufferTType of the input and output grid buffers
Parameters
handlesVector of GridHandles to be combined
pooloptional pool used for allocation of output GridHandle
Returns
single GridHandle containing all input grids

Definition at line 465 of file GridHandle.h.

template<typename Type >
__hostdev__ Type nanovdb::Min ( Type  a,
Type  b 
)
inline

Definition at line 1070 of file NanoVDB.h.

__hostdev__ int32_t nanovdb::Min ( int32_t  a,
int32_t  b 
)
inline

Definition at line 1074 of file NanoVDB.h.

__hostdev__ uint32_t nanovdb::Min ( uint32_t  a,
uint32_t  b 
)
inline

Definition at line 1078 of file NanoVDB.h.

__hostdev__ float nanovdb::Min ( float  a,
float  b 
)
inline

Definition at line 1082 of file NanoVDB.h.

__hostdev__ double nanovdb::Min ( double  a,
double  b 
)
inline

Definition at line 1086 of file NanoVDB.h.

template<typename Vec3T >
__hostdev__ int nanovdb::MinIndex ( const Vec3T &  v)
inline

Definition at line 1232 of file NanoVDB.h.

template<typename NanoBuildT >
openvdb::Grid< typename openvdb::tree::Tree4< typename ConvertTrait< NanoBuildT >::Type >::Type >::Ptr nanovdb::nanoToOpenVDB ( const NanoGrid< NanoBuildT > &  grid,
int  verbose = 0 
)
inline

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

Definition at line 299 of file NanoToOpenVDB.h.

template<typename BufferT >
openvdb::GridBase::Ptr nanovdb::nanoToOpenVDB ( const GridHandle< BufferT > &  handle,
int  verbose = 0,
uint32_t  n = 0 
)

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

Definition at line 307 of file NanoToOpenVDB.h.

struct nanovdb::NANOVDB_ALIGN ( NANOVDB_DATA_ALIGNMENT  )

Struct with all the member data of the Grid (useful during serialization of an openvdb grid)

Base-class for quantized float leaf nodes.

Stuct with all the member data of the LeafNode (useful during serialization of an openvdb LeafNode)

Struct with all the member data of the InternalNode (useful during serialization of an openvdb InternalNode)

Struct with all the member data of the RootNode (useful during serialization of an openvdb RootNode)

Note
The transform is assumed to be affine (so linear) and have uniform scale! So frustum transforms and non-uniform scaling are not supported (primarily because they complicate ray-tracing in index space)
No client code should (or can) interface with this struct so it can safely be ignored!
No client code should (or can) interface with this struct so it can safely be ignored!

Get a const pointer to the blind data represented by this meta data

Template Parameters
BlindDataTExpected value type of the blind data.
Returns
Returns NULL if mGridType!=mapToGridType<BlindDataT>(), else a const point of type BlindDataT.
Note
Use mDataType=Unknown if BlindDataT is a custom data type unknown to NanoVDB.

return true if this meta data has a valid combination of semantic, class and value tags

return size in bytes of the blind data represented by this blind meta data

Note
This size includes possible padding for 32 byte alignment. The actual amount of bind data is mValueCount * mValueSize

Use this method to initiate most member dat

return true if the magic number and the version are both valid

Return a non-const uint8_t pointer to the first node at LEVEL

Template Parameters
LEVELof the node. LEVEL 0 means leaf node and LEVEL 3 means root node
Warning
If not nodes exist at LEVEL NULL is returned

Return a non-const uint8_t pointer to the first node at LEVEL

Template Parameters
LEVELof the node. LEVEL 0 means leaf node and LEVEL 3 means root node
Warning
If not nodes exist at LEVEL NULL is returned

Returns a const reference to the blindMetaData at the specified linear offset.

Warning
The linear offset is assumed to be in the valid range

Return memory usage in bytes for this class only.

return AABB of active values in world space

return AABB of active values in index space

return the root table has size

test if the grid is empty, e.i the root table has size 0

Returns
true if this grid contains not data whatsoever

return true if RootData follows TreeData in memory without any extra padding

TreeData is always following right after GridData, but the same might not be true for RootData

Return the index bounding box of all the active values in this tree, i.e. in all nodes of the tree

return true if RootData is layout out immediately after TreeData in memory

Return a key based on the coordinates of a voxel

Return padding of this class in bytes, due to aliasing and 32B alignment

Note
The extra bytes are not necessarily at the end, but can come from aliasing of individual data members.

Returns a non-const reference to the tile at the specified linear offset.

Warning
The linear offset is assumed to be in the valid range

Returns a const reference to the child node in the specified tile.

Warning
A child node is assumed to exist in the specified tile

This class cannot be constructed or deleted

This class cannot be constructed or deleted

Return padding of this class in bytes, due to aliasing and 32B alignment

Note
The extra bytes are not necessarily at the end, but can come from aliasing of individual data members.

Returns a pointer to the child node at the specifed linear offset.

This class cannot be constructed or deleted

Return padding of this class in bytes, due to aliasing and 32B alignment

Note
The extra bytes are not necessarily at the end, but can come from aliasing of individual data members.

This class cannot be constructed or deleted

Return padding of this class in bytes, due to aliasing and 32B alignment

Note
The extra bytes are not necessarily at the end, but can come from aliasing of individual data members.

return the quantized minimum of the active values in this node

return the quantized maximum of the active values in this node

return the quantized average of the active values in this node

return the quantized standard deviation of the active values in this node

Note
0 <= StdDev <= max-min or 0 <= StdDev/(max-min) <= 1
min <= X <= max or 0 <= (X-min)/(min-max) <= 1
min <= X <= max or 0 <= (X-min)/(min-max) <= 1
min <= avg <= max or 0 <= (avg-min)/(min-max) <= 1
0 <= StdDev <= max-min or 0 <= StdDev/(max-min) <= 1

Use this method to initiate most member dat

return true if the magic number and the version are both valid

Return a non-const uint8_t pointer to the first node at LEVEL

Template Parameters
LEVELof the node. LEVEL 0 means leaf node and LEVEL 3 means root node
Warning
If not nodes exist at LEVEL NULL is returned

Return a non-const uint8_t pointer to the first node at LEVEL

Template Parameters
LEVELof the node. LEVEL 0 means leaf node and LEVEL 3 means root node
Warning
If not nodes exist at LEVEL NULL is returned

Returns a const reference to the blindMetaData at the specified linear offset.

Warning
The linear offset is assumed to be in the valid range

Return memory usage in bytes for this class only.

return AABB of active values in world space

return AABB of active values in index space

return the root table has size

test if the grid is empty, e.i the root table has size 0

Returns
true if this grid contains not data whatsoever

return true if RootData follows TreeData in memory without any extra padding

TreeData is always following right after GridData, but the same might not be true for RootData

Return the index bounding box of all the active values in this tree, i.e. in all nodes of the tree

return true if RootData is layout out immediately after TreeData in memory

Return a key based on the coordinates of a voxel

Return padding of this class in bytes, due to aliasing and 32B alignment

Note
The extra bytes are not necessarily at the end, but can come from aliasing of individual data members.

Returns a non-const reference to the tile at the specified linear offset.

Warning
The linear offset is assumed to be in the valid range

Returns a const reference to the child node in the specified tile.

Warning
A child node is assumed to exist in the specified tile

This class cannot be constructed or deleted

This class cannot be constructed or deleted

Return padding of this class in bytes, due to aliasing and 32B alignment

Note
The extra bytes are not necessarily at the end, but can come from aliasing of individual data members.

Returns a pointer to the child node at the specifed linear offset.

This class cannot be constructed or deleted

Return padding of this class in bytes, due to aliasing and 32B alignment

Note
The extra bytes are not necessarily at the end, but can come from aliasing of individual data members.

This class cannot be constructed or deleted

Return padding of this class in bytes, due to aliasing and 32B alignment

Note
The extra bytes are not necessarily at the end, but can come from aliasing of individual data members.

return the quantized minimum of the active values in this node

return the quantized maximum of the active values in this node

return the quantized average of the active values in this node

return the quantized standard deviation of the active values in this node

Note
0 <= StdDev <= max-min or 0 <= StdDev/(max-min) <= 1
min <= X <= max or 0 <= (X-min)/(min-max) <= 1
min <= X <= max or 0 <= (X-min)/(min-max) <= 1
min <= avg <= max or 0 <= (avg-min)/(min-max) <= 1
0 <= StdDev <= max-min or 0 <= StdDev/(max-min) <= 1

Definition at line 3312 of file NanoVDB.h.

__hostdev__ uint64_t nanovdb::offset ( ) const

Definition at line 5973 of file NanoVDB.h.

template<typename T1 , typename T2 >
__hostdev__ Vec3<T2> nanovdb::operator* ( T1  scalar,
const Vec3< T2 > &  vec 
)
inline

Definition at line 1674 of file NanoVDB.h.

template<typename T1 , typename T2 >
__hostdev__ Vec4<T2> nanovdb::operator* ( T1  scalar,
const Vec4< T2 > &  vec 
)
inline

Definition at line 1821 of file NanoVDB.h.

template<typename T1 , typename T2 >
__hostdev__ Vec3<T2> nanovdb::operator/ ( T1  scalar,
const Vec3< T2 > &  vec 
)
inline

Definition at line 1679 of file NanoVDB.h.

template<typename T1 , typename T2 >
__hostdev__ Vec4<T2> nanovdb::operator/ ( T1  scalar,
const Vec4< T2 > &  vec 
)
inline

Definition at line 1826 of file NanoVDB.h.

std::ostream& nanovdb::operator<< ( std::ostream &  os,
const AbsDiff &  diff 
)
inline

Definition at line 261 of file CreateNanoGrid.h.

std::ostream& nanovdb::operator<< ( std::ostream &  os,
const RelDiff &  diff 
)
inline

Definition at line 291 of file CreateNanoGrid.h.

template<typename T >
std::ostream& nanovdb::operator<< ( std::ostream &  os,
const BBox< Vec3< T >> &  b 
)
inline

Definition at line 756 of file IO.h.

std::ostream& nanovdb::operator<< ( std::ostream &  os,
const CoordBBox &  b 
)
inline

Definition at line 764 of file IO.h.

std::ostream& nanovdb::operator<< ( std::ostream &  os,
const Coord &  ijk 
)
inline

Definition at line 772 of file IO.h.

template<typename T >
std::ostream& nanovdb::operator<< ( std::ostream &  os,
const Vec3< T > &  v 
)
inline

Definition at line 780 of file IO.h.

template<typename T >
std::ostream& nanovdb::operator<< ( std::ostream &  os,
const Vec4< T > &  v 
)
inline

Definition at line 788 of file IO.h.

LeafData & nanovdb::operator= ( const LeafData &  )
delete
template<typename T >
__hostdev__ constexpr T nanovdb::pi ( )
inline

Pi constant taken from Boost to match old behaviour.

Definition at line 976 of file NanoVDB.h.

template<>
__hostdev__ constexpr float nanovdb::pi ( )
inline

Pi constant taken from Boost to match old behaviour.

Definition at line 981 of file NanoVDB.h.

template<>
__hostdev__ constexpr double nanovdb::pi ( )
inline

Pi constant taken from Boost to match old behaviour.

Definition at line 986 of file NanoVDB.h.

template<>
__hostdev__ constexpr long double nanovdb::pi ( )
inline

Pi constant taken from Boost to match old behaviour.

Definition at line 991 of file NanoVDB.h.

__hostdev__ uint64_t nanovdb::pointCount ( ) const

Definition at line 5974 of file NanoVDB.h.

template<typename T >
__hostdev__ T nanovdb::Pow2 ( x)
inline

Definition at line 1149 of file NanoVDB.h.

template<typename T >
__hostdev__ T nanovdb::Pow3 ( x)
inline

Definition at line 1155 of file NanoVDB.h.

template<typename T >
__hostdev__ T nanovdb::Pow4 ( x)
inline

Definition at line 1161 of file NanoVDB.h.

template<typename T , typename OpT = std::plus<T>>
T nanovdb::prefixSum ( std::vector< T > &  vec,
bool  threaded = true,
OpT  op = OpT() 
)

Computes inclusive prefix sum of a vector.

Template Parameters
TType of the elements in the input/out vector
OpTType of operation performed on each element (defaults to sum)
Parameters
vecinput and output vector
threadedif true multi-threading is used
Note
Inclusive prefix sum: for (i=1; i<N; ++i) vec[i] += vec[i-1]
Returns
sum of all input elements, which is also the last element of the inclusive prefix sum

Definition at line 71 of file PrefixSum.h.

template<typename RangeT , typename T , typename FuncT , typename JoinT >
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.
identityinitial value
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;});

Definition at line 42 of file Reduce.h.

template<typename T , typename FuncT , typename JoinT >
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.

Definition at line 77 of file Reduce.h.

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

Simple wrapper that works with std::containers.

Definition at line 85 of file Reduce.h.

template<template< typename...> class ContainerT, typename... ArgT, typename T , typename FuncT , typename JoinT >
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.

Definition at line 94 of file Reduce.h.

template<typename CoordT , typename RealT , template< typename > class Vec3T>
__hostdev__ CoordT nanovdb::Round ( const Vec3T< RealT > &  xyz)
inline
template<typename CoordT , template< typename > class Vec3T>
__hostdev__ CoordT nanovdb::Round ( const Vec3T< float > &  xyz)
inline

Definition at line 1193 of file NanoVDB.h.

template<typename CoordT , template< typename > class Vec3T>
__hostdev__ CoordT nanovdb::Round ( const Vec3T< double > &  xyz)
inline

Definition at line 1201 of file NanoVDB.h.

template<typename CoordT , typename RealT , template< typename > class Vec3T>
__hostdev__ CoordT nanovdb::RoundDown ( const Vec3T< RealT > &  xyz)
inline

Definition at line 1207 of file NanoVDB.h.

__hostdev__ void nanovdb::setAvg ( const bool &  )

Definition at line 5758 of file NanoVDB.h.

__hostdev__ void nanovdb::setDev ( const bool &  )

Definition at line 5759 of file NanoVDB.h.

__hostdev__ void nanovdb::setMask ( uint32_t  offset,
bool  v 
)

Definition at line 5927 of file NanoVDB.h.

__hostdev__ void nanovdb::setMax ( const bool &  )

Definition at line 5757 of file NanoVDB.h.

__hostdev__ void nanovdb::setMin ( const bool &  )

Definition at line 5756 of file NanoVDB.h.

__hostdev__ void nanovdb::setOn ( uint32_t  offset)

Definition at line 5755 of file NanoVDB.h.

template<typename T >
__hostdev__ void nanovdb::setOrigin ( const T &  ijk)

Definition at line 5762 of file NanoVDB.h.

__hostdev__ void nanovdb::setValue ( uint32_t  offset,
bool  v 
)

Definition at line 5750 of file NanoVDB.h.

__hostdev__ void nanovdb::setValue ( uint32_t  offset,
uint16_t  value 
)

Definition at line 5979 of file NanoVDB.h.

__hostdev__ void nanovdb::setValueOnly ( uint32_t  offset,
uint16_t  value 
)

Definition at line 5978 of file NanoVDB.h.

template<typename T >
__hostdev__ T nanovdb::Sign ( const T &  x)
inline

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

Definition at line 1226 of file NanoVDB.h.

template<typename BufferT , template< class, class...> class VectorT = std::vector>
VectorT<GridHandle<BufferT> > nanovdb::splitGrids ( const GridHandle< BufferT > &  handle,
const BufferT *  other = nullptr 
)
inline

Split all grids in a single GridHandle into a vector of multiple GridHandles each with a single grid.

Template Parameters
BufferTType of the input and output grid buffers
Parameters
handleGridHandle with grids that will be slip into individual GridHandles
pooloptional pool used for allocation of output GridHandle
Returns
Vector of GridHandles each containing a single grid

Definition at line 439 of file GridHandle.h.

__hostdev__ float nanovdb::Sqrt ( float  x)
inline

Return the square root of a floating-point value.

Definition at line 1214 of file NanoVDB.h.

__hostdev__ double nanovdb::Sqrt ( double  x)
inline

Return the square root of a floating-point value.

Definition at line 1218 of file NanoVDB.h.

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

Maps a GridType to a c-string.

Parameters
gridTypeGridType to be mapped to a string
Returns
Retuns a c-string used to describe a GridType

Definition at line 326 of file NanoVDB.h.

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

Retuns a c-string used to describe a GridClass.

Definition at line 353 of file NanoVDB.h.

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

Retuns a c-string used to describe a GridFlags.

Definition at line 376 of file NanoVDB.h.

template<typename BuildT >
void nanovdb::updateChecksum ( NanoGrid< BuildT > &  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.
template<typename ValueT >
void nanovdb::updateChecksum ( NanoGrid< ValueT > &  grid,
ChecksumMode  mode 
)

Definition at line 343 of file GridChecksum.h.

bool nanovdb::updateChecksum ( GridData &  gridData,
ChecksumMode  mode 
)
inline

Definition at line 350 of file GridChecksum.h.

bool nanovdb::updateChecksum ( GridData *  data)
inline

Preserve the existing mode of the checksum and update it if it's not disabled.

Parameters
data
Returns

Definition at line 435 of file GridChecksum.h.

bool nanovdb::updateGridCount ( GridData *  data,
uint32_t  gridIndex,
uint32_t  gridCount 
)
inline

Updates the ground index and count, as well as the partial checksum if needed.

Parameters
dataPointer to grid data
gridIndexNew value of the index
gridCountNew value of the grid count
Returns
returns true if the checksum was updated

Definition at line 447 of file GridChecksum.h.

template<typename BuildT >
bool nanovdb::validateChecksum ( const NanoGrid< BuildT > &  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.

Template Parameters
BuildTTemplate parameter used to build NanoVDB grid.
Parameters
gridGrid whose checksum is validated.
modeDefines the mode of computation for the checksum.
template<typename ValueT >
bool nanovdb::validateChecksum ( const NanoGrid< ValueT > &  grid,
ChecksumMode  mode 
)

Definition at line 335 of file GridChecksum.h.

template<typename ValueType , typename RealT = ValueType>
__hostdev__ 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)

Definition at line 35 of file Stencils.h.

template<typename RayT , typename AccT >
__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.

Definition at line 176 of file HDDA.h.

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

Definition at line 335 of file HDDA.h.

nanovdb::~LeafData ( )
delete

Variable Documentation

uint8_t nanovdb::mBBoxDif

Definition at line 5736 of file NanoVDB.h.

CoordT nanovdb::mBBoxMin

Definition at line 5735 of file NanoVDB.h.

uint16_t nanovdb::mCode

Definition at line 5568 of file NanoVDB.h.

uint8_t nanovdb::mFlags

Definition at line 5737 of file NanoVDB.h.

MaskT< LOG2DIM > nanovdb::mMask

Definition at line 5924 of file NanoVDB.h.

uint64_t nanovdb::mOffset

Definition at line 5959 of file NanoVDB.h.

uint64_t nanovdb::mPadding

Definition at line 5740 of file NanoVDB.h.

uint64_t nanovdb::mPointCount

Definition at line 5960 of file NanoVDB.h.

MaskT< LOG2DIM > nanovdb::mValueMask

Definition at line 5738 of file NanoVDB.h.

uint16_t nanovdb::mValues

Definition at line 5739 of file NanoVDB.h.