Loading...
Searching...
No Matches
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.
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).
uint64_t | getValueCount () const
| return the total number of values located in the source grid.
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
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

## Detailed Description

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

Allows for the construction of NanoVDB grids without any dependency.

## Constructor & Destructor Documentation

## IndexGridBuilder()

template<typename SrcValueT>

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

inline

Constructor based on a source grid.

Parameters

  srcGrid | Source grid used to generate the IndexGrid
  includeInactive | Include inactive values or only active values
  includeStats | Include min/max/avg/std per node or not

Note
  For minimum memory consumption set the two boolean options to false

## Member Function Documentation

## copyValues()

template<typename SrcValueT>

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()

template<typename SrcValueT>
template<typename BufferT>

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()

template<typename SrcValueT>

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()

template<typename SrcValueT>
template<typename BufferT>

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

return a buffer with all the values in the source grid