OpenVDB 10.0.1
Loading...
Searching...
No Matches
Public Member Functions | List of all members
IndexGridBuilder< SrcValueT > Class Template Reference

Allows for the construction of NanoVDB grids without any dependency. More...

#include <nanovdb/util/IndexGridBuilder.h>

Public Member Functions

 IndexGridBuilder (const SrcGridT &srcGrid, bool includeInactive=true, bool includeStats=true)
 Constructor based on a source grid. More...
 
template<typename BufferT = HostBuffer>
GridHandle< BufferT > getHandle (const std::string &name="", uint32_t channels=0u, const BufferT &buffer=BufferT())
 Return an instance of a GridHandle (invoking move semantics) More...
 
uint64_t getValueCount () const
 return the total number of values located in the source grid. More...
 
template<typename BufferT = HostBuffer>
BufferT getValues (uint32_t channels=1u, const BufferT &buffer=BufferT())
 return a buffer with all the values in the source grid More...
 
uint64_t copyValues (SrcValueT *buffer, size_t maxValueCount=-1)
 copy values from the source grid into the provided array and returns number of values copied More...
 

Detailed Description

template<typename SrcValueT>
class nanovdb::IndexGridBuilder< SrcValueT >

Allows for the construction of NanoVDB grids without any dependency.

Constructor & Destructor Documentation

◆ IndexGridBuilder()

IndexGridBuilder ( const SrcGridT srcGrid,
bool  includeInactive = true,
bool  includeStats = true 
)
inline

Constructor based on a source grid.

Parameters
srcGridSource grid used to generate the IndexGrid
includeInactiveInclude inactive values or only active values
includeStatsInclude min/max/avg/std per node or not
Note
For minimum memory consumption set the two boolean options to false

Member Function Documentation

◆ copyValues()

uint64_t copyValues ( SrcValueT *  buffer,
size_t  maxValueCount = -1 
)

copy values from the source grid into the provided array and returns number of values copied

◆ getHandle()

GridHandle< BufferT > getHandle ( const std::string &  name = "",
uint32_t  channels = 0u,
const BufferT &  buffer = BufferT() 
)

Return an instance of a GridHandle (invoking move semantics)

◆ getValueCount()

uint64_t getValueCount ( ) const
inline

return the total number of values located in the source grid.

Note
This is minimum number of elements required for the external array that the IndexGrid points to.

◆ getValues()

BufferT getValues ( uint32_t  channels = 1u,
const BufferT &  buffer = BufferT() 
)

return a buffer with all the values in the source grid