OpenVDB  7.2.0
Public Types | Public Member Functions | Friends | List of all members
VolumeExecutable Class Reference

Object that encapsulates compiled AX code which can be executed on a collection of VDB volume grids. More...

#include <VolumeExecutable.h>

Public Types

enum  IterType { ON, OFF, ALL }
 
using Ptr = std::shared_ptr< VolumeExecutable >
 

Public Member Functions

 ~VolumeExecutable ()
 
 VolumeExecutable (const VolumeExecutable &other)
 Copy constructor. Shares the LLVM constructs but deep copies the settings. Multiple copies of an executor can be used at the same time safely. More...
 
void execute (openvdb::GridPtrVec &grids) const
 Execute AX code on target grids. More...
 
void execute (openvdb::GridBase &grid) const
 
void setCreateMissing (const bool flag)
 Set the behaviour when missing grids are accessed. Default behaviour is true, which creates them with default transforms and background values. More...
 
bool getCreateMissing () const
 
void setTreeExecutionLevel (const Index level)
 Set the execution level for this executable. This controls what nodes are processed when execute is called. Possible values depend on the OpenVDB configuration in use however a value of 0 is the default and will always correspond to the lowest level (leaf-level). More...
 
Index getTreeExecutionLevel () const
 
void setValueIterator (const IterType &iter)
 Set the value iterator type to use with this executable. Options are ON, OFF, ALL. Default is ON. More...
 
IterType getValueIterator () const
 
void setGrainSize (const size_t grain)
 Set the threading grain size. Default is 1. A value of 0 has the effect of disabling multi-threading. More...
 
size_t getGrainSize () const
 
OPENVDB_DEPRECATED void execute (openvdb::GridPtrVec &grids, const IterType iter, const bool create) const
 
OPENVDB_DEPRECATED void execute (openvdb::GridPtrVec &grids, const IterType iter) const
 

Friends

class Compiler
 
class ::TestVolumeExecutable
 

Detailed Description

Object that encapsulates compiled AX code which can be executed on a collection of VDB volume grids.

Member Typedef Documentation

using Ptr = std::shared_ptr<VolumeExecutable>

Member Enumeration Documentation

enum IterType
strong
Enumerator
ON 
OFF 
ALL 

Constructor & Destructor Documentation

VolumeExecutable ( const VolumeExecutable other)

Copy constructor. Shares the LLVM constructs but deep copies the settings. Multiple copies of an executor can be used at the same time safely.

Member Function Documentation

void execute ( openvdb::GridPtrVec grids) const

Execute AX code on target grids.

void execute ( openvdb::GridBase grid) const
OPENVDB_DEPRECATED void execute ( openvdb::GridPtrVec grids,
const IterType  iter,
const bool  create 
) const
inline
OPENVDB_DEPRECATED void execute ( openvdb::GridPtrVec grids,
const IterType  iter 
) const
inline
bool getCreateMissing ( ) const
Returns
Whether this executable will generate new grids.
size_t getGrainSize ( ) const
Returns
The current grain size
Index getTreeExecutionLevel ( ) const
Returns
The tree execution level. Default is 0 i.e. the leaf level
IterType getValueIterator ( ) const
Returns
The current value iterator type
void setCreateMissing ( const bool  flag)

Set the behaviour when missing grids are accessed. Default behaviour is true, which creates them with default transforms and background values.

Parameters
flagEnables or disables the creation of missing attributes
void setGrainSize ( const size_t  grain)

Set the threading grain size. Default is 1. A value of 0 has the effect of disabling multi-threading.

Parameters
grainThe grain size
void setTreeExecutionLevel ( const Index  level)

Set the execution level for this executable. This controls what nodes are processed when execute is called. Possible values depend on the OpenVDB configuration in use however a value of 0 is the default and will always correspond to the lowest level (leaf-level).

Note
A value larger that the number of levels in the tree (i.e. larger than the tree depth) will cause this method to throw a runtime error.
Warning
Executing over tiles with compiled code designed for voxel level access may produce incorrect results. This is typically the case when accessing VDBs with mismatching topology. Consider voxelizing tiles where necessary.
Parameters
levelThe tree execution level to set
void setValueIterator ( const IterType iter)

Set the value iterator type to use with this executable. Options are ON, OFF, ALL. Default is ON.

Parameters
iterThe value iterator type to set

Friends And Related Function Documentation

friend class ::TestVolumeExecutable
friend
friend class Compiler
friend

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