HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CE_VDBGrid Class Reference

#include <CE_VDBGrid.h>

Public Member Functions

 CE_VDBGrid ()
 
 ~CE_VDBGrid ()
 
const cl::Bufferbuffer () const
 
exint bufferSize () const
 
const cl::BuffertileStarts () const
 
exint numTiles () const
 
bool hasBuffer () const
 If the current OpenCL buffer is valid. More...
 
bool hasTileStarts () const
 
void initFromVDB (const openvdb::GridBase &grid)
 Initialize the CE_VDBGrid from the supplied VDB grid. More...
 
void initFromDeviceBuffers (cl::Buffer gridbuffer, exint gridsize, cl::Buffer tilestartbuffer, exint tilestartcount)
 Initialize the CE_VDBGrid from the supplied buffers of a nanovdb. More...
 
void buildTileStarts (const openvdb::GridBase &grid)
 
openvdb::GridBase::Ptr createVDB () const
 Create a VDB grid from the CE VDB grid. More...
 

Protected Member Functions

void releaseBuffer ()
 
void releaseTileStarts ()
 

Protected Attributes

cl::Buffer myBuffer
 
exint myBufSize = -1
 
UT_Array< UT_Vector3imyTileStarts
 
cl::Buffer myTileStartsBuffer
 
exint myTileStartsCount = -1
 

Detailed Description

Definition at line 25 of file CE_VDBGrid.h.

Constructor & Destructor Documentation

CE_VDBGrid::CE_VDBGrid ( )
inline

Definition at line 28 of file CE_VDBGrid.h.

CE_VDBGrid::~CE_VDBGrid ( )
inline

Definition at line 29 of file CE_VDBGrid.h.

Member Function Documentation

const cl::Buffer& CE_VDBGrid::buffer ( ) const
inline

Return the underlying OpenCL buffer that can be used in kernel invocations.

Definition at line 39 of file CE_VDBGrid.h.

exint CE_VDBGrid::bufferSize ( ) const
inline

Definition at line 40 of file CE_VDBGrid.h.

void CE_VDBGrid::buildTileStarts ( const openvdb::GridBase &  grid)

Build the tile start buffer from the provided grid, this will be one tile per dense leaf node

openvdb::GridBase::Ptr CE_VDBGrid::createVDB ( ) const

Create a VDB grid from the CE VDB grid.

bool CE_VDBGrid::hasBuffer ( ) const
inline

If the current OpenCL buffer is valid.

Definition at line 46 of file CE_VDBGrid.h.

bool CE_VDBGrid::hasTileStarts ( ) const
inline

Definition at line 47 of file CE_VDBGrid.h.

void CE_VDBGrid::initFromDeviceBuffers ( cl::Buffer  gridbuffer,
exint  gridsize,
cl::Buffer  tilestartbuffer,
exint  tilestartcount 
)

Initialize the CE_VDBGrid from the supplied buffers of a nanovdb.

void CE_VDBGrid::initFromVDB ( const openvdb::GridBase &  grid)

Initialize the CE_VDBGrid from the supplied VDB grid.

exint CE_VDBGrid::numTiles ( ) const
inline

Definition at line 43 of file CE_VDBGrid.h.

void CE_VDBGrid::releaseBuffer ( )
protected
void CE_VDBGrid::releaseTileStarts ( )
protected
const cl::Buffer& CE_VDBGrid::tileStarts ( ) const
inline

Definition at line 42 of file CE_VDBGrid.h.

Member Data Documentation

cl::Buffer CE_VDBGrid::myBuffer
protected

Definition at line 67 of file CE_VDBGrid.h.

exint CE_VDBGrid::myBufSize = -1
protected

Definition at line 68 of file CE_VDBGrid.h.

UT_Array<UT_Vector3i> CE_VDBGrid::myTileStarts
protected

Definition at line 70 of file CE_VDBGrid.h.

cl::Buffer CE_VDBGrid::myTileStartsBuffer
protected

Definition at line 71 of file CE_VDBGrid.h.

exint CE_VDBGrid::myTileStartsCount = -1
protected

Definition at line 72 of file CE_VDBGrid.h.


The documentation for this class was generated from the following file: