![]() |
OpenVDB 13.2.0
|
Namespaces | |
| namespace | build |
| namespace | morphology |
| namespace | trait |
Classes | |
| class | AbsDiff |
| Compression oracle based on absolute difference. More... | |
| struct | Crc32TailOld |
| class | CreateNanoGrid |
| Creates any nanovdb Grid from any source grid (certain combinations are obviously not allowed) More... | |
| class | Extrema |
| class | Extrema< nanovdb::Half, 0 > |
| Template specialization of Extrema on scalar Half precision value types, i.e. rank = 0. More... | |
| class | Extrema< ValueT, 0 > |
| Template specialization of Extrema on scalar value types, i.e. rank = 0. | |
| class | Extrema< VecT, 1 > |
| Template specialization of Extrema on vector value types, i.e. rank = 1. More... | |
| class | GridStats |
| Allows for the construction of NanoVDB grids without any dependency. More... | |
| struct | IsNanoGridValid |
| struct | MapToNano |
| Trait that maps any type to the corresponding nanovdb type. More... | |
| class | NanoToOpenVDB |
| This class will serialize an OpenVDB grid into a NanoVDB grid managed by a GridHandle. More... | |
| class | NodeAccessor |
| The NodeAccessor provides a uniform API for accessing nodes in 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... | |
| struct | NoopStats |
| No-op Stats class. More... | |
| class | RelDiff |
| Compression oracle based on relative difference. More... | |
| class | Stats |
| class | Stats< nanovdb::Half, 0 > |
| This class computes statistics (minimum value, maximum value, mean, variance and standard deviation) of a population of half precision floating-point values. More... | |
| 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 | VoxelBlockManager |
| CPU counterpart of tools::cuda::VoxelBlockManager. Provides host-side decode of the inverse maps (sequential index -> leaf + voxel offset) for a single voxel block. The implementation is single-threaded per block and SIMD-accelerated (via util::shuffleDownMask and util::buildMaskPrefixSums); the caller is responsible for parallelism across blocks (e.g. OpenMP or nanovdb::util::forEach). More... | |
| struct | VoxelBlockManagerBase |
| Compile-time geometry parameters and output sentinels shared by the CPU and CUDA VoxelBlockManager decode structs. More... | |
| class | VoxelBlockManagerHandle |
| Move-only owner of the two raw metadata buffers that back a VoxelBlockManager: the per-block firstLeafID array (uint32_t[blockCount]) and the per-block jumpMap array (uint64_t[blockCount * JumpMapLength]). More... | |
Enumerations | |
| enum class | StatsMode : uint32_t { Disable = 0 , BBox = 1 , MinMax = 2 , All = 3 , Default = 3 , End = 4 } |
| Grid flags which indicate what extra information is present in the grid buffer. More... | |
Functions | |
| template<typename SrcGridT, typename DstBuildT = typename MapToNano<typename SrcGridT::BuildType>::type, typename BufferT = HostBuffer> | |
| util::disable_if< BuildTraits< DstBuildT >::is_index||BuildTraits< DstBuildT >::is_Fp, GridHandle< BufferT > >::type | createNanoGrid (const SrcGridT &srcGrid, StatsMode sMode=StatsMode::Default, CheckMode cMode=CheckMode::Default, int verbose=0, const BufferT &buffer=BufferT()) |
| Freestanding function that creates a NanoGrid<T> from any source grid. | |
| template<typename SrcGridT, typename DstBuildT = typename MapToNano<typename SrcGridT::BuildType>::type, typename BufferT = HostBuffer> | |
| util::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. | |
| template<typename SrcGridT, typename DstBuildT = typename MapToNano<typename SrcGridT::BuildType>::type, typename OracleT = AbsDiff, typename BufferT = HostBuffer> | |
| util::enable_if< util::is_same< FpN, DstBuildT >::value, GridHandle< BufferT > >::type | createNanoGrid (const SrcGridT &srcGrid, StatsMode sMode=StatsMode::Default, CheckMode cMode=CheckMode::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<typename SrcGridT, typename DstBuildT = typename MapToNano<typename SrcGridT::BuildType>::type, typename BufferT = HostBuffer> | |
| util::enable_if< BuildTraits< DstBuildT >::is_FpX, GridHandle< BufferT > >::type | createNanoGrid (const SrcGridT &srcGrid, StatsMode sMode=StatsMode::Default, CheckMode cMode=CheckMode::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<typename DstT, typename SrcT> | |
| DstT | CreateNanoGridValueCast (const SrcT val) |
| template<> | |
| nanovdb::Half | CreateNanoGridValueCast< nanovdb::Half, float > (const float val) |
| template<> | |
| nanovdb::Half | CreateNanoGridValueCast< nanovdb::Half, double > (const double val) |
| template<> | |
| float | CreateNanoGridValueCast< float, nanovdb::Half > (const nanovdb::Half val) |
| template<> | |
| double | CreateNanoGridValueCast< double, nanovdb::Half > (const nanovdb::Half val) |
| template<typename BuildT = float, typename BufferT = HostBuffer> | |
| util::enable_if< util::is_same< BuildT, float, double >::value, GridHandle< BufferT > >::type | createLevelSetSphere (double radius=100.0, const Vec3d ¢er=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, CheckMode cMode=CheckMode::Default, const BufferT &buffer=BufferT()) |
| Returns a handle to a narrow-band level set of a sphere. | |
| template<typename BuildT, typename BufferT = HostBuffer> | |
| util::enable_if< util::is_same< BuildT, Fp4, Fp8, Fp16 >::value, GridHandle< BufferT > >::type | createLevelSetSphere (double radius=100.0, const Vec3d ¢er=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, CheckMode cMode=CheckMode::Default, bool ditherOn=false, const BufferT &buffer=BufferT()) |
| template<typename BuildT, typename BufferT = HostBuffer> | |
| util::enable_if< util::is_same< FpN, BuildT >::value, GridHandle< BufferT > >::type | createLevelSetSphere (double radius=100.0, const Vec3d ¢er=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, CheckMode cMode=CheckMode::Default, float tolerance=-1.0f, bool ditherOn=false, const BufferT &buffer=BufferT()) |
| template<typename BuildT = float, typename BufferT = HostBuffer> | |
| util::disable_if< util::is_same< FpN, BuildT >::value, GridHandle< BufferT > >::type | createFogVolumeSphere (double radius=100.0, const Vec3d ¢er=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, CheckMode cMode=CheckMode::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. | |
| template<typename BuildT, typename BufferT = HostBuffer> | |
| util::enable_if< util::is_same< FpN, BuildT >::value, GridHandle< BufferT > >::type | createFogVolumeSphere (double radius=100.0, const Vec3d ¢er=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, CheckMode cMode=CheckMode::Default, float tolerance=-1.0f, bool ditherOn=false, const BufferT &buffer=BufferT()) |
| template<typename BuildT = float, typename BufferT = HostBuffer> | |
| util::disable_if< util::is_same< FpN, BuildT >::value, GridHandle< BufferT > >::type | createPointSphere (int pointsPerVoxel=1, double radius=100.0, const Vec3d ¢er=Vec3d(0.0), double voxelSize=1.0, const Vec3d &origin=Vec3d(0.0), const std::string &name="sphere_points", CheckMode mode=CheckMode::Default, const BufferT &buffer=BufferT()) |
| Returns a handle to a PointDataGrid containing points scattered on the surface of a sphere. | |
| template<typename BuildT = float, typename BufferT = HostBuffer> | |
| util::disable_if< util::is_same< FpN, BuildT >::value, GridHandle< BufferT > >::type | createLevelSetTorus (double majorRadius=100.0, double minorRadius=50.0, const Vec3d ¢er=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, CheckMode cMode=CheckMode::Default, const BufferT &buffer=BufferT()) |
| Returns a handle to a narrow-band level set of a torus in the xz-plane. | |
| template<typename BuildT, typename BufferT = HostBuffer> | |
| util::enable_if< util::is_same< FpN, BuildT >::value, GridHandle< BufferT > >::type | createLevelSetTorus (double majorRadius=100.0, double minorRadius=50.0, const Vec3d ¢er=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, CheckMode cMode=CheckMode::Default, float tolerance=-1.0f, bool ditherOn=false, const BufferT &buffer=BufferT()) |
| template<typename BuildT = float, typename BufferT = HostBuffer> | |
| util::disable_if< util::is_same< FpN, BuildT >::value, GridHandle< BufferT > >::type | createFogVolumeTorus (double majorRadius=100.0, double minorRadius=50.0, const Vec3d ¢er=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, CheckMode cMode=CheckMode::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. | |
| template<typename BuildT, typename BufferT = HostBuffer> | |
| util::enable_if< util::is_same< FpN, BuildT >::value, GridHandle< BufferT > >::type | createFogVolumeTorus (double majorRadius=100.0, double minorRadius=50.0, const Vec3d ¢er=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, CheckMode cMode=CheckMode::Default, float tolerance=-1.0f, bool ditherOn=false, const BufferT &buffer=BufferT()) |
| template<typename BuildT = float, typename BufferT = HostBuffer> | |
| util::disable_if< util::is_same< FpN, BuildT >::value, GridHandle< BufferT > >::type | createPointTorus (int pointsPerVoxel=1, double majorRadius=100.0, double minorRadius=50.0, const Vec3d ¢er=Vec3d(0.0), double voxelSize=1.0, const Vec3d &origin=Vec3d(0.0f), const std::string &name="torus_points", CheckMode cMode=CheckMode::Default, const BufferT &buffer=BufferT()) |
| Returns a handle to a PointDataGrid containing points scattered on the surface of a torus. | |
| template<typename BuildT = float, typename BufferT = HostBuffer> | |
| util::disable_if< util::is_same< FpN, BuildT >::value, GridHandle< BufferT > >::type | createLevelSetBox (double width=40.0, double height=60.0, double depth=100.0, const Vec3d ¢er=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, CheckMode cMode=CheckMode::Default, const BufferT &buffer=BufferT()) |
| Returns a handle to a narrow-band level set of a box. | |
| template<typename BuildT, typename BufferT = HostBuffer> | |
| util::enable_if< util::is_same< FpN, BuildT >::value, GridHandle< BufferT > >::type | createLevelSetBox (double width=40.0, double height=60.0, double depth=100.0, const Vec3d ¢er=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, CheckMode cMode=CheckMode::Default, float tolerance=-1.0f, bool ditherOn=false, const BufferT &buffer=BufferT()) |
| template<typename BuildT = float, typename BufferT = HostBuffer> | |
| util::disable_if< util::is_same< FpN, BuildT >::value, GridHandle< BufferT > >::type | createFogVolumeBox (double width=40.0, double height=60.0, double depth=100.0, const Vec3d ¢er=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, CheckMode cMode=CheckMode::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. | |
| template<typename BuildT, typename BufferT = HostBuffer> | |
| util::enable_if< util::is_same< FpN, BuildT >::value, GridHandle< BufferT > >::type | createFogVolumeBox (double width=40.0, double height=60.0, double depth=100.0, const Vec3d ¢er=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, CheckMode cMode=CheckMode::Default, float tolerance=-1.0f, bool ditherOn=false, const BufferT &buffer=BufferT()) |
| template<typename BuildT = float, typename BufferT = HostBuffer> | |
| util::disable_if< util::is_same< FpN, BuildT >::value, GridHandle< BufferT > >::type | createLevelSetOctahedron (double scale=100.0, const Vec3d ¢er=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, CheckMode cMode=CheckMode::Default, const BufferT &buffer=BufferT()) |
| Returns a handle to a narrow-band level set of a octahedron. | |
| template<typename BuildT, typename BufferT = HostBuffer> | |
| util::enable_if< util::is_same< FpN, BuildT >::value, GridHandle< BufferT > >::type | createLevelSetOctahedron (double scale=100.0, const Vec3d ¢er=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, CheckMode cMode=CheckMode::Default, float tolerance=-1.0f, bool ditherOn=false, const BufferT &buffer=BufferT()) |
| template<typename BuildT = float, typename BufferT = HostBuffer> | |
| util::disable_if< util::is_same< FpN, BuildT >::value, GridHandle< BufferT > >::type | createFogVolumeOctahedron (double scale=100.0, const Vec3d ¢er=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, CheckMode cMode=CheckMode::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. | |
| template<typename BuildT, typename BufferT = HostBuffer> | |
| util::enable_if< util::is_same< FpN, BuildT >::value, GridHandle< BufferT > >::type | createFogVolumeOctahedron (double scale=100.0, const Vec3d ¢er=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, CheckMode cMode=CheckMode::Default, float tolerance=-1.0f, bool ditherOn=false, const BufferT &buffer=BufferT()) |
| template<typename BuildT = float, typename BufferT = HostBuffer> | |
| util::disable_if< util::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 ¢er=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, CheckMode cMode=CheckMode::Default, const BufferT &buffer=BufferT()) |
| Returns a handle to a narrow-band level set of a bounding-box (= wireframe of a box) | |
| template<typename BuildT, typename BufferT = HostBuffer> | |
| util::enable_if< util::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 ¢er=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, CheckMode cMode=CheckMode::Default, float tolerance=-1.0f, bool ditherOn=false, const BufferT &buffer=BufferT()) |
| template<typename BuildT = float, typename BufferT = HostBuffer> | |
| util::disable_if< util::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 ¢er=Vec3d(0.0), double voxelSize=1.0, const Vec3d &origin=Vec3d(0.0), const std::string &name="box_points", CheckMode mode=CheckMode::Default, const BufferT &buffer=BufferT()) |
| Returns a handle to a PointDataGrid containing points scattered on the surface of a box. | |
| template<typename SrcBuildT = float, typename BufferT = HostBuffer> | |
| GridHandle< BufferT > | createPointScatter (const NanoGrid< SrcBuildT > &srcGrid, int pointsPerVoxel=1, const std::string &name="point_scatter", CheckMode mode=CheckMode::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. | |
| Checksum | evalChecksum (const GridData *gridData, CheckMode mode=CheckMode::Default) |
Compute the (2 x CRC32) checksum of the specified gridData. | |
| Checksum | getChecksum (const GridData *gridData) |
| Extract the checksum of a grid. | |
| bool | validateChecksum (const GridData *gridData, CheckMode mode=CheckMode::Default) |
Return true if the checksum of gridData matches the expected value already encoded into the grid's meta data. | |
| void | updateChecksum (GridData *gridData, CheckMode mode) |
| Updates the checksum of a grid. | |
| void | updateChecksum (GridData *gridData) |
| Updates the checksum of a grid by preserving its mode. | |
| __hostdev__ uint32_t | crc32Head (const GridData *gridData, const uint32_t *lut) |
| Compute the crc32 checksum of a grid's head, i.e. its GridData and TreeData, using a lookup table. GridData::mMagic and GridData::mChecksum are excluded. | |
| __hostdev__ uint32_t | crc32Head (const GridData *gridData) |
| template<typename ValueT> | |
| uint32_t | crc32TailOld (const NanoGrid< ValueT > *grid, const uint32_t *lut) |
| uint32_t | crc32Tail (const GridData *gridData, const uint32_t *lut) |
| template<typename ValueT> | |
| uint32_t | crc32Tail (const NanoGrid< ValueT > *grid, const uint32_t *lut) |
| template<typename ValueT> | |
| Checksum | evalChecksum (const NanoGrid< ValueT > *grid, CheckMode mode) |
| template<typename ValueT> | |
| Checksum | checksum (const NanoGrid< ValueT > *grid, CheckMode mode) |
| Checksum | checksum (const GridData *gridData, CheckMode mode) |
| template<typename ValueT> | |
| Checksum | checksum (const NanoGrid< ValueT > &grid, CheckMode mode) |
| template<typename ValueT> | |
| bool | validateChecksum (const NanoGrid< ValueT > *grid, CheckMode mode) |
| template<typename ValueT> | |
| bool | validateChecksum (const NanoGrid< ValueT > &grid, CheckMode mode) |
| template<typename ValueT> | |
| void | updateChecksum (NanoGrid< ValueT > *grid, CheckMode mode) |
| template<typename ValueT> | |
| void | updateChecksum (NanoGrid< ValueT > *grid) |
| template<typename ValueT> | |
| void | updateChecksum (NanoGrid< ValueT > &grid, CheckMode mode) |
| __hostdev__ void | updateGridCount (GridData *data, uint32_t gridIndex, uint32_t gridCount) |
| Updates the ground index and count, as well as the head checksum if needed. | |
| template<typename BuildT> | |
| void | updateGridStats (NanoGrid< BuildT > *grid, StatsMode mode=StatsMode::Default) |
| Re-computes the min/max, stats and bbox information for an existing NanoVDB Grid. | |
| template<typename BuildT> | |
| Extrema< typename NanoGrid< BuildT >::ValueType > | getExtrema (const NanoGrid< BuildT > &grid, const CoordBBox &bbox) |
| Determine the extrema of all the values in a grid that intersects the specified bounding box. | |
| template<typename BuildT> | |
| void | gridStats (NanoGrid< BuildT > &grid, StatsMode mode=StatsMode::Default) |
| template<typename ValueT> | |
| bool | isValid (const NanoGrid< ValueT > *grid, CheckMode mode, bool verbose=false) |
| Performs several validation tests on a grid pointer. | |
| 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. | |
| template<typename ValueT> | |
| __hostdev__ char * | checkGrid (const NanoGrid< ValueT > *grid, char *error, CheckMode mode=CheckMode::Full) |
| validate grid | |
| template<typename GridHandleT> | |
| bool | validateGrid (const GridHandleT &handle, uint32_t gridID, CheckMode mode, bool verbose) |
| Validate a specific grid in a GridHandle. | |
| template<typename GridHandleT> | |
| bool | validateGrids (const GridHandleT &handle, CheckMode mode, bool verbose) |
| Validate all the grids in a GridHandle. | |
| template<typename NanoBuildT> | |
| auto | nanoToOpenVDB (const NanoGrid< NanoBuildT > &grid) |
| Free-standing function that de-serializes a typed NanoVDB grid into an OpenVDB Grid. | |
| template<typename NanoBuildT, typename NanoValueT> | |
| util::enable_if_t< BuildTraits< NanoBuildT >::is_index, trait::OpenGridPtr< NanoValueT > > | nanoToOpenVDB (const NanoGrid< NanoBuildT > &grid, const NanoValueT *sideCar, GridClass gridClass=GridClass::Unknown, const char *gridName=nullptr) |
| Free-standing function that de-serializes an IndexGrid with a sidecar into an OpenVDB Grid. | |
| template<typename BufferT> | |
| openvdb::GridBase::Ptr | nanoToOpenVDB (const GridHandle< BufferT > &handle, uint32_t gridID=0) |
| Forward declaration of free-standing function that de-serializes a grid in a NanoVDB GridHandle into an OpenVDB GridBase. | |
| template<int Log2BlockWidth, typename BufferT> | |
| void | buildVoxelBlockManager (const NanoGrid< ValueOnIndex > *grid, VoxelBlockManagerHandle< BufferT > &handle) |
| Rebuild a VoxelBlockManager in-place using a pre-allocated handle. Zeros the jumpMap and recomputes both metadata arrays. No memory allocation. | |
| template<int Log2BlockWidth, typename BufferT = HostBuffer> | |
| VoxelBlockManagerHandle< BufferT > | buildVoxelBlockManager (const NanoGrid< ValueOnIndex > *grid, uint64_t firstOffset=0, uint64_t lastOffset=0, uint64_t nBlocks=0, const BufferT *pool=nullptr) |
| Allocate buffers and build a VoxelBlockManager on the host from a ValueOnIndex grid. Uses nanovdb::util::forEach to process lower internal nodes in parallel. | |
|
strong |
Grid flags which indicate what extra information is present in the grid buffer.
| Enumerator | |
|---|---|
| Disable | |
| BBox | |
| MinMax | |
| All | |
| Default | |
| End | |
| VoxelBlockManagerHandle< BufferT > buildVoxelBlockManager | ( | const NanoGrid< ValueOnIndex > * | grid, |
| uint64_t | firstOffset = 0, | ||
| uint64_t | lastOffset = 0, | ||
| uint64_t | nBlocks = 0, | ||
| const BufferT * | pool = nullptr ) |
Allocate buffers and build a VoxelBlockManager on the host from a ValueOnIndex grid. Uses nanovdb::util::forEach to process lower internal nodes in parallel.
| Log2BlockWidth | Log2 of the number of active voxels per VBM block |
| BufferT | Buffer type for the returned handle (default: HostBuffer) |
| grid | Host-accessible ValueOnIndex grid (must satisfy isSequential()) |
| firstOffset | First active-voxel offset covered by this VBM; must satisfy firstOffset == 1 (mod BlockWidth). Pass 0 (default) to use 1, which covers the full grid from the first active voxel. |
| lastOffset | Last active-voxel offset covered by this VBM. Pass 0 (default) to use grid->activeVoxelCount(), covering the full grid. |
| nBlocks | Allocated capacity in blocks; must be >= ceil((lastOffset - firstOffset + 1) / BlockWidth). Pass 0 (default) to use the minimum required capacity. |
| pool | Optional pool buffer for allocation (passed to BufferT::create) |
| void buildVoxelBlockManager | ( | const NanoGrid< ValueOnIndex > * | grid, |
| VoxelBlockManagerHandle< BufferT > & | handle ) |
Rebuild a VoxelBlockManager in-place using a pre-allocated handle. Zeros the jumpMap and recomputes both metadata arrays. No memory allocation.
| Log2BlockWidth | Log2 of the number of active voxels per VBM block |
| BufferT | Buffer type of the handle (must provide host-accessible data()) |
| grid | Host-accessible ValueOnIndex grid (must satisfy isSequential()) |
| handle | Pre-allocated handle whose blockCount/firstOffset/lastOffset are already set to match the grid |
| __hostdev__ char * checkGrid | ( | const NanoGrid< ValueT > * | grid, |
| char * | error, | ||
| CheckMode | mode = CheckMode::Full ) |
validate grid
|
inline |
| gridData |
|
inline |
Compute the crc32 checksum of a grid's head, i.e. its GridData and TreeData, using a lookup table. GridData::mMagic and GridData::mChecksum are excluded.
| gridData | Base pointer to the grid. |
| lut | Pointer to the lookup table for accelerated crc32 computation. |
|
inline |
| uint32_t crc32Tail | ( | const NanoGrid< ValueT > * | grid, |
| const uint32_t * | lut ) |
| uint32_t crc32TailOld | ( | const NanoGrid< ValueT > * | grid, |
| const uint32_t * | lut ) |
| util::disable_if< util::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, | ||
| CheckMode | cMode = CheckMode::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.
| width | Width of box in world units |
| height | Height of box in world units |
| depth | Depth of box in world units |
| center | Center of box in world units |
| voxelSize | Size of a voxel in world units |
| halfWidth | Half-width of narrow band in voxel units |
| origin | Origin of grid in world units |
| name | Name of the grid |
| sMode | Mode of computation for the statistics. |
| cMode | Mode of computation for the checksum. |
| buffer | Buffer 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 Fp4, Fp8, Fp16 and FpN overloads take an extra ditherOn argument, and the FpN overload also takes a tolerance argument that sets the global error tolerance.
| util::enable_if< util::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, | ||
| CheckMode | cMode = CheckMode::Default, | ||
| float | tolerance = -1.0f, | ||
| bool | ditherOn = false, | ||
| const BufferT & | buffer = BufferT() ) |
| util::disable_if< util::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, | ||
| CheckMode | cMode = CheckMode::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.
| scale | Scale of octahedron in world units |
| center | Center of box in world units |
| voxelSize | Size of a voxel in world units |
| halfWidth | Half-width of narrow band in voxel units |
| origin | Origin of grid in world units |
| name | Name of the grid |
| sMode | Mode of computation for the statistics. |
| cMode | Mode of computation for the checksum. |
| buffer | Buffer 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 Fp4, Fp8, Fp16 and FpN overloads take an extra ditherOn argument, and the FpN overload also takes a tolerance argument that sets the global error tolerance.
| util::enable_if< util::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, | ||
| CheckMode | cMode = CheckMode::Default, | ||
| float | tolerance = -1.0f, | ||
| bool | ditherOn = false, | ||
| const BufferT & | buffer = BufferT() ) |
| util::disable_if< util::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, | ||
| CheckMode | cMode = CheckMode::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.
| radius | Radius of sphere in world units |
| center | Center of sphere in world units |
| voxelSize | Size of a voxel in world units |
| halfWidth | Half-width of narrow band in voxel units |
| origin | Origin of grid in world units |
| name | Name of the grid |
| sMode | Mode of computation for the statistics. |
| cMode | Mode of computation for the checksum. |
| buffer | Buffer 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 Fp4, Fp8, Fp16 and FpN overloads take an extra ditherOn argument, and the FpN overload also takes a tolerance argument that sets the global error tolerance.
| util::enable_if< util::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, | ||
| CheckMode | cMode = CheckMode::Default, | ||
| float | tolerance = -1.0f, | ||
| bool | ditherOn = false, | ||
| const BufferT & | buffer = BufferT() ) |
| util::disable_if< util::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, | ||
| CheckMode | cMode = CheckMode::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.
| majorRadius | Major radius of torus in world units |
| minorRadius | Minor radius of torus in world units |
| center | Center of torus in world units |
| voxelSize | Size of a voxel in world units |
| halfWidth | Half-width of narrow band in voxel units |
| origin | Origin of grid in world units |
| name | Name of the grid |
| sMode | Mode of computation for the statistics. |
| cMode | Mode of computation for the checksum. |
| buffer | Buffer 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 Fp4, Fp8, Fp16 and FpN overloads take an extra ditherOn argument, and the FpN overload also takes a tolerance argument that sets the global error tolerance.
| util::enable_if< util::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, | ||
| CheckMode | cMode = CheckMode::Default, | ||
| float | tolerance = -1.0f, | ||
| bool | ditherOn = false, | ||
| const BufferT & | buffer = BufferT() ) |
| util::disable_if< util::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, | ||
| CheckMode | cMode = CheckMode::Default, | ||
| const BufferT & | buffer = BufferT() ) |
Returns a handle to a narrow-band level set of a bounding-box (= wireframe of a box)
| width | Width of box in world units |
| height | Height of box in world units |
| depth | Depth of box in world units |
| thickness | Thickness of the wire in world units |
| center | Center of bbox in world units |
| voxelSize | Size of a voxel in world units |
| halfWidth | Half-width of narrow band in voxel units |
| origin | Origin of grid in world units |
| name | Name of the grid |
| sMode | Mode of computation for the statistics. |
| cMode | Mode of computation for the checksum. |
| buffer | Buffer 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 Fp4, Fp8, Fp16 and FpN overloads take an extra ditherOn argument, and the FpN overload also takes a tolerance argument that sets the global error tolerance.
| util::enable_if< util::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, | ||
| CheckMode | cMode = CheckMode::Default, | ||
| float | tolerance = -1.0f, | ||
| bool | ditherOn = false, | ||
| const BufferT & | buffer = BufferT() ) |
| util::disable_if< util::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, | ||
| CheckMode | cMode = CheckMode::Default, | ||
| const BufferT & | buffer = BufferT() ) |
Returns a handle to a narrow-band level set of a box.
| width | Width of box in world units |
| height | Height of box in world units |
| depth | Depth of box in world units |
| center | Center of box in world units |
| voxelSize | Size of a voxel in world units |
| halfWidth | Half-width of narrow band in voxel units |
| origin | Origin of grid in world units |
| name | Name of the grid |
| sMode | Mode of computation for the statistics. |
| cMode | Mode of computation for the checksum. |
| buffer | Buffer 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 Fp4, Fp8, Fp16 and FpN overloads take an extra ditherOn argument, and the FpN overload also takes a tolerance argument that sets the global error tolerance.
| util::enable_if< util::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, | ||
| CheckMode | cMode = CheckMode::Default, | ||
| float | tolerance = -1.0f, | ||
| bool | ditherOn = false, | ||
| const BufferT & | buffer = BufferT() ) |
| util::disable_if< util::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, | ||
| CheckMode | cMode = CheckMode::Default, | ||
| const BufferT & | buffer = BufferT() ) |
Returns a handle to a narrow-band level set of a octahedron.
| scale | Scale of octahedron in world units |
| center | Center of octahedron in world units |
| voxelSize | Size of a voxel in world units |
| halfWidth | Half-width of narrow band in voxel units |
| origin | Origin of grid in world units |
| name | Name of the grid |
| sMode | Mode of computation for the statistics. |
| cMode | Mode of computation for the checksum. |
| buffer | Buffer 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 Fp4, Fp8, Fp16 and FpN overloads take an extra ditherOn argument, and the FpN overload also takes a tolerance argument that sets the global error tolerance.
| util::enable_if< util::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, | ||
| CheckMode | cMode = CheckMode::Default, | ||
| float | tolerance = -1.0f, | ||
| bool | ditherOn = false, | ||
| const BufferT & | buffer = BufferT() ) |
| util::enable_if< util::is_same< BuildT, Fp4, Fp8, Fp16 >::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, | ||
| CheckMode | cMode = CheckMode::Default, | ||
| bool | ditherOn = false, | ||
| const BufferT & | buffer = BufferT() ) |
| util::enable_if< util::is_same< BuildT, float, double >::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, | ||
| CheckMode | cMode = CheckMode::Default, | ||
| const BufferT & | buffer = BufferT() ) |
Returns a handle to a narrow-band level set of a sphere.
| radius | Radius of sphere in world units |
| center | Center of sphere in world units |
| voxelSize | Size of a voxel in world units |
| halfWidth | Half-width of narrow band in voxel units |
| origin | Origin of grid in world units |
| name | Name of the grid |
| sMode | Mode of computation for the statistics. |
| cMode | Mode of computation for the checksum. |
| buffer | Buffer 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 Fp4, Fp8, Fp16 and FpN overloads take an extra ditherOn argument, and the FpN overload also takes a tolerance argument that sets the global error tolerance.
| util::enable_if< util::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, | ||
| CheckMode | cMode = CheckMode::Default, | ||
| float | tolerance = -1.0f, | ||
| bool | ditherOn = false, | ||
| const BufferT & | buffer = BufferT() ) |
| util::disable_if< util::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, | ||
| CheckMode | cMode = CheckMode::Default, | ||
| const BufferT & | buffer = BufferT() ) |
Returns a handle to a narrow-band level set of a torus in the xz-plane.
| majorRadius | Major radius of torus in world units |
| minorRadius | Minor radius of torus in world units |
| center | Center of torus in world units |
| voxelSize | Size of a voxel in world units |
| halfWidth | Half-width of narrow band in voxel units |
| origin | Origin of grid in world units |
| name | Name of the grid |
| sMode | Mode of computation for the statistics. |
| cMode | Mode of computation for the checksum. |
| buffer | Buffer 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 Fp4, Fp8, Fp16 and FpN overloads take an extra ditherOn argument, and the FpN overload also takes a tolerance argument that sets the global error tolerance.
| util::enable_if< util::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, | ||
| CheckMode | cMode = CheckMode::Default, | ||
| float | tolerance = -1.0f, | ||
| bool | ditherOn = false, | ||
| const BufferT & | buffer = BufferT() ) |
| util::enable_if< BuildTraits< DstBuildT >::is_FpX, GridHandle< BufferT > >::type createNanoGrid | ( | const SrcGridT & | srcGrid, |
| StatsMode | sMode = StatsMode::Default, | ||
| CheckMode | cMode = CheckMode::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.
| SrcGridT | Type 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 |
| BufferT | Type of the buffer used to allocate the destination grid |
| srcGrid | Input (source) grid to be converted |
| ditherOn | switch to enable or disable dithering of quantization error |
| sMode | Mode for computing statistics of the destination grid |
| cMode | Mode for computing checksums of the destination grid |
| verbose | Mode of verbosity |
| buffer | Instance of a buffer used for allocation |
| util::enable_if< util::is_same< FpN, DstBuildT >::value, GridHandle< BufferT > >::type createNanoGrid | ( | const SrcGridT & | srcGrid, |
| StatsMode | sMode = StatsMode::Default, | ||
| CheckMode | cMode = CheckMode::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.
| SrcGridT | Type of in input (source) grid, e.g. openvdb::Grid or nanovdb::Grid |
| DstBuildT | = FpN, i.e. variable bit-width of the output grid |
| OracleT | Type of the oracle used to determine the local bit-width, i.e. N in FpN |
| BufferT | Type of the buffer used to allocate the destination grid |
| srcGrid | Input (source) grid to be converted |
| ditherOn | switch to enable or disable dithering of quantization error |
| sMode | Mode for computing statistics of the destination grid |
| cMode | Mode for computing checksums of the destination grid |
| verbose | Mode of verbosity |
| oracle | Instance of a oracle used to determine the local bit-width, i.e. N in FpN |
| buffer | Instance of a buffer used for allocation |
| util::disable_if< BuildTraits< DstBuildT >::is_index||BuildTraits< DstBuildT >::is_Fp, GridHandle< BufferT > >::type createNanoGrid | ( | const SrcGridT & | srcGrid, |
| StatsMode | sMode = StatsMode::Default, | ||
| CheckMode | cMode = CheckMode::Default, | ||
| int | verbose = 0, | ||
| const BufferT & | buffer = BufferT() ) |
Freestanding function that creates a NanoGrid<T> from any source grid.
| SrcGridT | Type of in input (source) grid, e.g. openvdb::Grid or nanovdb::Grid |
| DstBuildT | Type of values in the output (destination) nanovdb Grid, e.g. float or nanovdb::Fp16 |
| BufferT | Type of the buffer used ti allocate the destination grid |
| srcGrid | Input (source) grid to be converted |
| sMode | Mode for computing statistics of the destination grid |
| cMode | Mode for computing checksums of the destination grid |
| verbose | Mode of verbosity |
| buffer | Instance of a buffer used for allocation |
| util::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.
| SrcGridT | Type of in input (source) grid, e.g. openvdb::Grid or nanovdb::Grid |
| DstBuildT | If ValueIndex all (active and inactive) values are indexed and if it is ValueOnIndex only active values are indexed. |
| BufferT | BufferT Type of the buffer used ti allocate the destination grid |
| srcGrid | Input (source) grid to be converted |
| channels | If 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 |
| includeStats | If true all tree nodes will includes indices for stats, i.e. min/max/avg/std-div |
| includeTiles | If false on values in leaf nodes are indexed |
| verbose | Mode of verbosity |
| buffer | Instance of a buffer used for allocation |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| util::disable_if< util::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", | ||
| CheckMode | mode = CheckMode::Default, | ||
| const BufferT & | buffer = BufferT() ) |
Returns a handle to a PointDataGrid containing points scattered on the surface of a box.
| pointsPerVoxel | Number of point per voxel on on the surface |
| width | Width of box in world units |
| height | Height of box in world units |
| depth | Depth of box in world units |
| center | Center of box in world units |
| voxelSize | Size of a voxel in world units |
| origin | Origin of grid in world units |
| name | Name of the grid |
| mode | Mode of computation for the checksum. |
| buffer | Buffer used for memory allocation by the handle |
|
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.
| srcGrid | Const input grid used to determine the active voxels to scatter points into |
| pointsPerVoxel | Number of point per voxel on on the surface |
| name | Name of the grid |
| mode | Mode of computation for the checksum. |
| buffer | Buffer used for memory allocation by the handle |
| util::disable_if< util::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", | ||
| CheckMode | mode = CheckMode::Default, | ||
| const BufferT & | buffer = BufferT() ) |
Returns a handle to a PointDataGrid containing points scattered on the surface of a sphere.
| pointsPerVoxel | Number of point per voxel on on the surface |
| radius | Radius of sphere in world units |
| center | Center of sphere in world units |
| voxelSize | Size of a voxel in world units |
| origin | Origin of grid in world units |
| name | Name of the grid |
| mode | Mode of computation for the checksum. |
| buffer | Buffer used for memory allocation by the handle |
The BuildT template parameter must be float (default) or double.
| util::disable_if< util::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", | ||
| CheckMode | cMode = CheckMode::Default, | ||
| const BufferT & | buffer = BufferT() ) |
Returns a handle to a PointDataGrid containing points scattered on the surface of a torus.
| pointsPerVoxel | Number of point per voxel on on the surface |
| majorRadius | Major radius of torus in world units |
| minorRadius | Minor radius of torus in world units |
| center | Center of torus in world units |
| voxelSize | Size of a voxel in world units |
| origin | Origin of grid in world units |
| name | Name of the grid |
| cMode | Mode of computation for the checksum. |
| buffer | Buffer used for memory allocation by the handle |
The BuildT template parameter must be float (default) or double.
|
inline |
Compute the (2 x CRC32) checksum of the specified gridData.
| gridData | Base pointer to the grid from which the checksum is computed. |
| mode | Defines the mode of computation for the checksum. |
gridData | ValueT |
| grid | |
| mode |
Extract the checksum of a grid.
| gridData | Base pointer to grid with a checksum |
| Extrema< typename NanoGrid< BuildT >::ValueType > getExtrema | ( | const NanoGrid< BuildT > & | grid, |
| const CoordBBox & | bbox ) |
Determine the extrema of all the values in a grid that intersects the specified bounding box.
return the extrema of all the values in a grid that intersects the specified bounding box.
| BuildT | Build type of the input grid |
| grid | typed grid |
| bbox | index bounding box in which min/max are computed |
bbox | void gridStats | ( | NanoGrid< BuildT > & | grid, |
| StatsMode | mode = StatsMode::Default ) |
| bool isValid | ( | const NanoGrid< ValueT > & | grid, |
| bool | detailed = true, | ||
| bool | verbose = false ) |
Return true if the specified grid passes several validation tests.
| ValueT | Build type of the input grid |
| grid | Grid to validate |
| detailed | If true the validation test is detailed and relatively slow. |
| verbose | If true information about the first failed test is printed to std::cerr |
| bool isValid | ( | const NanoGrid< ValueT > * | grid, |
| CheckMode | mode, | ||
| bool | verbose = false ) |
Performs several validation tests on a grid pointer.
| ValueT | Build type of the input grid |
| grid | const point to the grid that needs validation |
| mode | Mode of the validation check (defined in GridChecksum.h) |
| verbose | If true information about the first failed test is printed to std::cerr |
| openvdb::GridBase::Ptr nanoToOpenVDB | ( | const GridHandle< BufferT > & | handle, |
| uint32_t | gridID = 0 ) |
Forward declaration of free-standing function that de-serializes a grid in a NanoVDB GridHandle into an OpenVDB GridBase.
| BufferT | Template type of the buffer used to allocate the grid handle |
| handle | Handle for the input grid to be converted |
| gridID | ID of the grid in the GridHandle to be converted (defaults to first grid) |
| auto nanoToOpenVDB | ( | const NanoGrid< NanoBuildT > & | grid | ) |
Free-standing function that de-serializes a typed NanoVDB grid into an OpenVDB Grid.
| NanoBuildT | Template build type for the grid |
| grid | NanoVDB grid to be converted to an OpenVDB grid |
| util::enable_if_t< BuildTraits< NanoBuildT >::is_index, trait::OpenGridPtr< NanoValueT > > nanoToOpenVDB | ( | const NanoGrid< NanoBuildT > & | grid, |
| const NanoValueT * | sideCar, | ||
| GridClass | gridClass = GridClass::Unknown, | ||
| const char * | gridName = nullptr ) |
Free-standing function that de-serializes an IndexGrid with a sidecar into an OpenVDB Grid.
| NanoValueT | Template type of the sidecar data accompanying the index grid |
| grid | IndexGrid into the sidecar data |
| sideCar | Linear array of sidecar data |
| gridClass | GridClass corresponding to the sidecar data |
| gridName | Name of the output grid |
|
inline |
Updates the checksum of a grid by preserving its mode.
| gridData | Base pointer to grid |
Updates the checksum of a grid.
| gridData | Base pointer to the grid whose checksum will be updated. |
| mode | Defines the mode of computation for the checksum. |
| void updateChecksum | ( | NanoGrid< ValueT > * | grid | ) |
| ValueT |
| grid | |
| mode |
|
inline |
Updates the ground index and count, as well as the head checksum if needed.
| data | Pointer to grid data |
| gridIndex | New value of the index |
| gridCount | New value of the grid count |
| void updateGridStats | ( | NanoGrid< BuildT > * | grid, |
| StatsMode | mode = StatsMode::Default ) |
|
inline |
Return true if the checksum of gridData matches the expected value already encoded into the grid's meta data.
| gridData | Base pointer to the grid whose checksum is validated. |
| mode | Defines the mode of computation for the checksum. |
| ValueT |
| grid | |
| mode |
| bool validateGrid | ( | const GridHandleT & | handle, |
| uint32_t | gridID, | ||
| CheckMode | mode, | ||
| bool | verbose ) |
Validate a specific grid in a GridHandle.
| GridHandleT | Type of GridHandle |
| handle | GridHandle containing host grids |
| gridID | linear index of the grid to be validated |
| mode | node of validation tests |
| verbose | if true information is printed if the grid fails a validation test |
gridID passes all the validation tests | bool validateGrids | ( | const GridHandleT & | handle, |
| CheckMode | mode, | ||
| bool | verbose ) |
Validate all the grids in a GridHandle.
| GridHandleT | Type of GridHandle |
| handle | GridHandle containing host grids (0,1...,N) |
| mode | node of validation tests |
| verbose | if true information is printed if a grid fails a validation test |